Reads existing local session files from 32 supported AI coding tools to break down token usage and costs by task, model, tool, and project. It operates locally without a proxy or API keys and provides waste scanning, budget hooks, and git yield tracking.
Project overview
Task categorization is fully deterministic without relying on LLM calls, and the tool reads existing session files directly rather than requiring a proxy or wrapper.
Project type
AI Coding · Evaluation & Observability · Infrastructure
Use cases
Coding & Development
Deployment
Refer to project documentation
License
MIT
Best for
Developers and operations teams who use supported AI coding tools and need deterministic, local analysis of token usage and cost breakdowns.
Teams using Claude Code who want to monitor session costs in real-time with configurable spending caps.
Key capabilities
Reads local session files to break down AI token usage and costs by task, model, tool, and project.
Scans sessions and setup files for waste patterns, providing interactive or automated fixes with undo support.
Installs opt-in hooks into Claude Code to watch session costs in real-time with soft, hard, and checkpoint caps.
Runs a local MCP server over stdio exposing usage and savings data to AI agents.
Compares AI models on performance and efficiency metrics like one-shot rate, retry rate, and cost per edit.
Correlates AI sessions with git commits to categorize spend as productive, reverted, or abandoned.
Provides a local browser dashboard with charts displaying the same breakdowns as the TUI.
Provides an always-on ambient view via a macOS menu bar app and a GNOME Shell extension.
Limitations and risks
Yield tracking requires a git repository to correlate sessions with commits.
Team telemetry sync is in preview and the protocol may change between releases.
Estimated savings from optimizations are compared against reality only after 3 days, initially relying on estimates.
Getting started
Setup difficulty is easy because it can be run instantly without installation using `npx codeburn`. Multiple straightforward installation options, such as npm or brew, are also available. It requires Node.js 22.13+ and at least one supported tool with session data on disk.
Evidence and sources
README: CodeBurn is a free, open-source, local-first tool that tracks AI coding token usage and cost across 32 tools and agents (Claude Code, Cursor, Codex, Gemini, Grok and more), broken…
README: **Run it instantly**, no install needed: ```bash npx codeburn ``` That opens the interactive dashboard (last 7 days by default). Arrow keys switch periods, `q` quits.
README: The bill tells you the total. It never tells you that half of it went to conversation instead of code, or that an expensive model burned your budget on work a cheaper one would ha…
README: It reads the session files your tools already write to disk and breaks down every token and dollar by **task, model, tool, and project**, across **32 AI tools**.
README: `codeburn optimize` scans your sessions and your `~/.claude/` setup for waste patterns