Token usage in AI coding can often be a black box, leaving developers guessing where their budgeting truly goes. Enter CodeBurn: a TUI dashboard giving developers local, deterministic insight into their Claude Code sessions. By processing raw JSONL logs, it reveals cost breakdowns across 13 task categories. CodeBurn’s data shows that up to 56% of costs stem from conversations, meaning significant savings might be hiding in plain sight.

A Local-First Approach to Cost Analysis

CodeBurn distinguishes itself by using local session data rather than cloud-based analytics. This privacy-conscious tool parses transcripts found in Claude’s local directories, effectively categorizing session activities like coding and debugging. This process yields a fine-grained view of token distribution without exposing data to third-party servers—ensuring security alongside insight.

The Power of Categorization

Breaking down activities into 13 distinct categories reveals surprising insights: actual coding tasks only account for roughly 20% of AI sessions. Meanwhile, conversation turns, which often involve less productive chat, can devour up to 56% of a developer's budget. By identifying these 'hidden costs', CodeBurn allows developers to make informed adjustments to reduce unnecessary expenditure.

Tech Stack and TUI Interactivity

Built with Node.js, TypeScript, and Ink, CodeBurn offers a rich TUI experience. It supports cross-platform operations, allowing users to navigate session data via straightforward terminal commands. The integration with LiteLLM to cache model pricing ensures that cost calculations are both accurate and up-to-date, aiding developers in maintaining control over their AI project expenses.

Community Insights and Feedback

CodeBurn’s community reception highlights its utility in providing a detailed, local-first analysis of AI spend. Users praise its ability to highlight inefficiencies. However, requests for expanded features like broader agent support and task success metrics are notable. These enhancements could further elevate the tool’s utility for diverse developer environments.

Real-time cost observability is no longer optional; it's essential. CodeBurn transforms opaque token use into actionable insights, empowering developers to optimize AI sessions without sacrificing functionality.

Here's what you can do with this today: Run npx codeburn to audit your Claude Code sessions, pinpoint high-cost activities, and adjust your usage patterns to reduce token wastage.