The modern developer's toolkit has expanded into a sprawling ecosystem of AI agents and editors. Between the seamless autocomplete of Cursor, the terminal-driven autonomy of Claude Code, and the raw power of OpenAI's Codex, the friction of writing code has vanished. However, this convenience comes with a hidden tax. For many, using these tools feels like leaving a faucet running in a dark room; you know the water is flowing, but you have no idea how much is being wasted until the monthly bill arrives. The industry has shifted from worrying about lines of code to worrying about token windows, yet most developers are still flying blind when it comes to the actual financial cost of their AI-assisted workflows.
Localized Tracking for the AI Toolchain
CodeBurn addresses this visibility gap by providing a terminal-based dashboard designed specifically to track token usage and costs across 18 different AI coding tools. Unlike many monitoring solutions that require a middleman, CodeBurn operates on a local-first philosophy. It does not utilize external servers, wrappers, or proxies to intercept traffic, nor does it require the complex configuration of API keys to monitor spending. Instead, it reads session data directly from the local disk, ensuring that sensitive development data never leaves the machine. To calculate actual costs, it leverages pricing data from LiteLLM, a library known for unifying various LLM APIs into a single management interface.
For developers looking to integrate this into their environment, the installation process is streamlined for the terminal. Users can deploy the tool using npm:
npm install -g codeburnAlternatively, macOS users can utilize Homebrew for a quicker setup:
brew install codeburnBy keeping the processing local, CodeBurn eliminates the security risks associated with third-party proxies while providing a real-time window into how tools like Claude Code and Cursor are consuming resources in the background.
From Cost Tracking to Productivity Intelligence
While knowing the total spend is useful, the real value of CodeBurn lies in its ability to distinguish between productive consumption and systemic waste. Most developers previously had to manually sift through massive log files to identify why a specific session spiked in cost. CodeBurn automates this through the `codeburn optimize` command. This feature scans for specific waste patterns, such as files being read repeatedly by the AI, unused MCP (Model Context Protocol) servers that are still drawing resources, or overly bloated CLAUDE.md files that inflate every prompt's token count.
Rather than just flagging errors, the tool assigns a health grade from A to F based on the current configuration. It provides the estimated token savings and the corresponding dollar amount that could be recovered by implementing the suggested fixes. These optimizations are delivered as copy-paste snippets, allowing developers to prune their context windows and reduce costs immediately.
The analysis extends further into performance benchmarking via the `codeburn compare` command. This allows developers to place different models side-by-side to analyze one-shot success rates, retry rates, cost per call, and cache hit rates. This transforms the conversation from which model feels better to which model is mathematically more efficient for a specific codebase.
Perhaps the most critical insight comes from the `codeburn yield` command. This feature bridges the gap between AI spending and actual output by linking AI sessions to Git commits. By analyzing the relationship between LLM calls and the resulting code changes, CodeBurn categorizes work into 13 distinct types, including coding, debugging, feature development, and testing. This classification is performed deterministically, meaning it does not require additional LLM calls to categorize the data. This allows a developer to see if a high-cost session actually resulted in a merged feature or if the tokens were wasted on code that was eventually discarded or reverted.
To ensure this data is accessible during the flow of work, CodeBurn includes a macOS menu bar integration. By running `codeburn menubar`, developers can keep a persistent eye on their daily spend via a small icon in the system tray. For global teams, the tool integrates the Frankfurter API to support 162 different currencies. A developer in Korea, for example, can instantly switch the display to local currency using:
codeburn currency KRWFor those integrating these insights into larger CI/CD pipelines or automation scripts, the tool supports advanced filtering options such as `--provider`, `--project`, and `--exclude`, and can output data in a machine-readable format using `--format json`. Distributed under the MIT license, the full documentation and source code are available on the GitHub repository.
True efficiency in the age of AI is not about spending the least amount of money, but about maximizing the value of every token generated.




