Skip to main content
Carbon ingests Claude Code through its built-in OpenTelemetry exporter. The @carbon-js/connect CLI points that exporter at Carbon, so every model call, its token usage and cost, and each tool execution land in your space as events — with no SDK, no daemon, and no changes to your project.

Quick setup

1

Run the interactive setup

@carbon-js/connect detects Claude Code, connects it, and prompts for your Carbon API key (generate one under Settings → API Keys).
npx @carbon-js/connect@latest
Prefer to skip the prompts? Pass the app and key directly — see API keys.
2

Restart Claude Code

Restart the app so it reloads its config and begins exporting. Run a prompt, then open Events — your activity appears within seconds.

What gets captured

Each Claude Code turn becomes one LLM event (model, token usage, cost, timing, status); each tool run becomes one tool event, correlated to its session and turn. Events show up under the Claude Code source, alongside everything else in your space.
Carbon receives dimensions only — model, usage, cost, timing, status, and the session/turn keys. Your prompts, the model’s responses, and tool input/output text are never sent. See Privacy.

Managing the connection

@carbon-js/connect makes a tagged, idempotent edit to Claude Code’s own ~/.claude/settings.json, touching only the keys it manages. To check status or revert:
@carbon-js/connect status              # show which apps are connected
@carbon-js/connect disconnect claude-code
See How it works for exactly what the edit changes, and Commands for the full CLI.