# CodeBurn

> An open-source CLI and TUI dashboard that tracks AI coding token usage and costs across Claude Code, Codex, Cursor, OpenCode, Pi, and GitHub Copilot.

CodeBurn is an open-source CLI tool that gives developers a clear view of where their AI coding tokens and money go. It reads session data directly from disk — no wrapper, no proxy, no API keys required — and presents an interactive terminal dashboard with gradient charts, responsive panels, and keyboard navigation. It supports Claude Code, Codex (OpenAI), Cursor, OpenCode, Pi, and GitHub Copilot via a provider plugin system, and fetches live pricing from LiteLLM for accurate cost calculations across all models.

- **Interactive TUI Dashboard** — *Run `codeburn` to launch a full terminal UI with daily cost charts, per-project, per-model, and per-activity breakdowns, navigable with arrow keys and keyboard shortcuts.*
- **Multi-Provider Support** — *Auto-detects Claude Code, Codex, Cursor, OpenCode, Pi, and GitHub Copilot session data on disk; toggle between providers with the `--provider` flag or press `p` in the dashboard.*
- **13-Category Task Classifier** — *Deterministically classifies every AI turn into categories like Coding, Debugging, Feature Dev, Refactoring, Testing, and more — no LLM calls needed.*
- **One-Shot Rate Tracking** — *Measures the percentage of edit turns that succeeded without retries, so you can see where the AI nails it first try vs. burns tokens on edit/test/fix loops.*
- **Optimize Command** — *Run `codeburn optimize` to scan sessions and your `~/.claude/` setup for waste patterns (low cache hits, unused MCP servers, bloated CLAUDE.md files) and get copy-paste fixes with estimated token and dollar savings.*
- **CSV/JSON Export** — *Export full dashboard data as structured JSON or CSV with `codeburn export` or `codeburn report --format json`, pipeable to `jq` for custom filtering.*
- **macOS Menu Bar Widget** — *Install a SwiftBar plugin with `codeburn install-menubar` to see today's cost in the menu bar with a flame icon and a dropdown activity breakdown.*
- **Multi-Currency Support** — *Display costs in any of 162 ISO 4217 currencies; exchange rates are fetched from Frankfurter (European Central Bank data) and cached for 24 hours.*
- **Project Filtering** — *Use `--project` and `--exclude` flags on any command to scope results to specific projects or exclude noise.*
- **No API Keys Required** — *Works entirely by reading local session files; pricing data is auto-cached from LiteLLM with hardcoded fallbacks for Claude and GPT-5 models.*

## Features
- Interactive TUI dashboard with gradient charts and keyboard navigation
- Multi-provider support: Claude Code, Codex, Cursor, OpenCode, Pi, GitHub Copilot
- 13-category deterministic task classifier
- One-shot success rate tracking per activity type
- Optimize command for waste detection and copy-paste fixes
- CSV and JSON export
- macOS menu bar widget via SwiftBar
- Multi-currency support (162 ISO 4217 currencies)
- Project filtering with --project and --exclude flags
- No API keys or proxies required
- LiteLLM pricing with 24-hour auto-cache
- Provider plugin system for extensibility
- Auto-refresh mode
- Per-model, per-project, per-activity cost breakdowns
- MCP server usage tracking

## Integrations
Claude Code, Codex (OpenAI), Cursor, OpenCode, Pi, GitHub Copilot, LiteLLM, SwiftBar, xbar, Frankfurter (exchange rates), jq

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, CLI

## Pricing
Open Source

## Version
v0.7.1

## Links
- Website: https://github.com/AgentSeal/codeburn
- Documentation: https://github.com/AgentSeal/codeburn#readme
- Repository: https://github.com/AgentSeal/codeburn
- EveryDev.ai: https://www.everydev.ai/tools/codeburn
