CLI
You may want to see what your own agent sessions cost, with or without your organization. The CLI, tc, reads session files, splits sessions with your rules, and submits. It works with no service connected.
Install
# macOS and Linuxbrew tap tokencontroller/tap https://github.com/tokencontroller/tokencontrollerbrew install tc
# Windows: tc-x86_64-pc-windows-msvc.zip from the GitHub releasesBinaries for macOS, Windows and Linux, on Intel and ARM, are on GitHub.
Connect, or stay local
tc connect https://app.tokencontroller.com/i/kestrel-4f2a # your invite linktc statusWithout tc connect the CLI keeps everything on your machine. It still splits sessions with your personal rules and shows reports. tc ships no prices: offline it prices with your own table, set with tc config price-table; connected, it uses the service's.
Everyday commands
tc review # your sessions since the last submit and where they were puttc tag 5 feature=KD-231 # set a tag on session 5 by handtc submit # submit everything since your last submittc report --by team # cost per value of any tag or attribute (default: feature)tc export --csv # every message as CSV, for a spreadsheetWith no service, the export is enough to report by hand. Every command and setting is in the CLI reference.
Only some folders
If you work for several clients, or want one project counted, track its folder:
tc list # the folders your sessions ran intc track ~/work/storefront # count only sessions there and belowWithout a tracked folder, tc counts every session on the machine. The first time you run it at a terminal, it asks whether to track the folder you are in. Sessions the Claude Code mod reports always count. Details are in the CLI reference.
What it reads
Session files of Claude Code and Codex, counted the way the open source ccusage project counts them: one message per model call, with its token counts by kind. Every other agent reports by telemetry or through the token entries endpoint. Reading the same files twice changes nothing, so run it as often as you like. There is no background process and no sync between your machines: each machine submits its own messages.
What it sends
tc submit sends each session as a token entry: its messages, the working directory, the branch, the feature keys found in your prompts, and the tags and splits it set. It never sends prompt text.
| Claude Code | Codex | |
|---|---|---|
| Provider | None; the session file names none. | The provider Codex reports, such as openai. |
| Sign-in | The organization of a claude.ai or Console sign-in, as Claude Code wrote it at session start, as the signal organization.id. Nothing for an API key. |
Nothing. |
tc never puts today's sign-in on a session that started earlier. A message without a provider is priced when every provider in the price table charges the same for its model; see Price table.