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 | bashGetting 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
| Command | Shows |
|---|---|
| tokenstat | Full-screen interactive client, with tabs, headline stats, and a command field |
| summary | Headline numbers, the activity grid, and the model breakdown |
| heatmap | The activity heatmap on its own |
| daily · weekly · monthly | Usage per day, ISO week, or month |
| models · projects · sessions | The three breakdowns. models --detail adds context window, capabilities, and benchmark scores |
| blocks | Usage in five-hour windows, the shape Claude-style rate limits use |
| wrapped | A year in review, built from the local archive |
| budget | Soft caps on list-rate equivalent value, daily or monthly. Advisory, never a charge |
| statusline | One line for a shell prompt or an editor status bar. Reads the archive only, so it stays fast |
| export | CSV or JSON of the events themselves, counters and ids only |
| doctor | Archive health, and a reconciliation against Claude Code's own rollup |
| scan | Read new data from your tools into the archive. Everything else reads that archive |
| setup | Scan, schedule, and optionally connect an account, in one pass. Safe to run again |
| schedule | Install the automatic scan, sync, and update entries for this platform |
| pricing · catalog · plans | The local list-rate, model, and subscription snapshots, refreshed on request |
| auth · fetch | Vendor credentials and remote usage, for the sources that cannot be read off disk |
| login · device · sync · logout | Link this machine to an account and upload sealed aggregates. Opt in |
| update | Check or apply a newer release, verified against the release checksums |
| mcp | The 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.