A local dashboard for Claude Code usage. It scans the JSONL transcripts Claude Code already writes to ~/.claude/projects/, stores per-turn token counts in SQLite, and serves a browser dashboard that prices your usage at API-equivalent rates. I built it to answer one question: what would my Claude Code habit cost at API prices, and where is it going?
No packages to install. Python 3.8+ standard library only.
- Totals for sessions, turns, input tokens, output tokens, cache reads, cache creation, and estimated cost
- Daily token usage stacked by model
- Cost split by model (doughnut) and by project (bar)
- Tables: cost by model, recent sessions, cost by project, all sortable
- Filters: 7/30/90-day/all-time ranges and per-model checkboxes
- CSV export of the filtered turns
Cost is computed from a built-in pricing table (Opus, Sonnet, Haiku, per-million-token API rates). Unknown models fall back to Sonnet rates, so treat the dollar figures as estimates.
Clone it, then:
python cli.py dashboard # scan, serve, open browser
python cli.py scan # scan only
python cli.py stats # summary table in the terminaldashboard starts a server at http://127.0.0.1:9199 and opens it. The page refreshes every 30 seconds and has a Rescan button that re-reads the source files.
On Windows you can put a shortcut to launch.ps1 in shell:startup. It starts the server in the background at login, or just opens the browser if one is already running.
| Env variable | Default | Purpose |
|---|---|---|
BURNRATE_HOST |
127.0.0.1 |
Server bind address |
BURNRATE_PORT |
9199 |
Server port |
scanner.pyreads~/.claude/projects/**/*.jsonl, parses assistant turns, deduplicates by message id, and upserts into SQLite at~/.claude/usage.db. Scans are incremental: it tracks each file's mtime and line count and only reads new lines.server.pyis anhttp.serverapp.GET /serves the dashboard,GET /api/datareturns the turns as JSON,POST /api/rescantriggers a rescan.dashboard.pyis a single self-contained HTML page with the charts and tables.cli.pyties it together.
Everything runs on your machine. The Python code makes no outbound network requests; it reads local files and binds to localhost. The one external fetch is your browser loading the Chart.js library from the jsdelivr CDN when the dashboard page opens. Your usage data is never sent anywhere.
Working and in daily use. Pricing table is hardcoded, so update it in scanner.py and dashboard.py when rates change.
MIT. See LICENSE.