X-ray vision for AI agent sessions. A zero-config HTTP proxy that records every API call between Claude Code and Anthropic, with a real-time dashboard to inspect what's actually happening inside your agent.
Claude Code is a black box. You can't see:
- What system prompts it sends (and how they change between versions)
- How much each tool call costs
- Why it's thinking for 30 seconds
- What context is eating your 200K token window
ccxray makes it a glass box.
npx ccxray claudeThat's it. Proxy starts, Claude Code launches through it, and the dashboard opens automatically in your browser. Run it in multiple terminals — they automatically share one dashboard.
ccxray # Proxy + dashboard only
ccxray claude --continue # All claude args pass through
ccxray --port 8080 claude # Custom port (independent, no hub sharing)
ccxray claude --no-browser # Skip auto-open browser
ccxray status # Show hub info and connected clients
ANTHROPIC_BASE_URL=http://localhost:5577 claude # Manual setup (existing sessions)Running ccxray claude in multiple terminals automatically shares a single proxy and dashboard — no configuration needed.
# Terminal 1
cd ~/project-a && ccxray claude # Starts hub + claude
# Terminal 2
cd ~/project-b && ccxray claude # Connects to existing hub
# Both projects visible in one dashboard at http://localhost:5577If the hub process crashes, connected clients automatically recover within seconds.
$ ccxray status
Hub: http://localhost:5577 (pid 12345, uptime 3600s, v1.1.0)
Connected clients (2):
[1] pid 23456 — ~/dev/project-a
[2] pid 34567 — ~/dev/project-bUse --port to opt out and run an independent server instead.
Watch your agent think in real-time. Every turn broken down into thinking blocks (with duration), tool calls with inline previews, and assistant responses.
Track your real spending. Session heatmap, burn rate, ROI calculator — know exactly where your tokens go.
Automatic version detection with diff viewer. Browse system prompts across all agent types — main agent, subagents (Explore, Web Search, etc.) — and see exactly what changed between updates.
- Session Detection — Automatically groups turns by Claude Code session, with project/cwd extraction
- Token Accounting — Per-turn breakdown: input/output/cache-read/cache-create tokens, cost in USD, context window usage bar
Claude Code ──► ccxray (:5577) ──► api.anthropic.com (or ANTHROPIC_BASE_URL)
│
▼
~/.ccxray/logs/ (JSON)
│
▼
Dashboard (same port)
ccxray is a transparent HTTP proxy. It forwards requests to Anthropic unchanged, records both request and response as JSON files, and serves a web dashboard on the same port. No API key needed — it passes through whatever Claude Code sends.
| Flag | Description |
|---|---|
--port <number> |
Port for proxy + dashboard (default: 5577). Opts out of hub sharing. |
--no-browser |
Don't auto-open the dashboard in your browser |
| Variable | Default | Description |
|---|---|---|
PROXY_PORT |
5577 |
Port for proxy + dashboard (overridden by --port) |
BROWSER |
— | Set to none to disable auto-open |
AUTH_TOKEN |
(none) | API key for access control (disabled when unset) |
CCXRAY_HOME |
~/.ccxray |
Base directory for hub lockfile, logs, and hub.log |
CCXRAY_MAX_ENTRIES |
5000 |
Max in-memory entries (oldest evicted; disk logs unaffected) |
ANTHROPIC_BASE_URL |
— | Custom upstream Anthropic endpoint (e.g. a corporate gateway). ccxray reads this at startup and forwards to it instead of api.anthropic.com. ANTHROPIC_TEST_* take precedence when set. |
Logs are stored in ~/.ccxray/logs/ as {timestamp}_req.json and {timestamp}_res.json. Upgrading from v1.0? Logs previously in ./logs/ are automatically migrated on first run.
docker build -t ccxray .
docker run -p 5577:5577 ccxray- Node.js 18+
- SourceAtlas — Your map to any codebase
- AskRoundtable — Make your AI think like Munger, Feynman, or Paul Graham
- Follow @lis186 on X for updates
MIT



