Every AI coding session has a price tag. Until now, most engineering leaders were flying blind on what Claude Code, Cursor, and Copilot were actually costing them per pull request or per developer. CC-Ledger changes that equation with a local-first telemetry pipeline that captures every prompt, tool call, and diff into SQLite—then optionally commits it to a private git branch alongside your code. No SaaS subscriptions required, no data flying off to third-party servers.
What CC-Ledger Actually Tracks
The dashboard answers the three questions engineering directors are losing sleep over: what does a PR actually cost, which sessions are runaway burns, and where do the dollars go—planning or coding? On the PR cost front, cc-ledger rolls up token spend per merged pull request with cache reads calculated at 10% pricing and batch tier applied automatically. Drill down by repo, team, or author to identify who's burning budget versus shipping code efficiently. The session-cost distribution is where things get spicy for finance conversations. CC-Ledger surfaces p50 ($0.42), p95 ($3.10), and p99 ($18.40) metrics so the tail is visible before it shows up on the monthly invoice. Click through to the offender—because you know there's always that one developer running 20-minute debugging sessions with no guardrails.
The Planning vs. Coding Split
Here's where cc-ledger gets genuinely useful for strategic decisions. Agent turns are auto-classified into planning (38%), coding (47%), debugging (10%), and other (5%). Leaders can finally see whether their AI spend is exploration or execution—and make the call on whether to tighten the leash or let engineers cook.
How It Works: One Install Command
Setup is refreshingly Unix-philosophical. Run curl -fsSL https://ccledger.dev/install | bash and you're wired into Claude Code lifecycle hooks. No daemons, no SaaS pings—everything runs locally on developer machines. Sessions are recorded to SQLite, and the optional git branch sync means cost data travels with your codebase history.
Who It's Actually For
CC-Ledger is explicitly aimed at engineering leaders: directors, VPs, team leads trying to justify AI tool spend to finance and exec teams. This isn't raw transcript spelunking through JSONL files—it's the dashboard you open in a 1:1 when someone's monthly Claude Code bill hits $400 and you need answers.
Key Takeaways
- Tracks Claude Code, Cursor, and Copilot sessions with local SQLite storage—no cloud dependency
- Per-PR cost breakdown with cache pricing at 10% and batch tier calculations built in
- Session distribution metrics (p50/p95/p99) surface runaway costs before the invoice hits
- Auto-classifies agent activity into planning, coding, debugging categories for strategic visibility
- One-command install hooks; optional git branch sync keeps cost data versioned with your code
- Built for engineering leaders who need to answer: is AI spend justified?
The Bottom Line
CC-Ledger fills a gap that's been wide open since AI coding assistants became line items in engineering budgets. Local-first storage means no vendor lock-in, and the git branch sync option is clever—it makes cost data auditable and version-controlled without forcing teams into another SaaS platform. If you're running Claude Code at scale and don't know your p99 session cost, you should probably find out before finance asks.