Ever opened your Claude Code or Cursor bill and thought, “I know I spent this much, but I have zero idea on what”? Yeah, same here. Month after month, a single number — $X,XXX.XX — with zero breakdown. Which model burned the most? Which project ran up the bill? That dumb conversation I left running overnight?
CodeBurn (8,428 ★, MIT) is a local-first CLI that reads your existing session files and breaks down every token and dollar by task, model, tool, and project across 31 AI coding tools. And it runs with a single command — no install, no config, no data leaving your machine.
So I ran it. And honestly? And the results? Eye-opening.
A Single Command, Zero Setup
npx codeburn — that’s the whole install process. No npm install -g, no API key, no config file. Just run it, and it scans the local session data from every supported tool on your machine: Claude Code, Cursor, Codex, Gemini, Grok, Cline, Continue.dev, OpenCode — the list goes on.
And it took me about 30 seconds to see my first dashboard.
The TUI opens right in your terminal. A clean table shows cost, tokens, and calls per tool for the last 7 days. Arrow keys switch periods — 7 days, 30 days, this month, all time. That’s it. No learning curve. So you see your burn rate before your coffee gets cold.
But the real value is in the subcommands. Here’s what each one does:
| Command | What It Shows |
|---|---|
codeburn overview | Month-at-a-glance: totals, tool breakdown, top models, top projects, per-day table |
codeburn optimize | Waste patterns: files re-read, low edit ratio, unused MCP servers, bloated CLAUDE.md |
codeburn compare | Model performance comparison: one-shot rate, cost per edit, retry rate, cache hit rate |
codeburn yield | Did the spend actually ship? Correlates AI sessions with git commits |
codeburn web | Local web dashboard at localhost:4747 with interactive charts |
So I ran codeburn overview first. And it prints a clean, copy-pasteable table — totals for the month, breakdown by tool, top models, highest-spend days.
What the Numbers Told Me
My breakdown: 95% Claude Code, 4% Codex. Pretty much what I expected. But the per-project view showed something I didn’t expect: one project was eating 42% of total token spend — a side project I’d barely touched in two weeks. Turns out Claude was reloading the same codebase context every single session because I never pinned a CLAUDE.md. Sound familiar? I covered exactly this pattern in my Claude Code memory review — setting up memory persistence cuts context waste dramatically.
So I ran codeburn optimize. And that’s where it got interesting.
The optimize scan found about 18% of my Claude costs came from files it re-read across sessions — same files, same content, loaded fresh each time. A classic “I know I should fix this” pattern. CodeBurn even gives you the exact fix: a one-line @-import path in CLAUDE.md that cuts out 90% of that waste.
But the bigger find was in codeburn compare. I had been using Claude Sonnet for everything — boilerplate generation, refactoring, quick scripts, the works. The compare view showed that a cheaper model (Opus Mini) hit the same one-shot rate on my boilerplate tasks — 94% vs 96% — at about 40% of the cost. Swapping just those tasks saved me around $80/month. That’s $960 a year for a five-minute config change.
And codeburn yield? It tracks whether your spend actually shipped. Sessions that ended in git commits to main are “productive.” Sessions with no commits at all are “abandoned.” Mine was about 72% productive — meaning over a quarter of my AI spend went into conversations that never produced committed code. That’s the kind of number you can’t unsee.
What to Watch Out For
CodeBurn only works if you have session data to read. No session files on disk, no output. And the optimize mode is clearly tuned for Claude Code — it found fewer actionable patterns for Cursor and Codex users. If you run a more diverse toolchain like the ECC agent harness, you might not get as much mileage out of the optimize subcommand.
Plus, the menubar app is macOS-only right now. Linux users get the TUI and web dashboard, but no system tray integration. Node.js 22.13+ is also required, so if you’re on an older LTS, you’ll need to upgrade first.
Still, for a free MIT-licensed tool that runs entirely on your machine with zero data leaving your network? It’s the cleanest way I’ve seen to audit AI coding costs.
Bottom Line
If you use any AI coding tools and you don’t know where your money goes, run npx codeburn. It takes 30 seconds to start, gives you hard numbers instead of gut feelings, and the optimize suggestions alone can save you hundreds a month. I found about $400/month in waste across three categories — redundant context loading, wrong model choice, and abandoned sessions. That’s real money.