burnlens scan · v1.2
See what your AI coding agents actually cost
Claude Code, Cursor, Codex, Gemini CLI — local logs, one command, no proxy required
The problem
You opened Cursor on Monday. You ran Claude Code on Tuesday. You let Codex churn through a refactor on Wednesday. By Friday you have no idea how much you spent, which project ate the budget, or which session was the runaway. The provider bill says claude-sonnet: $214— it doesn't say which of your repos burned it.
What burnlens scan does
Reads the local session logs your coding agents already write to disk, deduplicates the turns, routes each call through the BurnLens pricing engine, and stores the results in a local SQLite database. No proxy, no code changes, no signup. Run it once and see retroactive cost history for every session on your machine.
$ burnlens scan
Scanning Claude Code ~/.claude/projects/ 312 sessions · 14,287 turns · $48.21
Scanning Cursor local bubble db 89 sessions · 3,104 turns · $12.84
Scanning Codex session sqlite 703 sessions · 88,219 turns · $0.00 *
Scanning Gemini CLI ~/.gemini/tmp/ 64 sessions · 5,806 turns · $0.00 *
Top repos by spend (last 7 days):
1. burnlens/ $24.18 Claude Code, Cursor
2. internal-platform/ $11.02 Claude Code
3. ai-eval-harness/ $4.67 Cursor
* missing pricing for some preview models — see burnlens/cost/pricing_data/What it scans
| Agent | Source | What you get |
|---|---|---|
| Claude Code | ~/.claude/projects/ | Parses JSONL session files. Deduplicates repeated message.id entries. Attributes cost per session and per project directory. |
| Cursor | Cursor's local bubble database | Reads Cursor's local SQLite store. Routes each turn through the cost engine by provider + model. |
| OpenAI Codex | Codex CLI SQLite session DB | Handles the event_msg wrapper and turn_context model fields. Tested against 700+ sessions / 88K events. |
| Gemini CLI | ~/.gemini/tmp/<project>/chats/ | Supports both JSON and JSONL chat formats. Imports session count, turns, and model usage. |
Try it in three commands
pip install burnlens
burnlens scan
burnlens top # live spend by model, session, repoNo env vars to set, no proxy to start, no account to create. If you have Claude Code, Cursor, Codex, or Gemini CLI installed and have used them recently, you'll see cost data in your terminal in under a minute.
Privacy
Everything stays on your machine. burnlens scan reads local files and writes to a local SQLite database at ~/.burnlens/burnlens.db. No prompts, no code, no session content ever leaves your machine. If you enable cloud sync later for team dashboards, only anonymized token counts and costs are uploaded — never prompt or response bodies.
FAQ
What if a model isn't priced yet? The session is still imported with cost = $0 and the model name is recorded so you can spot the gap. Adding a missing model is a one-line edit in burnlens/cost/pricing_data/*.json.
Does scanning interfere with the agent?No. burnlens scan only reads. It never writes to the agent's own log directories or databases.
Can I scan from CI? Yes — burnlens scan is idempotent. Re-running it picks up new sessions since the last scan. A scheduled job + cloud sync gives you a team-wide view of coding-agent spend across every developer.
What about Cline, Windsurf, Aider? Not yet — they're tracked in GitHub issues. Each new reader is one file in burnlens/readers/ plus a pricing entry; PRs welcome.