All commands support --json for machine-readable output. Commands that query alerts use exit code 1 if active (unacknowledged, unsuppressed) alerts exist.
--config PATH Override config file path
--db PATH Override database path
--agent ID Filter to a specific agent
--json Output in JSON format
--no-color Disable color output
-v, --verbose Verbose output
Guided setup wizard. Creates config file, generates ingest secret, optionally installs background daemon.
tj onboard # interactive setup
tj onboard --claude-code # configure Claude Code telemetry
tj onboard --no-daemon # skip daemon installation
tj onboard --budget 5.00 # set daily budget during setup
tj onboard --force # overwrite existing configHealth check — validates config, database connectivity, ingest secret, and alert channel reachability.
tj doctorExit codes: 0 = healthy, 1 = warnings, 2 = errors.
Current agent state: session info, cost, token counts, active alerts.
tj status
tj status --agent my-agentTrace listing with span waterfall view.
tj traces
tj traces --since 1h
tj trace <trace-id> # full span waterfall for a single traceCost breakdown by agent, model, day, or tool.
tj cost
tj cost --since 7d
tj cost --group-by model # group by model
tj cost --group-by day # group by day
tj cost --group-by agent # group by agent
tj cost --group-by tool # group by toolAlert history with severity and type filtering.
tj alerts
tj alerts --severity critical
tj alerts --type sensitive_action
tj alerts --since 1h
tj alerts --unread # only unacknowledged alertsView and set daily/session cost limits.
tj budget # view all budgets
tj budget --agent my-agent --daily 5.00 # set daily limit
tj budget --agent my-agent --session 1.00 # set session limitBehavioral drift report: baseline vs latest session Z-scores.
tj drift
tj drift --agent my-agentExit code 1 if any agent has drifted (useful for CI gating).
Tool call summary: call counts, average duration, error rates.
tj tools
tj tools --since 1hExport spans in multiple formats.
tj export --format json
tj export --format csv --output spans.csv
tj export --format otlp
tj export --format openevals --output traces.jsonStart the MCP server (stdio transport for Claude Code). Registered automatically by tj onboard --claude-code.
tj mcpStart the local REST API server with web UI and Prometheus metrics.
tj serve # foreground
tj serve & # background
tj serve --host 0.0.0.0 # bind to all interfaces
tj serve --port 8080 # custom port
tj serve --reload # auto-reload for developmentWeb UI: http://127.0.0.1:7391/
API docs: http://127.0.0.1:7391/docs
Metrics: http://127.0.0.1:7391/metrics
Stop the background daemon or tj serve process.
tj stopRemove all TokenJam data, config, daemon, MCP registration, and env vars.
tj uninstall # interactive confirmation
tj uninstall --yes # skip confirmation