Free tool · open source, MIT

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.

terminal
$ npx github:henrikdukefoss/tokenreceipt

Made by Standard Compute. Plans from $19/mo →

Sample token receipt card, paper theme: Codex CLI, Claude Code, OpenCode and Gemini CLI totalling $113.16 at API list prices
Sample receipt from test data

Which agent logs does it read?

Each agent is detected on its own. Agents that are not installed are skipped.

AgentWhere it reads
Claude Code~/.claude/projects/**/*.jsonl
Codex CLI~/.codex/sessions/**/*.jsonl
OpenCode~/.local/share/opencode/opencode.db
Gemini CLI~/.gemini/tmp/*/chats/
ClineVS Code globalStorage, ~/.cline/data/sessions
Roo CodeVS Code globalStorage tasks
Kilo Code~/.local/share/kilo/kilo.db
Pi~/.pi/agent/sessions/**/*.jsonl
Hermes~/.hermes/state.db

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. --offline makes 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.

TokensPriced at
Uncached inputThe model's input rate
Output, reasoning includedThe output rate
Cache readsThe cache-read rate, or the input rate when the model has none
Cache writesThe 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

OptionWhat 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
--jsonTotals per agent and model as JSON
--agent <ids>Only some agents, comma separated, for example claude-code,codex
--offlineUse the bundled price table and make no network request
--no-colorPlain 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.

tokenreceiptccusage
Best forOne receipt for a period, to check or to postOngoing tracking across days, sessions and billing windows
ReportsPer agent and per model, one totalDaily, weekly, monthly, session and 5-hour blocks
Agents9, including Cline and Roo Code18, including Amp, Goose and Copilot CLI
Image outputSVG or PNG receipt cardTerminal 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 →