About this project

CodeBurn is a free, open-source, local-first tool that tracks AI coding token usage and cost across 41 tools and agents (Claude Code, Cursor, Codex, Gemini, Grok, and more). It reads the session files that AI tools already write to disk—no proxy, API keys, or data uploads required. Pricing data is sourced from LiteLLM and refreshed daily. It is available across multiple surfaces: a terminal dashboard (npx codeburn), a local web dashboard (codeburn web), a macOS menubar app, a Windows tray app, and a cross-platform desktop app. A Capacity Dock feature shows live provider usage rings on the screen edge. Key capabilities include: - Overview: Copy-pasteable summaries of AI spend by tool, model, project, and day, with support for custom date ranges and lifetime history. - Optimize: Scans sessions and Claude Code setup for waste patterns such as re-read files, low read:edit ratios, unused MCP servers, ghost agents/skills, and bloated CLAUDE.md files. Findings are grouped by urgency and include estimated token/dollar savings with ready-to-paste fixes. An --apply flag can interactively apply config-class fixes, with full journaling and undo support. A report feature later compares estimated savings against actual session results. - Guard: Installs opt-in hooks into Claude Code to watch session cost in real-time, with soft caps, hard caps, checkpoints, and session openers for flagged projects. - Compare: Compares models on one-shot rate, retry rate, self-correction, cost per call/edit, output tokens, and cache hit rate. - Yield: Correlates AI sessions with git commits by timestamp to categorize spend as productive, reverted, abandoned, or ambiguous. - Device sharing: Combines usage totals across machines on the same local network via PIN-authorized pairing. The tool requires Node.js 22.13+ and at least one supported tool with session data on disk. It is installable via npm, npx, bunx, pnpm, or Homebrew.