AI支出追踪 是 AI Skill Hub 本期精选AI工具之一。已获得 8.1k 颗 GitHub Star,综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
可视化AI支出,实时跟踪Token使用和成本
AI支出追踪 是一款基于 TypeScript 开发的开源工具,专注于 ai-coding、cost-tracking、typescript 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
可视化AI支出,实时跟踪Token使用和成本
AI支出追踪 是一款基于 TypeScript 开发的开源工具,专注于 ai-coding、cost-tracking、typescript 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:npm 全局安装 npm install -g codeburn # 方式二:npx 直接运行(无需安装) npx codeburn --help # 方式三:项目依赖安装 npm install codeburn # 方式四:从源码运行 git clone https://github.com/getagentseal/codeburn cd codeburn npm install npm start
# 命令行使用
codeburn --help
# 基本用法
codeburn [options] <input>
# Node.js 代码中使用
const codeburn = require('codeburn');
const result = await codeburn.run(options);
console.log(result);
# codeburn 配置说明 # 查看配置选项 codeburn --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export CODEBURN_CONFIG="/path/to/config.yml"
<p align="center"> <a href="https://claude.com/open-source-max"><img src="https://img.shields.io/badge/Claude_for_Open_Source-Recipient-da7756?style=for-the-badge&labelColor=1a1a1a" alt="Claude for Open Source Recipient" /></a> </p>
<p align="center"> <img src="https://raw.githubusercontent.com/getagentseal/codeburn/main/assets/providers.png" alt="CodeBurn" width="420" /> </p>
<p align="center"><strong>See where your AI spend goes.</strong></p>
<p align="center"> <a href="https://www.npmjs.com/package/codeburn"><img src="https://img.shields.io/npm/v/codeburn.svg?color=F97316" alt="npm version" /></a> <a href="https://www.npmjs.com/package/codeburn"><img src="https://img.shields.io/npm/dt/codeburn.svg?color=F97316" alt="total downloads" /></a> <a href="https://github.com/getagentseal/codeburn/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/codeburn.svg?color=F97316" alt="license" /></a> <a href="https://github.com/getagentseal/codeburn"><img src="https://img.shields.io/badge/node-%3E%3D22-F97316.svg" alt="node version" /></a> <a href="https://discord.gg/w2sw8mCqep"><img src="https://img.shields.io/badge/discord-join-F97316?logo=discord&logoColor=white" alt="Discord" /></a> <a href="https://github.com/sponsors/iamtoruk"><img src="https://img.shields.io/badge/sponsor-♥-F97316?logo=github" alt="Sponsor" /></a> </p>
You pay for Claude, Codex, Cursor, and a stack of other AI tools. The bill tells you the total. It never tells you that half of it went to conversation instead of code, or that an expensive model burned your budget on work a cheaper one would have one-shot.
CodeBurn does. It reads the session files your tools already write to disk and breaks down every token and dollar by task, model, tool, and project, across 28 AI tools.
Everything runs locally. No wrapper, no proxy, no API keys, nothing leaves your machine. Pricing comes from LiteLLM, refreshed daily.
<p align="center"> <img src="https://raw.githubusercontent.com/getagentseal/codeburn/main/assets/dashboard.jpg" alt="CodeBurn TUI dashboard" width="760" /> </p> <p align="center"><em>A week across every tool you use, in one screen.</em></p>
<p align="center"> <a href="#quick-start">Quick start</a> · <a href="#find-and-fix-waste">Find waste</a> · <a href="#compare-models">Compare models</a> · <a href="#track-what-shipped">Track what shipped</a> · <a href="#supported-tools">Supported tools</a> · <a href="#commands">Commands</a> · <a href="#features">Features</a> · <a href="#how-it-reads-your-data">How it reads data</a> </p>
<details> <summary><strong>Pricing, task categories, plans, currency, filtering, and more</strong></summary>
Run it instantly, no install needed:
npx codeburn
That opens the interactive dashboard (last 7 days by default). Arrow keys switch periods, q quits. That is the 30-second version. You now know where your AI budget goes.
Install it for a permanent codeburn command:
npm install -g codeburn
Also runs via bunx codeburn or dx codeburn, or brew install codeburn on macOS.
Menu bar app for macOS, with your spend always in the menu bar:
codeburn menubar
Requires Node.js 22.13+ and at least one supported tool with session data on disk. For Cursor and OpenCode, better-sqlite3 installs automatically.
<details> <summary><strong>Override data directories and paths</strong></summary>
| Variable | Description |
|---|---|
CLAUDE_CONFIG_DIR | Override Claude Code data directory (default: ~/.claude) |
CLAUDE_CONFIG_DIRS | OS-delimited list of Claude data directories to scan together (e.g. ~/.claude-work:~/.claude-personal). Sessions merge into one row per project. Overrides CLAUDE_CONFIG_DIR when set. |
CODEX_HOME | Override Codex data directory (default: ~/.codex) |
CODEBUFF_DATA_DIR | Override Codebuff data directory (default: ~/.config/manicode) |
FACTORY_DIR | Override Droid data directory (default: ~/.factory) |
KIMI_SHARE_DIR | Override Kimi Code CLI share directory (default: ~/.kimi) |
KIMI_MODEL_NAME | Override Kimi model name when Kimi sessions do not record the model |
QWEN_DATA_DIR | Override Qwen data directory (default: ~/.qwen/projects) |
VIBE_HOME | Override Mistral Vibe home directory (default: ~/.vibe) |
WARP_DB_PATH | Override Warp database path (default: Warp Stable, then Warp Preview) |
</details>
codeburn compare # interactive model picker (default: last 6 months)
codeburn compare -p week # last 7 days
codeburn compare -p today # today only
codeburn compare --provider claude # Claude Code sessions only
Which model is actually better for your work? Press c in the dashboard, or run codeburn compare. Arrow keys switch periods, b to return.
<p align="center"> <img src="https://raw.githubusercontent.com/getagentseal/codeburn/main/assets/compare.jpg" alt="CodeBurn compare" width="760" /> </p>
| Section | Metric | What it measures |
|---|---|---|
| Performance | One-shot rate | Edits that succeed without retries |
| Performance | Retry rate | Average retries per edit turn |
| Performance | Self-correction | Turns where the model corrected its own mistake |
| Efficiency | Cost per call | Average cost per API call |
| Efficiency | Cost per edit | Average cost per edit turn |
| Efficiency | Output tokens per call | Average output tokens per call |
| Efficiency | Cache hit rate | Proportion of input from cache |
Also compares per-category one-shot rates, delegation rate, planning rate, average tools per turn, and fast mode usage.
优雅的TUI界面,清晰展示AI支出
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,AI支出追踪 在AI工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | codeburn |
| Topics | ai-codingcost-trackingtypescript |
| GitHub | https://github.com/getagentseal/codeburn |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-06-19 · 更新时间:2026-06-19 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。