claudetop
You're spending $20/day on Claude Code and can't see it.
claudetop shows you exactly where your tokens and dollars go — in real time.
14:32 my-project/src/app Fable 5.1 20m 0s +256/-43 #auth-refactor
152.3K in / 45.2K out ████░░░░░░ 38% $3.47 $5.10/hr ~$174/mo
cache: 66% efficiency: $0.012/line opus:~$3.20 sonnet:~$0.88 haiku:~$0.23
plan: 5h ████████░░ 82% ↻2h18m 7d ██████░░░░ 64% ↻4d1h Fable ████████░░ 81% ↻4d1h credits $0/$2000
in:80% out:20% (fresh:15% cwrite:7% cread:76%)
$5 MARK | main* | ♫ Artist - Song | PROJ-123 | CI ✓
The problem
Claude Code doesn't show you what you're spending. You finish a session, check your billing dashboard, and discover a $65 charge for what felt like 30 minutes of work. You have no idea which session caused it, which model was wasteful, or whether your cache was even working.
I built claudetop after noticing my model estimate showed $10 but the actual bill was $65. Turns out, compaction was hiding 80% of my token usage. The cost was real — the visibility wasn't.
Install
Clone and install (recommended)
git clone https://github.com/liorwn/claudetop.git
cd claudetop && ./install.sh
One-liner
curl -fsSL https://raw.githubusercontent.com/liorwn/claudetop/main/install.sh | bash
As a Claude Code plugin
claude plugin marketplace add liorwn/claudetop
claude plugin install claudetop
This gives you the SessionEnd hook + all slash commands (/claudetop:stats, /claudetop:dashboard, /claudetop:branch, /claudetop:export, /claudetop:pricing) automatically.
Then restart Claude Code.
What you see
Before claudetop
>
A blank prompt. No context. No cost. No idea.
After claudetop
14:32 my-project/src/app Fable 5.1 20m 0s +256/-43 #auth-refactor
152.3K in / 45.2K out ████░░░░░░ 38% $3.47 $5.10/hr ~$174/mo
cache: 66% efficiency: $0.012/line opus:~$3.20 sonnet:~$0.88 haiku:~$0.23
plan: 5h ████████░░ 82% ↻2h18m 7d ██████░░░░ 64% ↻4d1h Fable ████████░░ 81% ↻4d1h credits $0/$2000
$5 MARK | TRY /fast | main* | CI ✓ | ♫ Bonobo - Kerala
Every response, you see:
- What project you're in and how deep
- What model is running and for how long
- What it costs right now, per hour, and projected monthly
- How much plan you have left — 5-hour, 7-day, and per-model (Fable/Opus/Sonnet) windows with reset countdowns
- How efficient your cache is (are you wasting tokens?)
- What it would cost on a different model (should you switch?)
- Smart alerts when something is wrong
Features
Plan usage windows (subscribers)
If you're on a Claude Pro/Max/Team plan, the plan: line shows every rate-limit window Anthropic enforces on you — as a bar, % used, and time until it resets:
plan: 5h ████████░░ 82% ↻2h18m 7d ██████░░░░ 64% ↻4d1h Fable ████████░░ 81% ↻4d1h credits $0/$2000
| Window | What it is |
|---|
5h | Current session window (rolls every 5 hours) |
7d | Current week, all models |
Fable / Opus / Sonnet | Current week, that model only — appears whenever your plan has a per-model cap |
credits | Extra-usage credits spent this month / your monthly cap (only if extra usage is enabled) |
Bars go yellow at 50% and red at 80%. At 90% you get a Fable LIMIT 93% ↻4d1h alert so you can switch models or wrap up before Claude Code stops you. The minimal theme shows the same numbers inline (5h:82% 7d:64% Fable:81%); compact shows only the tightest window.
The 5h and 7d numbers come straight from Claude Code (the status line JSON carries them after the first API response). Per-model windows and credits come from the same usage endpoint the /usage screen uses, fetched by claudetop-usage in the background at most once a minute and cached in ~/.claude/claudetop-usage.json — the status line itself never waits on the network. It reads the OAuth credential Claude Code already stored (macOS Keychain, or ~/.claude/.credentials.json on Linux) and never refreshes or modifies it. API-key, Bedrock, and Vertex sessions have no plan windows, so the line simply doesn't appear.