Skip to content

CLI

autotel-cli provides an interactive setup wizard, diagnostics, incremental feature additions, and telemetry investigation commands.

Terminal window
npm install -g autotel-cli
# or
npx autotel <command>

Interactive setup wizard:

Terminal window
# Interactive mode
npx autotel init
# Use defaults
npx autotel init --yes
# Use a quick preset
npx autotel init --preset node-datadog-pino
# Dry run
npx autotel init --dry-run

Quick presets:

  • node-datadog-pino — Node.js + Datadog + Pino logging
  • node-datadog-agent — Node.js + Datadog Agent (local dev)
  • node-honeycomb — Node.js + Honeycomb
  • node-otlp — Node.js + Generic OTLP endpoint

Run diagnostics on your setup:

Terminal window
npx autotel doctor # Run all checks
npx autotel doctor --json # Machine-readable output
npx autotel doctor --fix # Auto-fix resolvable issues

Add components incrementally:

Terminal window
npx autotel add backend datadog
npx autotel add subscriber posthog
npx autotel add plugin bigquery
npx autotel add platform cloudflare

The CLI can query and diagnose telemetry directly (same backend model as autotel-mcp), returning one JSON document per invocation.

Terminal window
# backend health + signal availability
npx autotel health
npx autotel capabilities
# discovery
npx autotel discover services
npx autotel discover trace-fields
npx autotel discover log-fields
# traces / spans / logs / metrics
npx autotel query traces --service-name checkout --error-only --limit 20
npx autotel query spans --service-name checkout --operation-name db.query
npx autotel query logs --trace-id <traceId>
npx autotel query metrics --service-name checkout
# incident triage
npx autotel diagnose anomalies --service checkout
npx autotel diagnose root-cause <traceId>
npx autotel correlate trace <traceId>

All backend-touching commands accept:

Terminal window
--backend collector|jaeger|tempo|prometheus|loki|stack|auto|fixture
--jaeger-base-url <url>
--tempo-base-url <url>
--prometheus-base-url <url>
--loki-base-url <url>
--collector-port <n>
--fixture-path <path>

Use --output-file <path> to persist command JSON and --no-secrets-in-output to redact secret-shaped values.

See any example app — autotel init generates the instrumentation.ts file used across all examples.

Wrap functions with trace():

Terminal window
npx autotel codemod trace ./src
  • MCP — the autotel-mcp server this CLI investigate surface mirrors.
  • Claude Code Skill — using these commands from a Claude skill workflow.
  • Devtools — local OTLP receiver UI. Run it with npx autotel-devtools (not npx autotel dev tools).