What would your coding agents cost at API prices?
Run npx github:henrikdukefoss/tokenreceipt in a terminal. It reads the usage logs that Claude Code, Codex CLI, OpenCode, Gemini CLI, Cline, Roo Code, Kilo Code, Pi and Hermes already keep on your machine and prints a receipt with tokens and the API list price per agent and per model.
$ npx github:henrikdukefoss/tokenreceiptSource on GitHub ↗Node 18 or newer. No account, nothing uploaded.
Made by Standard Compute. Plans from $19/mo →

Which agent logs does it read?
Each agent is detected on its own. Agents that are not installed are skipped.
| Agent | Where it reads |
|---|---|
| Claude Code | ~/ |
| Codex CLI | ~/ |
| OpenCode | ~/ |
| Gemini CLI | ~/ |
| Cline | VS Code globalStorage, ~/ |
| Roo Code | VS Code globalStorage tasks |
| Kilo Code | ~/ |
| Pi | ~/ |
| Hermes | ~/ |
VS Code storage is checked for Code, Insiders, VSCodium, Cursor and Windsurf. Each agent's own data-folder environment variable is respected; see the README.
What leaves your machine?
- Your logs
- Read in place. Never copied or uploaded.
- Network
- One request for LiteLLM's public price list, cached for a day.
--offlinemakes none. - The receipt
- Agent names, model names, token counts and prices. No prompts, file paths, project names or hostname.
How is the price worked out?
Every request is priced on its own, each token type at its own LiteLLM list rate.
| Tokens | Priced at |
|---|---|
| Uncached input | The model's input rate |
| Output, reasoning included | The output rate |
| Cache reads | The cache-read rate, or the input rate when the model has none |
| Cache writes | The cache-write rate; Claude Code's 1-hour writes at the 1-hour rate |
Requests over the vendor's long-context threshold use long-context rates. Models missing from the price list are shown as unpriced.
Options
| Option | What it does |
|---|---|
--since <period> | 7d, 30d (default), 90d, any <n>d, all, or a start date YYYY-MM-DD |
--svg <file> | Write the receipt card as SVG |
--png <file> | Write the card as a 2x PNG, using rsvg-convert, resvg or a local Chrome, Chromium or Edge |
--theme <name> | Card theme: paper (default) or dark |
--json | Totals per agent and model as JSON |
--agent <ids> | Only some agents, comma separated, for example claude-code,codex |
--offline | Use the bundled price table and make no network request |
--no-color | Plain terminal output |
tokenreceipt or ccusage?
If you track Claude Code every day, ccusage is the better tool. tokenreceipt is for a single answer across every agent you run, and for posting it.
| tokenreceipt | ccusage | |
|---|---|---|
| Best for | One receipt for a period, to check or to post | Ongoing tracking across days, sessions and billing windows |
| Reports | Per agent and per model, one total | Daily, weekly, monthly, session and 5-hour blocks |
| Agents | 9, including Cline and Roo Code | 18, including Amp, Goose and Copilot CLI |
| Image output | SVG or PNG receipt card | Terminal tables and JSON |
From the ccusage README, checked 13 October 2026.
Questions
Is the receipt total what I actually paid?
No. It is what the same tokens would cost on pay-as-you-go API billing at public list prices. If you use Claude Max, a ChatGPT plan, a discount or free credits, you paid something else. The number is useful for comparing your subscription with API billing.
How do I make a shareable image of my Claude Code or Codex usage?
Run npx github:henrikdukefoss/tokenreceipt --png receipt.png. The PNG needs rsvg-convert, resvg or a local Chrome, Chromium or Edge. Without one, use --svg receipt.svg, open it in a browser and take a screenshot. Add --theme dark for the dark card.
Can I see only Codex or only OpenCode usage?
Yes. Add --agent with the agent ids, for example npx github:henrikdukefoss/tokenreceipt --agent codex,opencode. Add --json to get the totals per agent and model as data instead of a receipt.
Why does a model show as unpriced?
The model is missing from LiteLLM's price list, or a gateway reported it under its own name, such as standardcompute. tokenreceipt shows its token count and never guesses a price.
Which agents are planned next?
Amp, Goose, Aider, Continue, Zed, Copilot CLI and OpenClaw. A reader is added once its log format is confirmed from source code or documentation, and pull requests with a test fixture are welcome on GitHub.
Who makes tokenreceipt
Standard Compute, an API for coding agents on flat monthly plans with a compute budget you can see in the dashboard. The counting and pricing in tokenreceipt work the same whichever provider you use.
Related tool: contexttax measures what CLAUDE.md, AGENTS.md and MCP tools add to every request →
