Noureddine RAMDI / CodeBurn: local-first terminal dashboard for AI coding token costs and efficiency

Created Sat, 23 May 2026 20:41:14 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

AgentSeal/codeburn

CodeBurn tackles a common developer pain point: understanding the costs and efficiency of AI coding tools without sending your data off your machine or relying on cloud proxies. It delivers a local-first terminal UI dashboard that reads session data from disk, pricing every API call and breaking down usage by deterministic task categories — all without calling any language models or requiring API keys.

What CodeBurn does and how it manages AI coding cost tracking

CodeBurn is a TypeScript CLI tool running on Node.js 20 or later. It supports 19 AI coding providers, including Claude Code, Codex, Cursor, and Gemini CLI. Instead of wrapping or proxying API calls, it accesses session data stored locally by these tools in JSON, JSONL, SQLite, or VS Code storage formats.

The architecture is modular: each provider is implemented as its own TypeScript module in src/providers/, making it straightforward to add support for new tools. CodeBurn reads and parses session files directly from disk, extracting token counts, metadata, and usage patterns.

To price the API calls, CodeBurn uses LiteLLM — a lightweight local pricing engine — caching prices for 24 hours to avoid repeated lookups. This local-only approach ensures no data leaves your machine, preserving privacy and eliminating the need for API keys or proxies.

The dashboard organizes data by 13 deterministic task categories derived from observed usage patterns and keywords in user messages. Notably, this classification happens without any calls to language models, relying purely on tool usage signals and keyword matching. This deterministic approach avoids latency and complexity, making it well suited for local observability.

Besides cost tracking, CodeBurn detects retry patterns common in AI-assisted coding workflows — the edit → test → fix cycle. It measures a “one-shot” success rate: the percentage of edit turns that succeed without retries, providing a tangible metric of AI coding efficiency.

The tool offers multiple views including an interactive terminal dashboard, detailed reports, model comparisons, optimization suggestions, and yield analysis distinguishing productive spend from wasted tokens. The dashboard refreshes automatically every 30 seconds by default, reflecting new session data as you work.

Technical strengths and design tradeoffs

One of CodeBurn’s key strengths is its local-first, zero-cloud design. By reading session data directly from disk, it avoids the latency, reliability issues, and privacy concerns that come with proxies or cloud APIs. This choice trades off real-time granularity but gains complete user control and offline capability.

The modular provider architecture keeps the codebase clean and extensible. Each AI coding tool is supported by a dedicated TypeScript module responsible for parsing its session format. This separation simplifies maintenance and adding support for new providers.

Deterministic task classification without any LLM calls is a smart design decision. While it sacrifices some nuance from semantic understanding, it avoids the unpredictability, latency, and external dependencies that come with invoking language models. Instead, keyword matching and usage patterns provide a reliable, repeatable categorization scheme.

LiteLLM’s local pricing engine integration with caching balances accuracy and performance. Pricing API calls locally with 24-hour caching minimizes redundant computations and network calls, keeping the tool responsive.

The detection of retry patterns to measure one-shot success rates adds meaningful insight for developers trying to optimize AI coding workflows. This metric highlights wasted tokens due to retries, which is a cost that often goes unnoticed.

However, the local-first approach means the tool depends on the availability and consistency of session data on disk, which varies between AI coding tools. Also, since it does not introspect API calls in real time, some usages might be missed or delayed until session files are flushed.

The TUI dashboard prioritizes terminal users and may not suit those preferring graphical interfaces. Still, it fits well into developer workflows that favor CLI tools.

Quick start

Requirements

  • Node.js 20+
  • At least one supported AI coding tool with session data on disk
  • For Cursor and OpenCode support, better-sqlite3 is installed automatically as an optional dependency

Install

npm install -g codeburn

Or with Homebrew:

brew tap getagentseal/codeburn
brew install codeburn

Or run directly without installing:

npx codeburn
bunx codeburn
dx codeburn

verdict

CodeBurn is relevant for developers deeply invested in AI-assisted coding who want full cost transparency and efficiency tracking without compromising privacy or relying on cloud services. Its local-first architecture and deterministic task classification make it a solid choice for those comfortable with CLI tools and who have the supported AI coding tools installed.

The tradeoff is that the tool depends on the availability and format of session files on disk, which can vary and may not capture real-time usage perfectly. Also, the terminal UI might not appeal to everyone.

That said, the combination of multi-provider support, local pricing with caching, and one-shot success rate metrics offers a unique and practical observability tool for AI coding workflows. For developers juggling multiple AI assistants and looking to optimize token spend and productivity, CodeBurn provides actionable insights without sending data off-machine.

It’s worth exploring if you want to bring AI cost tracking fully under your control and understand your AI coding efficiency in detail, all from the comfort of your terminal.


→ GitHub Repo: AgentSeal/codeburn ⭐ 6,893 · TypeScript