Projects BurnItDown

🔥 Open source · MIT · 100% local · Real-time

BurnItDown
the Claude Code usage dashboard you run yourself.

A local, real-time dashboard that reads your Claude Code session files (~/.claude/projects/**/*.jsonl), prices every token at Anthropic's public API rates, and compares that against the flat subscription you actually pay. Nothing leaves your machine.

How much of Anthropic's spend on your usage is subsidized by their subscription pricing — versus how much you're actually paying for?

See it working

What it looks like.

These are real captures from a live run against actual Claude Code session data. The dashboard refreshes on a polling interval (90s by default) so spend updates in near real time.

localhost:3005 — BurnItDown
The full BurnItDown dashboard: subsidy hero, stat cards, burn meter, monthly comparison chart, and Anthropic P&L.
The main dashboard — subsidy story up top, then stat cards, the burn meter, monthly cost-vs-subscription bars, and Anthropic's running P&L on your account. (scroll within the frame)
Settings — Model API Rates
BurnItDown settings panel showing editable per-model API rates and subscription tier costs.
Every API rate and subscription tier is editable in-app — overrides save to localStorage and apply on the next refresh.
Tick History
BurnItDown tick history table: one row per refresh interval where new tokens were consumed, with incremental cost.
Tick history — one row per refresh where new tokens were consumed, giving real-time spend granularity.

Getting started

Run it in 60 seconds.

BurnItDown is fully ready to run — no account, no API key, no cloud. If you've used Claude Code at least once, you already have the data it reads.

Prerequisites

RequirementVersion / note
Node.js18 or newer
npm9 or newer
Claude Code CLIinstalled and used at least once (so ~/.claude exists)

Install & launch

# 1. Clone the repo
git clone https://github.com/currentsea/claudewatch.git
cd claudewatch

# 2. Install dependencies
npm install

# 3. (optional) point at a non-default data dir, change billing day, etc.
cp .env.example .env

# 4. Run — starts BOTH the API and the React dashboard
npm start

npm start launches two processes together: the backend API at http://localhost:3001 (reads ~/.claude and serves aggregated JSON) and the frontend at http://localhost:3005, which opens automatically in your browser. You should see the dashboard populate within a second or two.

Run the pieces independently

npm run server   # API only       → http://localhost:3001
npm run client   # dashboard only → http://localhost:3005

Verify it's working

  1. Open http://localhost:3005 and confirm the “Live · 90s” badge in the header is pulsing green.
  2. Send a single message in Claude Code from another terminal, then wait for the next refresh — you'll see a new row in Tick History and a bump in the All-Time API Equiv. stat card.
  3. Click any row in the Session P&L table to open the per-message drilldown.

What you get

What the dashboard shows.

Subsidy hero

One sentence — is Anthropic eating money to serve you, or making a margin? — with a split bar showing what you paid vs what they ate.

Stat cards

All-time API-equivalent cost, this-period cost vs subscription, net value, and Anthropic's all-time P&L on you.

Burn meter

Where you are in your billing period — current spend, projected month-end spend, and whether you'll exceed your subscription.

Active usage windows

Sessions touched in Claude's rolling 5-hour window, with incurred cost and time remaining until the window closes.

Cost-flow diagram

A step-by-step visualization of how raw tokens become dollars become P&L — so you can trust the numbers.

Session P&L drilldown

Click any session for the full message timeline, per-model token breakdown, working directory, and git branch.

Under the hood

How cost is computed.

For every assistant message, the server reads the usage block and applies the configured API rate for that model's tier:

cost = (input_tokens          × input_rate       / 1,000,000)
     + (output_tokens         × output_rate      / 1,000,000)
     + (cache_creation_tokens × cache_write_rate / 1,000,000)
     + (cache_read_tokens     × cache_read_rate  / 1,000,000)

Default rates (USD per 1M tokens, verified May 2026). Every value is editable in Settings → Model API Rates.

ModelInputOutput5m cache-writeCache read
Claude Opus 4.5+$5$25$6.25$0.50
Claude Sonnet 4.5+$3$15$3.75$0.30
Claude Haiku 4.5$1$5$1.25$0.10

Subscription tiers (comparison baseline)

TierMonthlyPlan
Pro$20Claude.ai Pro (individual)
Max 5×$100Claude.ai Max (5× usage)
Max 20×$200Claude.ai Max (20× usage)

Configuration

Tune it with a .env file.

Copy .env.example to .env and override any of the following. All variables have sensible defaults — only set what you need to change.

VariableDefaultDescription
CLAUDE_DATA_PATH~/.claudePath to your Claude Code data directory. Only change if you moved it.
SERVER_PORT3001Port for the Express API. If changed, also update proxy in package.json.
BILLING_DAY30Day-of-month your Anthropic subscription renews (e.g. 15).
CLAUDE_USAGE_WINDOW_HOURS5Length of Claude's rolling usage window, used for the active-sessions panel.
REACT_APP_REFRESH_INTERVAL90Dashboard polling interval in seconds. Lower = more real-time (baked in at build time).

Troubleshooting

If something looks off.

“Could not connect to the API server”

The frontend is up but the backend isn't. Check whether it's running with lsof -i:3001, then start it on its own to see the logs:

npm run server
Port 3001 already in use
lsof -ti:3001 | xargs kill -9
npm start

Or change SERVER_PORT in .env (and update package.jsonproxy to match).

Dashboard shows all zeroes

The backend can read ~/.claude but there's no usage data yet. Confirm the files exist, then send at least one Claude Code message and hit Refresh:

ls ~/.claude/projects/*/*.jsonl | head -5
claude --version
Costs look 3× off (you're on Opus)

Your JSONL was produced by Opus 4.1 or earlier ($15/$75), but the defaults assume Opus 4.5+ ($5/$25). Open Settings → Opus and set input to 15, output to 75 — or hit ↺ to reset to defaults.

The frontend won't compile (react-scripts errors)
rm -rf node_modules package-lock.json
npm install
npm start

Still seeing OpenSSL errors on Node 18+? Try NODE_OPTIONS=--openssl-legacy-provider npm start.

More edge cases and the full reference live in the project's README.

Grab the code

Free, open source, yours to run.

BurnItDown is MIT-licensed and not affiliated with Anthropic — the cost numbers are estimates derived from publicly published API rates. Clone it, run it locally, edit the rates, and see your own unit economics.