← ClaudeAtlas

opik-cipxlisted

How the opik-cipx cost-tracking proxy works — architecture, the CLI, where it stores state, how it's enabled and disabled, privacy and telemetry, and how to read `opik-cipx status`. Use whenever the user asks about opik-cipx, token/cost tracking, or Opik spans, or when spans stop reaching Opik, Claude Code seems to bypass the proxy, or you need to explain, diagnose, or repair any part of it.
comet-ml/cost-intelligence-proxy · ★ 1 · AI & Automation · score 60
Install: claude install-skill comet-ml/cost-intelligence-proxy
# opik-cipx opik-cipx is a local reverse HTTP proxy between Claude Code and the Anthropic API. Claude Code is pointed at it through `ANTHROPIC_BASE_URL`; opik-cipx owns the TLS leg to `api.anthropic.com`. It captures every call, attributes the token bill to cost buckets, and ships per-call spans to Opik. It is a single Go binary — both the long-lived gateway and the short-lived commands below. ## How a session gets wired Installing the plugin is the whole opt-in. Each Claude Code **SessionStart** runs the plugin's hook launcher, which locates the binary and execs `opik-cipx sync` (the hook event argument is ignored — `sync` is the same operation every time). From then on every API call flows through opik-cipx. There is no per-project or per-repo toggle and no marker file. Wire path: Claude Code → `http://127.0.0.1:9909` (plain HTTP, loopback) → opik-cipx tees the request and response → forwards over TLS to Anthropic. The proxy only tees bytes; categorization and span-building run on a background materializer so they never block the wire. ## Turning capture on and off - **On:** install the plugin, or run `opik-cipx sync`. It is on by virtue of being installed. - **Off:** set `CIPX_DISABLED` to a truthy value (`1`, `true`, `yes`, `on`). The next `opik-cipx sync` tears the install down — removes the launchd / systemd supervisor unit and clears the managed `ANTHROPIC_BASE_URL` — so Claude Code routes straight to Anthropic. As a backstop, `opik-cipx proxy` exits 0