CodeBurn CLI
A CLI and MCP server that tally token spend across 41 tools and agents, break it down by project and model, and help cut wasted tokens
- 11,782 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Reads on-disk agent session files, which can contain conversation content
- optimize --apply modifies configuration files, though with a backup
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/codeburnDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Reads on-disk agent session files, which can contain conversation content
- optimize --apply modifies configuration files, though with a backup
This is third-party code. Review the repository files before installing.
What it does
CodeBurn reads the session files that Claude Code, Codex, Cursor and other agents already write to disk and prices them by token and model. The codeburn terminal command shows today's spend plus tables by tool, model, project and task. codeburn optimize looks for sources of wasted tokens, such as a file the agent re-reads on every turn or an MCP server installed months ago and never called, and can apply a fix with an undo path. codeburn guard install adds Claude Code hooks that warn and then stop a session once it passes a spending threshold. A desktop app, a menu bar icon and an MCP server for asking from inside the agent conversation are also included.
Who it is for. For developers and teams paying for several coding agent subscriptions who want to see where the tokens actually go.
Good fit when
- You want to know how much an agent's work cost for a day, project or task
- You want to find a file, MCP server or setting that wastes tokens on every run
- You want a spend cap on a Claude Code session right from the terminal
Not a fit when
- You use only one tool that already gives you a detailed cost breakdown
- There is no access to on-disk session files, for example everything runs in an isolated container that keeps no history
Example request
Run codeburn optimize and show me where this project is wasting tokensLimitations
All figures come from local session files the agents already write, so tools outside that list produce no data. Guard currently covers only Claude Code. The CLI and MCP server make no network calls, but the desktop app and web mode need a separate install.
How to disable. Remove the package: npm uninstall -g codeburn or brew uninstall codeburn. Guard hooks come out with codeburn guard uninstall, and the MCP server is removed with claude mcp remove codeburn.
FAQ
Do I need an account or a key?
No, there is no sign-up, CodeBurn reads session files that already exist on disk and sends nothing anywhere.
What does codeburn optimize --apply do?
It applies the found configuration fixes after backing up the affected files, and codeburn act undo --last reverts the change.
Discussion
No questions or reviews yet.
Related
CLI toolsA local CLI that totals tokens and dollars per repo, branch and model from Claude Code, Codex and OpenCode transcripts
Token and cost reports for Claude Code, Codex, Gemini CLI and other agents from local logs, by day, month and session
Splitrail tracks tokens and cost for Claude Code, Codex, Cline, OpenCode and more agents from local logs and serves them over MCP
A Windows and Linux tray app shows Claude rate limits and reports the remaining quota to an agent via a built-in MCP server.
A CLI built on ccusage that syncs your daily agent token usage to a public profile and leaderboard on tokenmaxxing.sh
A limits and token spend monitor for Claude Code, Codex, Antigravity and Grok CLI: macOS menu bar, Windows tray, HTML reports
README in short
The README frames CodeBurn as a way to see where the AI coding bill actually goes: it reads the session files of 41 supported tools and prints a breakdown by tool, model, project and task in the terminal, the desktop app, the menu bar or the browser. It separately covers optimize for finding wasted-token sources, guard for spend caps in Claude Code, and an MCP server for asking from inside the agent conversation. Install options are npx, npm, brew or separate macOS, Windows and Linux builds. MIT licensed.