Home Blog Track Claude Code spend
Cornerstone guide

How to Track Your Claude Code Spend Without Losing Your Mind (2026)

If you're on Team or Enterprise, Anthropic does give you a per-user spend breakdown now — with caveats. Pro/Max plans don't, and /usage only shows your current session. Here's what every tool — official, OSS, and otherwise — actually shows you, and how to pick one without rage-quitting at 2am.

Published May 27, 2026 · Reading time 9 min · By CookedAF

Claude Code is the best thing that has happened to my terminal in a decade. It is also genuinely opaque about cost — at least until you know exactly where each piece of information lives. Open a fresh shell, type claude, vibe for two hours, and your only in-session signal of what you spent is the warmth coming off your laptop and a creeping sense of dread.

This guide is the version of "how do I track Claude Code usage?" I wish existed when I first went looking. We will cover the four real options in 2026 — the official /usage command, the OSS CLI ccusage, the live TUI Claude-Code-Usage-Monitor, and CookedAF — and exactly what each one can and cannot tell you. Then you can pick.

The problem in one paragraph (corrected for 2026)

If you're on a Claude subscription (Pro, Max, or a team plan), Anthropic bills you a flat monthly rate and meters access through two rolling windows: a 5-hour session limit and a weekly limit that resets every Sunday-ish. As of May 2026, Anthropic does ship a per-user analytics dashboard on Team and Enterprise plans — leaderboard of spend by user, month-to-date spend per user, model breakdown, and a CSV export with user email, model, token counts and net/gross USD (see Anthropic's docs). The caveats matter: on seat-based Enterprise only overage spend is itemized per user (consumption inside the seat allotment isn't), there's a 1–2 day reporting delay, and individual Pro/Max plans have no per-user breakdown at all (you're the only user). The in-session /usage command shows session-level, not org-user-level data. Every tool below exists to fill the gap between "what Anthropic reports" and "what you actually want to know in the next ten seconds."

As of May 2026 snapshot. Anthropic ships analytics changes regularly — when in doubt, check the current usage-analytics docs for what's available on your plan tier today.
Heads up A note on freshness. Anthropic's billing data refreshes every few hours and can lag up to 24h (with revisions for up to 30 days). Anyone — official or third-party — pulling from the cost APIs will inherit that lag. Treat "live" usage numbers as a directional read, not a live tape.

Option 1 — The official /usage command

Inside any Claude Code session, typing /usage drops you into a panel that shows your current 5-hour window, your weekly window, and roughly how much of each you have left. It is built in. It does not need a key. It is the answer if you only want to know am I about to get rate-limited.

What it will not tell you:

  • Token totals per repo or per project.
  • What you spent yesterday, last week, or month-to-date.
  • Any cost-equivalent dollar figure for subscription usage.
  • Anything about API-key usage from your other tools (Cursor, custom agents, your own SDK code).

That is the floor: useful, free, narrow. If you only ever use Claude inside Claude Code and never hit a limit, /usage may be all you need.

Option 2 — ccusage (the OSS CLI)

If you spend a lot of time in Claude Code, you have already heard of ccusage. It is the de-facto community tool — a small Node CLI that reads Claude Code's local JSONL session logs and aggregates them into per-day, per-session, and per-model token totals. At the time of writing it has roughly ~14k GitHub stars, which for a developer-tools side project is rapture-tier traction.

The pitch in one line: it tells you, retroactively, how many tokens of each model you burned per day, without ever needing an admin key. It is reading your own local log files, not the Anthropic API.

Typical run:

npx ccusage@latest          # full daily breakdown
npx ccusage@latest --since 2026-05-01
npx ccusage@latest blocks   # 5-hour windows view

What is great: zero auth, zero risk, no key required, instant install, project-level breakdown. The maintainer ships fast and the community fixes edge cases within days. If you live in the terminal, this is a no-brainer to have installed.

What is annoying: it sees only what Claude Code wrote to disk. If you also use the Anthropic API from your own SDK code, from Cursor, or from a different machine, those are invisible. It does not see OpenAI, Gemini, DeepSeek, or anything else. And it is a CLI, so unless you cron it and pipe the output somewhere, it is something you remember to run, which means you will only run it after the bill has already arrived.

Option 3 — Claude-Code-Usage-Monitor (the OSS TUI)

Claude-Code-Usage-Monitor is the other big community tool. Where ccusage is a static report, this one is a live full-terminal monitor — think htop for your 5-hour window. You launch it in a side terminal and it shows current burn rate, remaining tokens in the current window, an ETA for limit exhaustion, and progress bars that fill up in real time as you work.

It also parses the local JSONL logs, so it is in the same boat as ccusage for what it can and cannot see (Claude Code only, no key required). The difference is psychological: a live monitor next to your editor changes the way you write prompts. You start to feel the cost of a sloppy 100k-token paste.

When to use it: if you keep hitting weekly limits and want to be told when rather than after. The "ETA to limit at current burn rate" is the killer feature.

When not to: if you actually want dollar figures, not token counts. If you want one number across every provider you use. If you do not want yet another terminal pane open all day.

Option 4 — CookedAF

This is what we make. I'll be as honest as I can about where it wins and where it doesn't, because the worst thing about this category is the marketing.

CookedAF is a desktop tray app (Windows now, macOS soon) that reads your actual spend directly from the admin APIs of every major provider — OpenAI, Anthropic, OpenRouter, DeepSeek, xAI — and shows you one ring per provider against a cap you set. Today's delta, a sparkline, a number. You glance at it. You move on with your life.

Where it wins:

  • Multi-provider in one view. If you call the API from Cursor, an SDK, a side agent, or just from different machines, you see all of it in the same place. The OSS log-readers only see what Claude Code wrote to disk on this machine. Anthropic's analytics only sees Anthropic. CookedAF aggregates the picture.
  • Real dollars, glanceable. Rings, caps, today vs. yesterday, all in USD pulled from the same cost endpoints the provider dashboards use.
  • Local-first by design. Admin keys live in your OS keychain (Windows Credential Manager / macOS Keychain). The webview never sees them. There is no CookedAF server — the app makes the HTTPS calls to the provider itself, natively, from your machine.
  • GUI, not CLI. Your designer can read it. Your CTO can read it. You don't need to remember to run anything.

Where it loses:

  • It does not replace Anthropic's per-user analytics for subscription consumption. If you're on Team/Enterprise and you want a leaderboard of which teammate burned the most tokens this month, the native usage-analytics dashboard is the answer for that specific question. CookedAF aggregates API-key spend across providers; it doesn't currently itemize per-teammate inside a Claude subscription.
  • It cannot see Pro/Max subscription consumption the way ccusage can. The Anthropic cost API reports API-key spend, not subscription consumption. If 100% of your Claude use is inside a Pro plan inside Claude Code, the OSS log-readers will tell you more than we can.
  • You need an admin key. Read-only org-level keys are easy to mint on both Anthropic and OpenAI, but if you don't have org-admin access you can't use the cost endpoints. That's a provider thing, not a CookedAF thing — but you still hit it.
  • It is a GUI app. If you genuinely live in tmux and refuse to alt-tab, this is the wrong tool.

The honest comparison table

  /usage ccusage CC-Usage-Monitor Anthropic analytics CookedAF
Type Built-in command OSS CLI (Node) OSS TUI (Python) Native dashboard Desktop GUI
Auth required none none none Team/Enterprise admin admin API key
Sees subscription consumption yes (windows) yes (tokens) yes (tokens, live) yes (Team/Ent) no
Per-user breakdown session only no no yes* no
Sees API-key usage no no no Anthropic only yes
Multi-provider Claude only Claude only Claude only Claude only 5+ providers
Reports in dollars no est. est. yes yes
Freshness live live (log read) live 1–2 day delay ~10 min
Cost free free / OSS free / OSS included in plan free in beta

* On seat-based Enterprise plans, only overage spend is itemized per user; consumption inside the seat allotment is not. Pro/Max plans have no per-user breakdown (you're the only user).

The pattern: these tools don't compete; they complement. ccusage tells you what your subscription consumption looks like inside Claude Code on this machine. Anthropic's native analytics tells you which teammate burned what across the org (with caveats). CookedAF tells you what your API-key spend looks like across every provider. Most heavy users genuinely want at least two of these in the stack.

A step-by-step setup for the paranoid (in a good way)

Here is the stack I would actually recommend in May 2026 if you use Claude Code daily and also call the API from at least one other tool.

1. Keep /usage in your back pocket

It's already there. Use it when you feel the limit approaching. Don't overthink this one.

2. If you're on Team/Enterprise: bookmark the usage analytics dashboard

This is the answer to "which teammate burned the most this month?" — leaderboard, MTD spend per user, model breakdown, CSV export. Bookmark the docs page; expect a 1–2 day reporting lag; remember that on seat-based Enterprise only overage usage is itemized per user. On Pro/Max this step doesn't apply — skip it.

3. Install ccusage for retroactive subscription receipts

Run it once a week to see the per-day, per-model breakdown of your Claude Code sessions on this machine. Pipe the output into Notion, a spreadsheet, your brain. It catches the "wait, why did Tuesday cost twice as much as Monday" pattern that nothing else will.

4. Add Claude-Code-Usage-Monitor if you keep hitting limits

If your weekly window keeps blowing up on Thursday, the live monitor will change your prompting habits within a week. Otherwise it's overkill.

5. Install CookedAF for everything that is not Claude Code

Generate read-only admin keys on Anthropic, OpenAI, OpenRouter, DeepSeek and xAI (whichever you use). Paste them into CookedAF on first launch. The keys are written straight into your OS keychain and never touch a server we run. Set a monthly cap per provider. From then on you have one glance answer for your API-key spend across every provider.

Pro tip One key per provider is enough. Anthropic and OpenAI both let you mint a read-only org-level admin key dedicated to billing. Use a dedicated one — name it "cookedaf-read" — so you can revoke it independently of your other keys if you ever feel like it. The keychain entry stays under the service id cookedaf.

What I'd run if I could only pick one

This is the question I get most. The honest answer depends on the shape of your usage.

  • Claude Code is 90%+ of your AI use, on a Pro/Max plan → install ccusage. It's the closest thing to a real receipt that exists for subscription Claude on an individual plan.
  • You're a Team/Enterprise billing admin and you want to know who's burning what inside Claude → start with Anthropic's native usage analytics dashboard. It's the only one of the four that itemizes by user.
  • You use 2+ providers, or you also call the API outside Claude Code → install CookedAF. The "one ring per provider" view is the thing that catches surprise bills before they become news stories.
  • You're a team lead and want full coverage → all three. Anthropic's analytics for per-user inside Claude. ccusage for engineers' personal subscription receipts. CookedAF on the billing-admin's machine for the multi-provider API-key view.

None of these will literally stop a runaway agent burning a thousand bucks in an hour — that is a separate, scarier conversation. What they give you is the early signal so you have a fighting chance.

Estimate before you spend

Before you commit to a workflow, run the per-call cost through a calculator. The point isn't accuracy to the cent — it's spotting an order-of-magnitude problem before you turn on a 24/7 agent.

Try the multi-provider token cost calculator. Pick a model, plug in your typical token shape, project the monthly burn. Free, client-side, no signup.
Open the calculator →

The CookedAF bit, said plainly

If after all that you want a GUI for your API-key spend across every provider — and you like the idea that your keys never leave your device — that is exactly what we built CookedAF to be. It is free during beta. It installs on Windows in about ninety seconds and asks for nothing except a read-only admin key per provider.

CookedAF — local-first AI spend tracker. One ring per provider. Today's delta. Sparkline. Cap. Your keys never leave your machine.
Get CookedAF (free beta)

If you would rather wire up ccusage + a cron job and live in the terminal forever, we genuinely respect that. The tooling here is good in 2026. Pick the one that fits the way you actually work, install it today, and let future-you find out about the bill from a chart instead of an email.