Source available · Local first
One dashboard for your entire agent stack
tokenstat is a usage monitor and manager for the whole AI coding stack. Claude Code, Codex, Cursor, Grok, and the rest all tracked in one place: token statistics, spend at list rates, a full-year heatmap, quota dashboards, workspaces, automations, and remote machine management.
CLI available for all platforms
Windows and Linux desktop apps and iOS and Android companions are planned.
Six screens from the app, in dark. Click any one to zoom. Screens from tokenstat desktop v0.2.1 · 5 August 2026; the app ships faster than this page, and the walkthrough shows what changed.
The CLI, if you prefer the terminal
Three commands, no account
Nothing to sign up for and nothing to configure. tokenstat finds the logs your tools already wrote, builds a local archive, and reports across every tool it can read.
Scan
Finds every supported harness's session logs on disk, parses them, and drops everything that is not a counter at the parser boundary.
Normalize
One schema for input, output, and cache across vendors. Dedups on request identity, and fixes the day boundary to your own timezone at ingest.
Report
Prices against a dated rate snapshot, separates plan-covered usage from metered spend, and prints the heatmap, tables, or export you asked for.
A real profile dump: heatmap, models, and list-rate value in one view. Those prices are not a bill. Most of that usage is covered by a subscription. Your numbers stay on your machine unless you choose to sync.
The engine behind the window
The app and the CLI read the same archive, so the window and the terminal always agree. One static binary, no runtime, on macOS, Linux, and Windows.
$ curl -fsSL https://tokenstat.ai/install.sh | bashOptional, and free to skip
The hosted side, if you want it
Everything above runs on your machine and always will. An account adds the one thing a local tool cannot: the same stack across every machine you work on. You never have to make one.
- Every machine in one pictureA local CLI only sees the machine it runs on. Sync a work laptop, a personal machine, and a desktop, and the whole stack adds up.
- A profile, if you want onePublic at tokenstat.ai/yourname, or private forever. Aggregates only: no project names, no paths, no prompts.
- A year in review you can shareYour year as a card, rendered server-side. Link previews show it, and you can post it anywhere.
Supported tools
The stack it can see, and what it cannot
Claude Code, Codex, Grok Build, Cursor, OpenCode, and the rest of the modern AI coding stack. Tools that write token counts to disk are read locally with no account and no network. Where usage is genuinely unavailable, tokenstat says so instead of inventing zero.
Session JSONL, with subagents and rollup recovery
Rollout logs, plus inline rate-limit windows
Unified log, with per-session backfill
Local SQLite, includes vendor-computed cost
Per-session message metrics
Local session logs
Thread database, including local models
Local session logs
On disk. The IDE syncs over its language server while the app is open
No counts on disk. Reads a credential the app already left on the machine, then asks Cursor
9 tools read straight off the disk with no account and no network. The one that needs an API is named rather than quietly omitted.
What you get
One monitor for your whole AI stack
One heatmap, every tool
A GitHub-style activity calendar across Claude Code, Codex, Grok Build, Cursor, and the rest. Days, tools, and models in one view so you can see exactly where the usage went.
Every model, every tool
Input, output, cache read, and cache write, normalised per model. Cache means different things to different vendors, so they fold onto disjoint buckets before anything is summed.
What your plan actually covered
Subscription usage shows as list-rate value with a qualifier, never as a bill. Types make it impossible to mix plan-covered work with metered spend. A number that blends the two is a wrong number.
Correct, and you can check it
More than half of Claude Code's assistant rows are duplicates from session resume. tokenstat dedups on request identity, and `doctor` reconciles against the vendor's own rollup so you see drift instead of trusting an average.
Keeps what your agent forgets
Claude Code deletes transcripts after 30 days by default. Usage never scanned before then is gone from the machine for good. Install it before you get curious, not after.
Agents can ask their own spend
An MCP server on the local archive. An agent at 90 percent of a rate-limit window can change what it does next. No hosted server and no account required.
Privacy
Your prompts never make it past the parser
Anything that counts your tokens has to open the files your prompts and your code live in. Any tracker claiming it never reads them is describing something its own file access contradicts. What tokenstat guarantees is not the read. It is the boundary.
- Prompts and replies
- Code in context
- File paths
- Project and repo names
- Session ids
- A date
- Four token counts
- A model id
- A harness id
- A salted hash, unreadable by me
And only if you run tokenstat sync. Nothing leaves otherwise.
No account, no telemetry
Everything happens on your machine. There is no network call at all unless you ask for one.
Enforced, not promised
The core library cannot link a network stack, and that is checked in CI rather than asserted in a policy.
Local reports keep everything
Your own reports show real project names and models, because that is the useful version and it stays with you.
Open for review, so none of it is trust
The source for everything that runs on your machine is published so anyone can read it. Every claim on this page is a file you can check rather than a sentence you have to believe.
Why now
Your agent is already deleting the evidence
Claude Code removes its transcripts after 30 days by default. Usage never scanned before then is gone from the machine for good, and with it the only honest record of what your stack did. tokenstat keeps what your harnesses discard, so install it before you get curious, not after.
tokenstat doctor compares your archive against Claude Code's own rollup and shows how much has already been lost.
$ tokenstat schedule --installArchiveevents 51,883range 2026-06-17 to 2026-07-29 (43 active days)Confidenceexact ███████████████████▍ 50,364 97.1%strong ▌ 1,337 2.6%derived ▏ 182 0.4%Against Claude Code's own rollupit reports 89.6M input + output over 1,495 sessionsarchive has 135.9M input + output over 1,090 sessionsarchive is complete, and 46.2M ahead of the rollup
A sleeping Mac makes all of this a shorter number
The runs worth measuring are the long ones, and those are exactly the ones a sleeping Mac kills. Keepresso keeps it awake on your terms: timed sessions, closed-display mode with the lid shut, and automation leases an agent can hold through an MCP server, so the machine stays up only while there is real work happening.
tokenstat counts the work. Keepresso makes sure it finishes.
Check out KeepressoGet started
See what your stack actually did
A $20 plan can cover hundreds of dollars at list rates. tokenstat shows every tool and model, the full-year heatmap, and what that usage was worth, without calling that number a bill. Source-available and offline. Syncing a profile is optional.
CLI available for all platforms
macOS only for now. Windows and Linux desktop apps and iOS and Android companions are planned. The CLI covers all three platforms today.