npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aireceipts-cli

v0.8.2

Published

Your AI coding agent just billed you. Here's the receipt.

Downloads

2,262

Readme

Your AI coding agent just billed you. Here's the receipt.

CI npm OpenSSF Scorecard License: Apache-2.0

not a mockup — a receipt comment on a merged PR of this repo, posted by aireceipts pr --post: three sessions — a Claude orchestrator sliced to just this PR's turns, plus two Codex helpers — $3.13 total. Read it live.

Why this exists. AI coding agents spend real money invisibly — you see the diff, never the bill. aireceipts reads the transcripts your agent already writes to disk and turns them into receipts: what a session cost, tool by tool; what a PR cost, across every session it can attribute; where tokens were wasted. It's local — your code, file contents, and raw transcripts never leave your machine, and pricing needs no network. A receipt is the one thing worth sharing, and sharing is always your call — a PR comment, a git ref, or an artifact page. A shared receipt carries cost, token, model, and tool figures, plus a short session title (often prompt-derived) — never your code, file contents, or the transcript itself (how).

Here's what one looks like — the exact bytes your terminal prints:

- - - - - - - - - - - - - - - - - - - - - - - - -
                    AIRECEIPTS                    
 “Add email format validation to the signup for…” 
 Claude Code · Jun 18 2026 09:30:30 UTC · 10m 30s 
    claude-opus-4-8 87% · claude-sonnet-5 13%     
         cache served 85% of input tokens         

pre-edit: 11% of cost (1/10 turns)
  (share before the first named edit tool)

Bash..............................$0.05  (3 calls)
Edit..............................$0.05  (2 calls)
(thinking/reply)..................$0.03  (2 turns)
Write.............................$0.03  (2 calls)
Read...............................$0.02  (1 call)
--------------------------------------------------
TOTAL........................................$0.18
same tokens on claude-haiku-4-5...$0.04 (78% less)
  (arithmetic, not a prediction)
- - - - - - - - - - - - - - - - - - - - - - - - -
     aireceipts · local · npx aireceipts-cli      
- - - - - - - - - - - - - - - - - - - - - - - - -

pre-edit is the share of cost spent before the first edit-tool call (reading a receipt). The same receipt renders as a shareable SVG (--svg, light and dark themes), versioned JSON (--json), or CSV (--csv).

Start here — three commands

See what a session costnpx aireceipts-cli Tool by tool, locally, including where tokens went to waste. No install, no account (--demo shows a bundled example if you have no sessions yet).

Live cost in your status bar — wire in aireceipts statusline (setup) One settings line puts running cost in Claude Code's status bar — and with --cwd, any terminal surface (tmux, starship, PowerShell) shows each pane its own session's cost, covering Codex and opencode too.

A receipt on every PRnpx aireceipts-cli pr --post Attaches the cost of the sessions behind a PR as a comment. Generation stays local; a drop-in CI check can require every PR to carry one.

Prefer a global install: npm i -g aireceipts-cli, then the command is aireceipts. Full walkthrough: getting started · a real one, live: PR #189.

Install — or let your agent do it

npm i -g aireceipts-cli

No account, no API key. The command is then aireceipts; or skip the install and prefix any command as npx aireceipts-cli. Full walkthrough: getting started.

Easiest: let your agent do it

You already have an AI coding agent (that's why you're here). Point it at this README and it can install aireceipts globally and wire up the statusline for you. In Claude Code, Codex, or any agent with shell access, paste:

Read https://raw.githubusercontent.com/anandgupta42/receipts/main/README.md
and follow the "Instructions for agents" section: install aireceipts globally
and set up the Claude Code statusline.

That's it. The agent handles the npm install and the settings edit, and shows you a receipt when it's done.

Instructions for agents

If you are an AI agent asked to install aireceipts, do the following:

  1. Install the CLI globally. Run npm install -g aireceipts-cli, then confirm with aireceipts --version. If global installs are not permitted on this machine, fall back to npx aireceipts-cli in the steps below and tell the user why.

  2. Set up the Claude Code statusline (skip if Claude Code is not installed, and say so). Add a statusLine entry to ~/.claude/settings.json:

    {
      "statusLine": {
        "type": "command",
        "command": "aireceipts statusline"
      }
    }

    Merge into the existing JSON; do not overwrite other settings. If a statusLine entry already exists, show it to the user and ask before replacing it. If aireceipts is not on the PATH that GUI-launched apps see, use the absolute path from which aireceipts as the command value.

  3. Verify. Run aireceipts to print a receipt for the newest session (aireceipts --demo if the user has no sessions yet), and aireceipts setup for a report of detected agents and suggested integrations. The statusline appears on the next Claude Code prompt; no restart of anything else is needed.

  4. Show the user the result. Print the receipt and tell them the statusline is active. Optional next steps they may want: aireceipts install-hook (consent-gated end-of-session mini-receipt) and aireceipts integrations (snippets for Codex, opencode, Cursor, and GitHub PR receipts).

Everything else it does

| Command | What it does | |---|---| | aireceipts | Receipt for the newest session (--list to pick another) | | aireceipts --mini | Six-line mini-receipt for the newest session | | aireceipts --details | Adds a DETAILS section — token composition, session shape, per-model split (classic template) | | aireceipts --template <name> / templates | Render a receipt style (classic, grocery, datavis); templates previews each — guide | | aireceipts setup | Found sessions, latest cost, week total, and the integrations that fit your machine — guide | | aireceipts pr --post [--artifact] | Attach the receipt of the sessions behind a PR as a comment; --artifact also publishes a durable receipt page — guide | | aireceipts compare <a> <b> | Two sessions side by side — models, tools, waste, ratio — guide | | aireceipts week | Trailing-7-day digest: totals, per-agent split, top waste — guide | | aireceipts backfill [--out <dir>] | Bulk receipts across your existing session history; summary by default, one file per session with --outguide | | aireceipts integrations [target] | Exact local snippets for Claude Code, Codex, opencode, Cursor, and GitHub — guide | | aireceipts --handoff | Paste-ready block that tells your agent what to do cheaper next time — guide | | aireceipts install-hook | Consent-gated Claude Code hook: every session ends with a mini-receipt — guide | | aireceipts statusline | Live cost line in Claude Code's status bar, or any terminal via --cwd (tmux/starship/pwsh) — setup | | aireceipts --quota / --check-budget | Claude Code rate-limit window, read from the statusline stdin payload (silent otherwise); --check-budget exits 1 when your local budget cap is exceeded | | aireceipts --json / --csv / --svg / --png | Versioned schema, RFC 4180 rows, shareable SVG/PNG image — schema | | aireceipts stats | Local usage counters — receipts generated on this machine |

The honesty rules

Every price is cited (vendor URL, date observed, a quoted excerpt — checked by CI). Every receipt is deterministic: same transcript in, byte-identical receipt out, golden-tested on every commit — including the receipts shown on this page. No model without a cited price row ever shows a dollar figure — tokens-only instead of a guess. Comparisons re-price the identical tokens; they never predict. What a receipt proves, and what it can't: docs/trust.md · aireceipts --methodology.

Supported agents

| Agent | Depth | |---|---| | Claude Code | Full: per-turn models, tools, cache tiers | | Codex CLI | Full per-turn parsing | | Gemini CLI | Full: per-turn models, tools, cache tokens | | opencode | Full: per-message models, tools, cache read/write; unknown models stay tokens-only | | Cursor | Honest degraded mode: session totals only (its logs carry no per-turn usage) |

Model prices move. A daily advisory tripwire cross-checks data/prices/ against an independent dataset and opens an issue when they disagree; every table change lands as a cited price-table PR.

Telemetry

Anonymous diagnostics and usage signals, on by default (in CI too) — error classes, duration buckets, parse-failure signatures, feature enums, and coarse buckets. Never code, prompts, paths, titles, or dollar amounts. See exactly what a run would send: aireceipts --telemetry-show. Kill it: AIRECEIPTS_TELEMETRY=off or DO_NOT_TRACK=1. Schema and rationale: docs/telemetry.md.

Docs

User guide — get started, every command, pricing, troubleshooting (hosted docs · site). Also: FAQ · What a receipt proves · PR receipts · JSON schema · statusline.

Looking for daily/weekly usage dashboards across agents? ccusage is the standard — aireceipts answers a different question: what a specific session or PR cost, with every number traceable.

Versioning & contributing

Pre-1.0 (0.x): minor versions may change behavior or output, patch versions are fixes only. The receipt's byte-stability contract is the compatibility surface — a change that breaks it is a major bump (changelog · releases). aireceipts is designed and largely built by AI agents under a spec-driven harness — adversarially validated specs, mutation-tested money paths, byte-golden outputs, and PRs that carry the receipt of the session that built them (how and why). Human PRs are welcome and run the same gates: CONTRIBUTING.md.

License

Apache-2.0.