tokenstat
tokenstat

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.

HomeHeatmap, plan limits, and today at a glance.
InsightsDaily volume, top models, and value at list rates.
WorkspacesSessions, files, and launch profiles for every harness.
HistoryUncommitted changes, reviewed before you commit.
Agent sessionClaude Code working beside the diff review.
BrowserYour pages and the docs, inside the app.

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.

18.8Btokens tracked
$13Kof usage at list rates
98.3%of it from cache
Platform stats → · updated 3 hours ago

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.

tokenstat.ai
Headline
SessionsRequestsInput + outputActive days~31268,823215.2M52
cache read 11.89B · cache write 217.3M · 12.33B counting cache
2026-06-17 to 2026-08-07 · peak hour not collected
busiest 2026-08-06 (1.07B) · streak 52 days, best 52
Modelinputoutputcachetotalpriceclaude-opus-5104.9k10.1M2.76B2.77B$1,82022.5%claude-opus-4-84.2M41.2M2.34B2.38B$2,47919.3%deepseek-v4-flash9.5M5.2M2.31B2.33B$318.9%claude-fable-52.1M26.5M1.61B1.64B$3,35313.3%claude-sonnet-5868.8k9.2M1.16B1.17B$4509.5%cursor-grok-4.5-high-fast37.6M4.2M508.6M550.4M$2534.5%grok-4.510.1M2M316.5M328.6M$1272.7%cursor-router-auto17.3M1.9M256.8M275.9M~$262.2%gpt-5.6-luna2.7M449.1k263.2M266.3M$342.2%

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 | bash

Optional, 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.

Claude Codeon disk

Session JSONL, with subagents and rollup recovery

Codexon disk

Rollout logs, plus inline rate-limit windows

Grok Buildon disk

Unified log, with per-session backfill

OpenCodeon disk

Local SQLite, includes vendor-computed cost

Clineon disk

Per-session message metrics

OpenClawon disk

Local session logs

Zedon disk

Thread database, including local models

Copilot CLIon disk

Local session logs

Antigravity CLIon disk

On disk. The IDE syncs over its language server while the app is open

Cursorapi

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.

Read on your machine
  • Prompts and replies
  • Code in context
  • File paths
  • Project and repo names
  • Session ids
All that can leave
  • 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 --install
Archive
events 51,883
range 2026-06-17 to 2026-07-29 (43 active days)
Confidence
exact ███████████████████▍ 50,364 97.1%
strong 1,337 2.6%
derived 182 0.4%
Against Claude Code's own rollup
it reports 89.6M input + output over 1,495 sessions
archive has 135.9M input + output over 1,090 sessions
archive is complete, and 46.2M ahead of the rollup
Keepresso

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 Keepresso

Get 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.