tokenstat
tokenstat

tokenstat help

Guides and how-tos

Install the CLI, read your own numbers, sync a machine, and publish a profile. Short, practical walkthroughs.

What tokenstat is, what it reads off your machine, and the one command that installs it on macOS, Linux, or Windows. Start here if you want to know where the numbers come from before you run anything, and how to remove it cleanly if you change your mind.

What tokenstat counts, and where the numbers come from
Every number tokenstat shows is read from files the coding tools already wrote on your machine. Here is which files, what gets counted, and how confident each count is.
Is tokenstat safe to run?
tokenstat reads session logs that contain your prompts and your code, because counting tokens requires it. Here is exactly what it does with them, what never leaves your machine, and how that boundary is enforced.
Install tokenstat on macOS, Linux, or Windows
One command per platform, what the installer actually does to your machine, and how to opt out of the parts you do not want. Plus why installing early matters more than it looks.
Uninstall tokenstat
One line to remove the schedule and the binary, one flag to delete your archive too, and the manual steps if you would rather do it by hand. Nothing is left behind that this page does not name.

Your token totals are mostly cache reads, and a cache read costs a fraction of fresh input. These guides explain what a raw token count actually tells you, why a big context is cheaper than it looks, and how to read a cost figure that is a list rate rather than a bill.

Syncing is optional and an account is private until you deliberately publish it. Here is every field that leaves your machine, the command that prints those exact bytes first, and what claiming a handle does to what other people can see.

Every coding tool tokenstat reads, where each one writes its usage on disk, and what it does not record. The gaps are named rather than papered over, because a confident zero is worse than an honest one.

An empty report, a machine that stopped syncing, or a total that disagrees with a vendor's billing page. Each guide names the likely cause first and the fix second, in the order worth checking.