Session Receipt

See what this work used, what's included, and where the numbers came from.

What it is

A local command-line tool that reads your Claude Code usage logs (and, experimentally, Codex logs) and prints a nutrition-label style receipt for one session or one day: the tokens recorded, an API list-price equivalent cost, and exactly which sources and prices produced each number.

Accounting is plain deterministic code. No model calls, no account, no upload, no telemetry. Making a receipt never touches the network.

Every receipt on this page is built from synthetic fixtures: fake projects, fake prompts, made-up usage. No one's real logs are shown.

Example receipt. Recorded usage: claude-sonnet-5-5 450 output, 110 fresh input, 1,000 cache writes, 2,500 cache reads; claude-haiku-5-5 200 output, 1,000 fresh input; mystery-model-9 30 output, 300 fresh input. Estimated cost: sonnet $0.0075, haiku $0.0002, mystery-model-9 unknown. Subtotal $0.0077, partial: excludes 1 unpriced model.
A synthetic Claude Code session, rendered by the tool. One model has no known price, so the total is marked partial instead of counting it as $0.

Example outputs

Each receipt comes in three formats: a self-contained HTML page, an SVG label, and JSON for scripts.

Example receipts and their formats
ExampleFormats
Claude Code session (the default receipt) HTML · SVG · JSON
Codex session (experimental support) HTML · SVG · JSON
Claude Code session with the optional --env scenarios (illustrative only, see below) HTML · SVG · JSON

How to read the numbers

API-equivalent cost, not your bill

The cost line is what the recorded tokens would cost at public API list prices. If you use a subscription plan, that is not what you are charged.

Prices are a dated snapshot

Prices come from a saved copy of OpenRouter's public model list, and every receipt prints the date of that copy. Refresh it whenever you like with session-receipt update-prices; that is the only command that uses the network.

Unknown stays unknown

If a model has no known price, its cost shows as unknown and the total is marked partial. It is never counted as $0.

Claude Code first, Codex experimental

Claude Code logs are the main target. Codex support is experimental: its prices are not checked against the snapshot, and token counts from different providers are not comparable.

Environmental scenarios are optional and illustrative

With --env, a receipt adds low/central/high energy, water and carbon scenarios built from published estimates. They are not measurements and not bounds, and they are off by default.

Try it

In Claude Code, install it as a plugin:

/plugin install session-receipt --marketplace parttimediarybehavior/session-receipt

Or, without Claude Code's plugin system, in one line (macOS and Linux), then render the synthetic demo:

git clone https://github.com/parttimediarybehavior/session-receipt.git && npm ci --prefix session-receipt
session-receipt/bin/session-receipt demo --out sr_demo --now 2026-01-06T12:00:00Z

Then session-receipt/bin/session-receipt session --latest for your most recent session. Python 3.10+ and Node.js are required; Linux x64 and Windows 10 x64 have been tested. The README covers Windows. Your logs are only read, never modified, and nothing leaves your computer.