[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-621":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":9,"pushedAt":9,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":15,"starSnapshotCount":15,"syncStatus":39,"lastSyncTime":40,"discoverSource":41},621,"codeburn","getagentseal\u002Fcodeburn","getagentseal","See where your AI coding tokens go. Interactive TUI dashboard for Claude Code, Codex, and Cursor cost observability.",null,"TypeScript",7867,604,24,18,0,34,237,1717,181,114.35,"MIT License",false,"main",true,[26,27,28,29,30,31,32,33,34,35],"ai-coding","claude-code","cli","codex","cost-tracking","cursor-ide","developer-tools","observability","terminal-ui","token-usage","2026-06-12 04:00:05","\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fgetagentseal\u002Fcodeburn\u002Fmain\u002Fassets\u002Fproviders.png\" alt=\"CodeBurn\" width=\"520\" \u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\u003Cstrong>See where your AI coding tokens go.\u003C\u002Fstrong>\u003C\u002Fp>\n\n\u003Cp align=\"center\">                                                                                                                                                                          \n    \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fcodeburn\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fcodeburn.svg\" alt=\"npm version\" \u002F>\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fcodeburn\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdt\u002Fcodeburn.svg\" alt=\"total downloads\" \u002F>\u003C\u002Fa>                                                       \n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fgetagentseal\u002Fcodeburn\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fl\u002Fcodeburn.svg\" alt=\"license\" \u002F>\u003C\u002Fa>                                            \n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fgetagentseal\u002Fcodeburn\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnode-%3E%3D20-brightgreen.svg\" alt=\"node version\" \u002F>\u003C\u002Fa>                                        \n    \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FpJ2DMWvtAx\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdiscord-join-5865F2?logo=discord&logoColor=white\" alt=\"Discord\" \u002F>\u003C\u002Fa>                                     \n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fiamtoruk\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fsponsor-♥-ea4aaa?logo=github\" alt=\"Sponsor\" \u002F>\u003C\u002Fa>                                                  \n  \u003C\u002Fp> \n\nCodeBurn tracks token usage, cost, and performance across **18 AI coding tools**. It breaks down spending by task type, model, tool, project, and provider so you can see exactly where your budget goes.\n\nEverything runs locally. No wrapper, no proxy, no API keys. CodeBurn reads session data directly from disk and prices every call using [LiteLLM](https:\u002F\u002Fgithub.com\u002FBerriAI\u002Flitellm).\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd align=\"center\">\u003Cstrong>Dashboard\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd align=\"center\">\u003Cstrong>Menu Bar\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fgetagentseal\u002Fcodeburn\u002Fmain\u002Fassets\u002Fdashboard.jpg\" alt=\"CodeBurn TUI dashboard\" width=\"440\" \u002F>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src=\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fgh\u002Fgetagentseal\u002Fcodeburn@main\u002Fassets\u002Fmenubar-0.8.0.png\" alt=\"CodeBurn macOS menubar\" width=\"440\" \u002F>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd align=\"center\">\u003Cstrong>Optimize\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd align=\"center\">\u003Cstrong>Compare\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fgetagentseal\u002Fcodeburn\u002Fmain\u002Fassets\u002Foptimize.jpg\" alt=\"CodeBurn optimize\" width=\"440\" \u002F>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fgetagentseal\u002Fcodeburn\u002Fmain\u002Fassets\u002Fcompare.jpg\" alt=\"CodeBurn compare\" width=\"440\" \u002F>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n## Requirements\n\n- Node.js 20+\n- At least one supported AI coding tool with session data on disk\n- For Cursor and OpenCode support, `better-sqlite3` is installed automatically as an optional dependency\n\n## Install\n\n```bash\nnpm install -g codeburn\n```\n\nOr with Homebrew:\n\n```bash\nbrew tap getagentseal\u002Fcodeburn\nbrew install codeburn\n```\n\nOr run directly without installing:\n\n```bash\nnpx codeburn\nbunx codeburn\ndx codeburn\n```\n\n## Usage\n\n```bash\ncodeburn                        # interactive dashboard (default: 7 days)\ncodeburn today                  # today's usage\ncodeburn month                  # this month's usage\ncodeburn report -p 30days       # rolling 30-day window\ncodeburn report -p all          # every recorded session\ncodeburn report --from 2026-04-01 --to 2026-04-10  # exact date range\ncodeburn report --format json   # full dashboard data as JSON\ncodeburn report --refresh 60    # auto-refresh every 60s (default: 30s)\ncodeburn status                 # compact one-liner (today + month)\ncodeburn status --format json\ncodeburn export                 # CSV with today, 7 days, 30 days\ncodeburn export -f json         # JSON export\ncodeburn optimize               # find waste, get copy-paste fixes\ncodeburn optimize -p week       # scope the scan to last 7 days\ncodeburn compare                # side-by-side model comparison\ncodeburn yield                  # track productive vs reverted\u002Fabandoned spend\ncodeburn yield -p 30days        # yield analysis for last 30 days\n```\n\nArrow keys switch between Today, 7 Days, 30 Days, Month, and 6 Months (use `--from` \u002F `--to` for an exact historical window). Press `q` to quit, `1` `2` `3` `4` `5` as shortcuts, `c` to open model comparison, `o` to open optimize. The dashboard auto-refreshes every 30 seconds by default (`--refresh 0` to disable). It also shows average cost per session and the five most expensive sessions across all projects.\n\n## Supported Providers\n\n| Provider | Data Location | Supported |\n|----------|--------------|-----------|\n| Claude Code | `~\u002F.claude\u002Fprojects\u002F` | Yes |\n| Claude Desktop | `~\u002FLibrary\u002FApplication Support\u002FClaude\u002Flocal-agent-mode-sessions\u002F` | Yes |\n| Codex (OpenAI) | `~\u002F.codex\u002Fsessions\u002F` | Yes |\n| Cursor | `~\u002FLibrary\u002FApplication Support\u002FCursor\u002FUser\u002FglobalStorage\u002Fstate.vscdb` | Yes |\n| cursor-agent | `~\u002F.cursor\u002Fprojects\u002F` | Yes |\n| Gemini CLI | `~\u002F.gemini\u002Ftmp\u002F\u003Cproject>\u002Fchats\u002F` | Yes |\n| GitHub Copilot | `~\u002F.copilot\u002Fsession-state\u002F` + VS Code `workspaceStorage\u002F` | Yes |\n| Kiro | `~\u002FLibrary\u002FApplication Support\u002FKiro\u002FUser\u002FglobalStorage\u002Fkiro.kiroagent\u002F` | Yes |\n| OpenCode | `~\u002F.local\u002Fshare\u002Fopencode\u002F` (SQLite) | Yes |\n| OpenClaw | `~\u002F.openclaw\u002Fagents\u002F` (+ legacy `.clawdbot`, `.moltbot`, `.moldbot`) | Yes |\n| Pi | `~\u002F.pi\u002Fagent\u002Fsessions\u002F` | Yes |\n| OMP (Oh My Pi) | `~\u002F.omp\u002Fagent\u002Fsessions\u002F` | Yes |\n| Droid | `~\u002F.factory\u002Fprojects\u002F` | Yes |\n| Roo Code | VS Code `globalStorage\u002Frooveterinaryinc.roo-cline\u002Ftasks\u002F` | Yes |\n| KiloCode | VS Code `globalStorage\u002Fkilocode.kilo-code\u002Ftasks\u002F` | Yes |\n| Qwen | `~\u002F.qwen\u002Fprojects\u002F\u003Cproject>\u002Fchats\u002F` | Yes |\n| Goose | `~\u002F.local\u002Fshare\u002Fgoose\u002Fsessions\u002Fsessions.db` (SQLite) | Yes |\n| Antigravity | `~\u002F.gemini\u002Fantigravity\u002Fconversations\u002F` | Yes |\n\nPaths shown are for macOS. Linux and Windows equivalents are detected automatically. If a path has changed or is wrong, please [open an issue](https:\u002F\u002Fgithub.com\u002Fgetagentseal\u002Fcodeburn\u002Fissues).\n\nCodeBurn auto-detects which AI coding tools you use. If multiple providers have session data on disk, press `p` in the dashboard to toggle between them.\n\nThe `--provider` flag filters any command to a single provider: `codeburn report --provider claude`, `codeburn today --provider codex`, `codeburn export --provider cursor`. Works on all commands: `report`, `today`, `month`, `status`, `export`, `optimize`, `compare`, `yield`.\n\n### Provider Notes\n\n**Cursor** reads token usage from its local SQLite database. Since Cursor's \"Auto\" mode hides the actual model used, costs are estimated using Sonnet pricing (labeled \"Auto (Sonnet est.)\" in the dashboard). The Cursor view shows a Languages panel instead of Core Tools\u002FShell\u002FMCP panels, since Cursor does not log individual tool calls. First run on a large Cursor database may take up to a minute; results are cached and subsequent runs are instant.\n\n**Gemini CLI** stores sessions as single JSON files. Each session embeds real token counts (input, output, cached, thoughts) per message, so no estimation is needed. Gemini reports input tokens inclusive of cached; CodeBurn subtracts cached from input before pricing to avoid double charging.\n\n**Kiro** stores conversations as `.chat` JSON files. Token counts are estimated from content length. The underlying model is not exposed, so sessions are labeled `kiro-auto` and costed at Sonnet rates.\n\n**GitHub Copilot** reads from both `~\u002F.copilot\u002Fsession-state\u002F` (legacy CLI) and VS Code's `workspaceStorage\u002F*\u002FGitHub.copilot-chat\u002Ftranscripts\u002F`. The VS Code format has no explicit token counts; tokens are estimated from content length and the model is inferred from tool call ID prefixes.\n\n**OpenClaw** reads JSONL agent logs from `~\u002F.openclaw\u002Fagents\u002F` and also checks legacy paths (`.clawdbot`, `.moltbot`, `.moldbot`).\n\n**Roo Code and KiloCode** are Cline-family VS Code extensions. CodeBurn reads `ui_messages.json` from each task directory and extracts token usage from `api_req_started` entries.\n\nAdding a new provider is a single file. See `src\u002Fproviders\u002Fcodex.ts` for an example.\n\n## Features\n\n### Cost Tracking\n\nPrices every API call using input, output, cache read, cache write, and web search token counts. Fast mode multiplier for Claude. Pricing fetched from [LiteLLM](https:\u002F\u002Fgithub.com\u002FBerriAI\u002Flitellm) and cached locally for 24 hours. Hardcoded fallbacks for all Claude and GPT models to prevent mispricing.\n\n### Task Categories\n\n13 categories classified from tool usage patterns and user message keywords. No LLM calls, fully deterministic.\n\n| Category | What triggers it |\n|---|---|\n| Coding | Edit, Write tools |\n| Debugging | Error\u002Ffix keywords + tool usage |\n| Feature Dev | \"add\", \"create\", \"implement\" keywords |\n| Refactoring | \"refactor\", \"rename\", \"simplify\" |\n| Testing | pytest, vitest, jest in Bash |\n| Exploration | Read, Grep, WebSearch without edits |\n| Planning | EnterPlanMode, TaskCreate tools |\n| Delegation | Agent tool spawns |\n| Git Ops | git push\u002Fcommit\u002Fmerge in Bash |\n| Build\u002FDeploy | npm build, docker, pm2 |\n| Brainstorming | \"brainstorm\", \"what if\", \"design\" |\n| Conversation | No tools, pure text exchange |\n| General | Skill tool, uncategorized |\n\n### Breakdowns\n\nDaily cost chart, per-project, per-model (Opus, Sonnet, Haiku, GPT-5, GPT-4o, Gemini, Kiro, and more), per-activity with one-shot rate, core tools, shell commands, and MCP servers.\n\n### One-Shot Rate\n\nFor categories that involve code edits, CodeBurn detects edit\u002Ftest\u002Ffix retry cycles (Edit, Bash, Edit patterns). The one-shot column shows the percentage of edit turns that succeeded without retries. Coding at 90% means the AI got it right first try 9 out of 10 times.\n\n### Pricing\n\nFetched from [LiteLLM](https:\u002F\u002Fgithub.com\u002FBerriAI\u002Flitellm) model prices (auto-cached 24 hours at `~\u002F.cache\u002Fcodeburn\u002F`). Handles input, output, cache write, cache read, and web search costs. Fast mode multiplier for Claude. Hardcoded fallbacks for all Claude and GPT-5 models to prevent fuzzy matching mispricing.\n\n### Optimize\n\n```bash\ncodeburn optimize                       # scan the last 30 days\ncodeburn optimize -p today              # today only\ncodeburn optimize -p week               # last 7 days\ncodeburn optimize --provider claude     # restrict to one provider\n```\n\nScans your sessions and your `~\u002F.claude\u002F` setup for waste patterns:\n\n- Files Claude re-reads across sessions (same content, same context, over and over)\n- Low Read:Edit ratio (editing without reading leads to retries and wasted tokens)\n- Wasted bash output (uncapped `BASH_MAX_OUTPUT_LENGTH`, trailing noise)\n- Unused MCP servers still paying their tool-schema overhead every session\n- Ghost agents, skills, and slash commands defined in `~\u002F.claude\u002F` but never invoked\n- Bloated `CLAUDE.md` files (with `@-import` expansion counted)\n- Cache creation overhead and junk directory reads\n- Context-heavy sessions where effective input\u002Fcache tokens swamp output\n- Possibly low-worth expensive sessions with no edit turns or repeated retries\n  when no `git`\u002F`gh` delivery command is observed\n\nEach finding shows the estimated token and dollar savings plus a ready-to-paste fix: a `CLAUDE.md` line, an environment variable, or a `mv` command to archive unused items. Findings are ranked by urgency (impact weighted against observed waste) and rolled up into an A to F setup health grade. Repeat runs classify each finding as new, improving, or resolved against a 48-hour recent window.\n\nYou can also open it inline from the dashboard: press `o` when a finding count appears in the status bar, `b` to return.\n\n### Compare\n\n```bash\ncodeburn compare                        # interactive model picker (default: last 6 months)\ncodeburn compare -p week                # last 7 days\ncodeburn compare -p today               # today only\ncodeburn compare --provider claude      # Claude Code sessions only\n```\n\nOr press `c` in the dashboard to enter compare mode. Arrow keys switch periods, `b` to return.\n\n| Section | Metric | What it measures |\n|---------|--------|-----------------|\n| Performance | One-shot rate | Edits that succeed without retries |\n| Performance | Retry rate | Average retries per edit turn |\n| Performance | Self-correction | Turns where the model corrected its own mistake |\n| Efficiency | Cost per call | Average cost per API call |\n| Efficiency | Cost per edit | Average cost per edit turn |\n| Efficiency | Output tokens per call | Average output tokens per call |\n| Efficiency | Cache hit rate | Proportion of input from cache |\n\nAlso compares per-category one-shot rates, delegation rate, planning rate, average tools per turn, and fast mode usage.\n\n### Yield\n\n```bash\ncodeburn yield                  # last 7 days (default)\ncodeburn yield -p today         # today only\ncodeburn yield -p 30days        # last 30 days\ncodeburn yield -p month         # this calendar month\n```\n\nCorrelates AI sessions with git commits by timestamp:\n\n| Category | Meaning |\n|----------|---------|\n| Productive | Commits from this session landed in main |\n| Reverted | Commits were later reverted |\n| Abandoned | No commits near session, or commits never merged |\n\nRequires a git repository. Run from your project directory.\n\n### Plans\n\n```bash\ncodeburn plan set claude-max                                  # $200\u002Fmonth\ncodeburn plan set claude-pro                                  # $20\u002Fmonth\ncodeburn plan set cursor-pro                                  # $20\u002Fmonth\ncodeburn plan set custom --monthly-usd 150 --provider claude  # custom\ncodeburn plan set none                                        # disable plan view\ncodeburn plan                                                 # show current\ncodeburn plan reset                                           # remove plan config\n```\n\nSubscription tracking for Claude Pro, Claude Max, and Cursor Pro. The dashboard shows a progress bar of API-equivalent cost against your plan price. Supports custom plans. Presets use publicly stated plan prices (as of April 2026); they do not model exact token allowances, because vendors do not publish precise consumer-plan limits.\n\n### Currency\n\n```bash\ncodeburn currency GBP          # set to British Pounds\ncodeburn currency AUD          # set to Australian Dollars\ncodeburn currency JPY          # set to Japanese Yen\ncodeburn currency              # show current setting\ncodeburn currency --reset      # back to USD\n```\n\nAny [ISO 4217 currency code](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FISO_4217#List_of_ISO_4217_currency_codes) is supported (162 currencies). Exchange rates fetched from [Frankfurter](https:\u002F\u002Fwww.frankfurter.app\u002F) (European Central Bank data, free, no API key) and cached for 24 hours. Config stored at `~\u002F.config\u002Fcodeburn\u002Fconfig.json`. The currency setting applies everywhere: dashboard, status bar, menu bar, CSV\u002FJSON exports, and JSON API output.\n\n### Model Aliases\n\nIf you see `$0.00` for some models, the model name reported by your provider does not match any entry in the LiteLLM pricing data. This commonly happens when using a proxy that rewrites model names.\n\n```bash\ncodeburn model-alias \"my-proxy-model\" \"claude-opus-4-6\"   # add alias\ncodeburn model-alias --list                                # show configured aliases\ncodeburn model-alias --remove \"my-proxy-model\"             # remove alias\n```\n\nAliases are stored in `~\u002F.config\u002Fcodeburn\u002Fconfig.json` and applied at runtime before pricing lookup. The target name can be anything in the [LiteLLM model list](https:\u002F\u002Fgithub.com\u002FBerriAI\u002Flitellm\u002Fblob\u002Fmain\u002Fmodel_prices_and_context_window.json) or a canonical name from the fallback table (e.g. `claude-sonnet-4-6`, `claude-opus-4-5`, `gpt-4o`). Built-in aliases ship for known proxy model name variants. User-configured aliases take precedence over built-ins.\n\n### Filtering\n\n```bash\ncodeburn report --project myapp                  # show only projects matching \"myapp\"\ncodeburn report --exclude myapp                  # show everything except \"myapp\"\ncodeburn report --exclude myapp --exclude tests  # exclude multiple projects\ncodeburn month --project api --project web       # include multiple projects\ncodeburn export --project inventory              # export only \"inventory\" project data\n```\n\nFilter by provider, project name (case-insensitive substring), or exact date range. The `--project` and `--exclude` flags work on all commands and can be combined with `--provider`.\n\n```bash\ncodeburn report --from 2026-04-01 --to 2026-04-10   # explicit window\ncodeburn report --from 2026-04-01                    # this date through today\ncodeburn report --to 2026-04-10                      # earliest data through this date\n```\n\nEither flag alone is valid. Inverted or malformed dates exit with a clear error. In the TUI, the custom range sets the initial load only; pressing `1` through `5` switches back to predefined periods.\n\n### JSON Output\n\n`report`, `today`, and `month` support `--format json` to output the full dashboard data as structured JSON to stdout:\n\n```bash\ncodeburn report --format json             # 7-day JSON report\ncodeburn today --format json              # today's data as JSON\ncodeburn month --format json              # this month as JSON\ncodeburn report -p 30days --format json   # 30-day window\n```\n\nThe JSON includes all dashboard panels: overview (cost, calls, sessions, cache hit %), daily breakdown, projects (with `avgCostPerSession`), models with token counts, activities with one-shot rates, core tools, MCP servers, and shell commands. Pipe to `jq` for filtering:\n\n```bash\ncodeburn report --format json | jq '.projects'\ncodeburn today --format json | jq '.overview.cost'\n```\n\nFor lighter output, use `status --format json` (today and month totals only) or file exports (`export -f json`).\n\n## Menu Bar\n\n```bash\ncodeburn menubar\n```\n\nOne command: downloads the latest `.app`, installs into `~\u002FApplications`, and launches it. Re-run with `--force` to reinstall. Native Swift and SwiftUI app lives in `mac\u002F` (see `mac\u002FREADME.md` for build details).\n\nThe menubar icon always shows today's spend (so $0 is normal if you have not used AI tools today). Click to open a popover with agent tabs, period switcher (Today, 7 Days, 30 Days, Month, All), Trend, Forecast, Pulse, Stats, and Plan insights, activity and model breakdowns, optimize findings, and CSV\u002FJSON export. Refreshes every 30 seconds.\n\n**Compact mode** shrinks the menubar item to fit the text, dropping decimals (e.g. `$110` instead of `$110.20`):\n\n```bash\ndefaults write org.agentseal.codeburn-menubar CodeBurnMenubarCompact -bool true\n```\n\nRelaunch the app to apply. To revert: `defaults delete org.agentseal.codeburn-menubar CodeBurnMenubarCompact`.\n\n## Reading the Dashboard\n\nCodeBurn surfaces the data, you read the story. A few patterns worth knowing:\n\n| Signal you see | What it might mean |\n|---|---|\n| Cache hit \u003C 80% | System prompt or context is not stable, or caching not enabled |\n| Lots of `Read` calls per session | Agent re-reading same files, missing context |\n| Low 1-shot rate (Coding 30%) | Agent struggling with edits, retry loops |\n| Opus 4.6 dominating cost on small turns | Overpowered model for simple tasks |\n| `dispatch_agent` \u002F `task` heavy | Sub-agent fan-out, expected or excessive |\n| No MCP usage shown | Either you don't use MCP servers, or your config is broken |\n| Bash dominated by `git status`, `ls` | Agent exploring instead of executing |\n| Conversation category dominant | Agent talking instead of doing |\n\nThese are starting points, not verdicts. A 60% cache hit on a single experimental session is fine. A persistent 60% cache hit across weeks of work is a config issue.\n\n## How It Reads Data\n\n**Claude Code** stores session transcripts as JSONL at `~\u002F.claude\u002Fprojects\u002F\u003Csanitized-path>\u002F\u003Csession-id>.jsonl`. Each assistant entry contains model name, token usage (input, output, cache read, cache write), tool_use blocks, and timestamps.\n\n**Codex** stores sessions at `~\u002F.codex\u002Fsessions\u002FYYYY\u002FMM\u002FDD\u002Frollout-*.jsonl` with `token_count` events containing per-call and cumulative token usage, and `function_call` entries for tool tracking.\n\n**Cursor** stores session data in a SQLite database at `~\u002FLibrary\u002FApplication Support\u002FCursor\u002FUser\u002FglobalStorage\u002Fstate.vscdb` (macOS), `~\u002F.config\u002FCursor\u002FUser\u002FglobalStorage\u002Fstate.vscdb` (Linux), or `%APPDATA%\u002FCursor\u002FUser\u002FglobalStorage\u002Fstate.vscdb` (Windows). Token counts are in `cursorDiskKV` table entries with `bubbleId:` key prefix. Requires `better-sqlite3` (installed as optional dependency). Parsed results are cached at `~\u002F.cache\u002Fcodeburn\u002Fcursor-results.json` and auto-invalidate when the database changes.\n\n**OpenCode** stores sessions in SQLite databases at `~\u002F.local\u002Fshare\u002Fopencode\u002Fopencode*.db`. CodeBurn queries the `session`, `message`, and `part` tables read-only, extracts token counts and tool usage, and recalculates cost using the LiteLLM pricing engine. Falls back to OpenCode's own cost field for models not in our pricing data. Subtask sessions (`parent_id IS NOT NULL`) are excluded to avoid double counting. Supports multiple channel databases and respects `XDG_DATA_HOME`.\n\n**Pi \u002F OMP** stores sessions as JSONL at `~\u002F.pi\u002Fagent\u002Fsessions\u002F\u003Csanitized-cwd>\u002F*.jsonl` (Pi) and `~\u002F.omp\u002Fagent\u002Fsessions\u002F\u003Csanitized-cwd>\u002F*.jsonl` (OMP). Each assistant message carries token usage (input, output, cacheRead, cacheWrite) plus inline `toolCall` content blocks. CodeBurn extracts token counts, normalizes tool names to the standard set (`bash` to `Bash`, `dispatch_agent` to `Agent`), and pulls bash commands from `toolCall.arguments.command` for the shell breakdown.\n\n**Gemini CLI** stores sessions as single JSON files at `~\u002F.gemini\u002Ftmp\u002F\u003Cproject>\u002Fchats\u002Fsession-*.json`. Each session embeds real token counts (input, output, cached, thoughts) per message. Gemini reports input tokens inclusive of cached; CodeBurn subtracts cached from input before pricing to avoid double charging.\n\n**OpenClaw** stores agent sessions as JSONL at `~\u002F.openclaw\u002Fagents\u002F*.jsonl`. Also checks legacy paths `.clawdbot`, `.moltbot`, `.moldbot`. Token usage comes from assistant message `usage` blocks; model from `modelId` or `message.model` fields.\n\n**Roo Code \u002F KiloCode** are Cline-family VS Code extensions. CodeBurn reads `ui_messages.json` from each task directory in VS Code's `globalStorage`, filtering `type: \"say\"` entries with `say: \"api_req_started\"` to extract token counts.\n\nCodeBurn deduplicates messages (by API message ID for Claude, by cumulative token cross-check for Codex, by conversation\u002Ftimestamp for Cursor, by session ID for Gemini, by session+message ID for OpenCode, by responseId for Pi\u002FOMP), filters by date range per entry, and classifies each turn.\n\n## Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `CLAUDE_CONFIG_DIR` | Override Claude Code data directory (default: `~\u002F.claude`) |\n| `CODEX_HOME` | Override Codex data directory (default: `~\u002F.codex`) |\n| `FACTORY_DIR` | Override Droid data directory (default: `~\u002F.factory`) |\n| `QWEN_DATA_DIR` | Override Qwen data directory (default: `~\u002F.qwen\u002Fprojects`) |\n\n## Project Structure\n\n```\nsrc\u002F\n  cli.ts            Commander.js entry point\n  dashboard.tsx     Ink TUI (React for terminals)\n  parser.ts         JSONL reader, dedup, date filter, provider orchestration\n  models.ts         LiteLLM pricing, cost calculation\n  classifier.ts     13-category task classifier\n  compare-stats.ts  Model comparison engine\n  daily-cache.ts    Persistent daily cache with migration\n  day-aggregator.ts Daily aggregation from session data\n  types.ts          Type definitions\n  format.ts         Text rendering (status bar)\n  menubar-json.ts   Payload builder for the macOS menubar app\n  export.ts         CSV\u002FJSON multi-period export\n  config.ts         Config file management (~\u002F.config\u002Fcodeburn\u002F)\n  currency.ts       Currency conversion, exchange rates\n  sqlite.ts         SQLite adapter (lazy-loads better-sqlite3)\n  optimize.ts       Waste pattern detection engine\n  providers\u002F\n    types.ts        Provider interface definitions\n    index.ts        Provider registry\n    claude.ts       Claude Code session discovery\n    codex.ts        Codex session discovery and JSONL parsing\n    copilot.ts      GitHub Copilot session parsing\n    cursor.ts       Cursor SQLite parsing, language extraction\n    cursor-agent.ts cursor-agent CLI session parsing\n    droid.ts        Droid session discovery\n    gemini.ts       Gemini CLI session JSON parsing\n    kilo-code.ts    KiloCode VS Code extension parsing\n    kiro.ts         Kiro .chat JSON session parsing\n    openclaw.ts     OpenClaw agent JSONL parsing\n    opencode.ts     OpenCode SQLite session parsing\n    pi.ts           Pi\u002FOMP agent JSONL session parsing\n    qwen.ts         Qwen CLI JSONL session parsing\n    roo-code.ts     Roo Code VS Code extension parsing\n    goose.ts        Goose SQLite session parsing\n    antigravity.ts  Antigravity conversation parsing\n```\n\n## Star History\n\n\u003Ca href=\"https:\u002F\u002Fwww.star-history.com\u002F?repos=getagentseal%2Fcodeburn&type=date&legend=top-left\">\n \u003Cpicture>\n   \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=getagentseal\u002Fcodeburn&type=date&theme=dark&legend=top-left\" \u002F>\n   \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=getagentseal\u002Fcodeburn&type=date&legend=top-left\" \u002F>\n   \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=getagentseal\u002Fcodeburn&type=date&legend=top-left\" \u002F>\n \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n## License\n\nMIT\n\n## Credits\n\nInspired by [ccusage](https:\u002F\u002Fgithub.com\u002Fryoppippi\u002Fccusage) and [CodexBar](https:\u002F\u002Fgithub.com\u002Fnicobailon\u002Fcodexbar). Pricing data from [LiteLLM](https:\u002F\u002Fgithub.com\u002FBerriAI\u002Flitellm). Exchange rates from [Frankfurter](https:\u002F\u002Fwww.frankfurter.app\u002F).\n\nBuilt by [AgentSeal](https:\u002F\u002Fagentseal.org).\n","CodeBurn 是一个用于追踪 AI 编程工具（如 Claude Code、Codex 和 Cursor）使用情况的交互式终端用户界面（TUI）仪表盘。它能够监控并分析18种AI编码工具中的令牌使用、成本和性能，将支出细分为任务类型、模型、工具、项目和提供商等多个维度，帮助开发者清晰了解预算流向。该工具完全本地运行，无需额外的封装、代理或API密钥，直接从磁盘读取会话数据并通过LiteLLM进行计费处理。适用于需要对AI辅助编程过程中产生的费用有更精细控制与优化需求的场景。",2,"2026-06-11 02:38:08","CREATED_QUERY"]