tokenstat
tokenstat

Command line · macOS, Linux, Windows

One command, and you finally know

Your tools already wrote down everything they did. Nobody reads it, because it is scattered across a dozen folders in a dozen formats. One command turns all of it into a single answer, in about a second, offline: what you ran, on what, and what it was worth. No account, no signup, and nothing to configure first.

$ curl -fsSL https://tokenstat.ai/install.sh | bash

Getting an answer

Two commands, then you already know

The first one collects; the second one shows you. Everything after that reads the collected copy, which is why nothing you ask ever makes you wait. Typing tokenstat on its own opens the full-screen view and refreshes itself if it has been sitting for more than ten minutes.

$ tokenstat scan
$ tokenstat

Filters apply everywhere: --since, --until, --last N, --model, --project. Every command takes --json.

Reference

Ask it the question you actually have

CommandShows
tokenstatFull-screen interactive client, with tabs, headline stats, and a command field
summaryHeadline numbers, the activity grid, and the model breakdown
heatmapThe activity heatmap on its own
daily · weekly · monthlyUsage per day, ISO week, or month
models · projects · sessionsThe three breakdowns. models --detail adds context window, capabilities, and benchmark scores
blocksUsage in five-hour windows, the shape Claude-style rate limits use
wrappedA year in review, built from the local archive
budgetSoft caps on list-rate equivalent value, daily or monthly. Advisory, never a charge
statuslineOne line for a shell prompt or an editor status bar. Reads the archive only, so it stays fast
exportCSV or JSON of the events themselves, counters and ids only
doctorArchive health, and a reconciliation against Claude Code's own rollup
scanRead new data from your tools into the archive. Everything else reads that archive
setupScan, schedule, and optionally connect an account, in one pass. Safe to run again
scheduleInstall the automatic scan, sync, and update entries for this platform
pricing · catalog · plansThe local list-rate, model, and subscription snapshots, refreshed on request
auth · fetchVendor credentials and remote usage, for the sources that cannot be read off disk
login · device · sync · logoutLink this machine to an account and upload sealed aggregates. Opt in
updateCheck or apply a newer release, verified against the release checksums
mcpThe MCP server over stdio, local archive only

The help center has the longer version: which command shows what.

Why now rather than later

The history you did not collect is gone

Claude Code deletes its transcripts after about 30 days, and the vendor windows slide behind you. Whatever you have not collected by then cannot be recovered by anyone, at any price. Install it the week you first wonder about your usage and you get a year of it; install it the week you need the answer and you get 30 days.

Which is also why it protects what it has collected: a copy a day, seven kept, taken in a way that cannot be caught half-written, and never overwritten behind your back. tokenstat doctor tells you how many there are and what they cost you on disk.