opik-cipxlisted
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