Tracks AI coding token usage and costs locally by reading existing session files across 32 supported AI tools, providing detailed cost breakdowns and actionable optimizations to reduce wasted spend.
Project overview
Tracks AI coding token usage and costs locally by reading existing session files across 32 supported AI tools, providing detailed cost breakdowns and actionable optimizations to reduce wasted spend.
Project type
AI Coding · Evaluation & Observability · Infrastructure
Use cases
Coding & Development
Deployment
Refer to project documentation
License
MIT
Best for
Developers, operations teams, and enterprise teams using supported AI coding tools who need local visibility into token usage and costs.
Users needing deterministic task categorization of AI coding sessions without relying on additional LLM calls.
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
Correlating AI sessions with git commits to categorize spend as productive, reverted, or abandoned requires a git repository.
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
The tool can be run instantly without installation using `npx codeburn`, or installed via standard package managers like npm or brew. 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