Linux command
codeburn 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Launch the interactive dashboard
codeburn
Show today's usage
codeburn today
Show this month's usage
codeburn month
Generate a rolling 30-day report
codeburn report -p 30days
Filter to a single provider
codeburn report --provider [claude]
Export raw data
codeburn export --format [json] --from [2026-01-01] --to [2026-01-31]
Find waste patterns
codeburn optimize
Run without installing
npx codeburn today
说明
codeburn is a local analytics tool that reads the session files your AI coding assistant already writes to disk — Claude Code, Codex, Cursor, OpenCode, Pi, and GitHub Copilot — and turns them into cost, token, and activity breakdowns. Nothing is uploaded: pricing is taken from LiteLLM, exchange rates from Frankfurter, and all analysis happens against the files in _~/.claude/_, _~/.cursor/_, and friends. Beyond raw numbers, codeburn optimize inspects your agent configuration for eleven common waste patterns (over-permissive hooks, unused MCP servers, duplicated system prompts, etc.) and prints copy-paste-ready fixes. The menubar subcommand installs a small native app on macOS that keeps the current day's spend visible at all times.
参数
- --provider _NAME_
- Filter by provider: _claude_, _codex_, _cursor_, _opencode_, _pi_, _copilot_.
- --project _NAME_
- Include a project by substring match (repeatable).
- --exclude _NAME_
- Exclude a project (repeatable).
- --format _TYPE_
- Output format for non-interactive commands: _table_ or _json_.
- --from _YYYY-MM-DD_
- Start date for a custom window.
- --to _YYYY-MM-DD_
- End date for a custom window.
- --refresh _SECONDS_
- Auto-refresh interval in the dashboard (default 30, use 0 to disable).
- -p _PERIOD_
- Period for report/optimize: _today_, _week_, _30days_, _all_.
FAQ
What is the codeburn command used for?
codeburn is a local analytics tool that reads the session files your AI coding assistant already writes to disk — Claude Code, Codex, Cursor, OpenCode, Pi, and GitHub Copilot — and turns them into cost, token, and activity breakdowns. Nothing is uploaded: pricing is taken from LiteLLM, exchange rates from Frankfurter, and all analysis happens against the files in _~/.claude/_, _~/.cursor/_, and friends. Beyond raw numbers, codeburn optimize inspects your agent configuration for eleven common waste patterns (over-permissive hooks, unused MCP servers, duplicated system prompts, etc.) and prints copy-paste-ready fixes. The menubar subcommand installs a small native app on macOS that keeps the current day's spend visible at all times.
How do I run a basic codeburn example?
Run `codeburn` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --provider _NAME_ do in codeburn?
Filter by provider: _claude_, _codex_, _cursor_, _opencode_, _pi_, _copilot_.