# CodeBurn

> Local token and cost accounting across 41 AI coding tools

- Category: Evaluation & Production Ops / Observability & LLMOps
- Language: TypeScript
- Licence: MIT
- Repository: https://github.com/getagentseal/codeburn
- Website: https://codeburn.app/
- Canonical page: https://ai-tldr.dev/tools/codeburn/

## In short

CodeBurn answers a question most LLM observability tools cannot: where your AI coding budget actually goes across every tool you use. It sits in the Observability & LLMOps category of the Evaluation & Production Ops tools and is open-source, written in TypeScript and licensed MIT. To get started: run it.

## Overview

CodeBurn answers a question most LLM observability tools cannot: where your AI coding budget actually goes across every tool you use. Rather than sitting in the request path as a proxy, it reads the session files that coding agents already write to disk — Claude Code's JSONL transcripts, Codex rollouts, Cursor's and Zed's SQLite stores, Gemini CLI chat logs, Copilot session state and so on — and reconstructs spend from them. No API keys, no proxy, and nothing leaves the machine.

Coverage spans 41 tools and agents including Claude, Cursor, Codex, Copilot, Gemini, Grok, Cline, Goose, Crush, Warp, Roo Code, Kilo Code, Qwen, Kimi, OpenCode and Zed. Breakdowns run by model, provider, project, task category and activity type, with input, output, cache-read and cache-write tokens counted separately — the distinction that usually explains a surprising bill.

It also goes past accounting into diagnosis. A one-shot rate measures how often edits land without retries; waste detection flags re-read files, low edit ratios, unused MCP servers and bloated configs; yield tracking correlates spend against git commits to separate productive work from abandoned or reverted code. Findings can be applied interactively with full undo. Interfaces include a terminal TUI, a web dashboard, a native desktop app and a menubar widget.

## What it does

- Reads session files already on disk across 41 coding tools — no API keys, proxy, or data egress
- Cost and token breakdowns by model, provider, project, task category and activity type
- Separate input / output / cache-read / cache-write token accounting
- One-shot success rate and retry-cycle measurement per tool and model
- Waste detection (re-read files, low edit ratios, unused MCP servers, bloated configs) with interactive, undoable fixes
- Yield tracking against git history, plus optional budget caps and alerts for Claude Code sessions
- Terminal TUI, web dashboard, desktop app and menubar/tray widget

## Getting started

CodeBurn needs Node.js 22.13+ and at least one supported tool with session data already on disk. There is nothing to configure — it discovers the sessions itself.

1. Run it

   npx is enough for a first look; install globally to keep it around.

```bash
npx codeburn
```

2. Install globally

   Puts the codeburn command on your PATH.

```bash
npm install -g codeburn
```

3. Open a richer view

   The web dashboard and the menubar widget are alternatives to the terminal UI.

```bash
codeburn web
codeburn menubar
```

4. Find and fix waste

   optimize surfaces findings and can apply them interactively, with undo.

```bash
codeburn optimize
```

5. Compare models and check yield

   compare puts model efficiency side by side; yield correlates spend with git commits to show productive versus abandoned work.

```bash
codeburn compare
codeburn yield
```

## When to use it

- Find out which model and which project are responsible for an unexpected AI coding bill
- Compare one-shot edit success rates between models before standardising a team on one
- Audit AI spend without routing any traffic through a third-party proxy or handing over API keys
- Separate spend that turned into merged commits from spend on work that was reverted or abandoned
