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

@asynx6/agentburn

v0.1.1

Published

Where did my AI money go? Reads Claude Code session transcripts and shows token burn per project, session, model — with cache-hit ratios that explain the bill.

Downloads

119

Readme

agentburn

Where did my Claude Code money go? It reads the session transcripts already sitting in ~/.claude/projects/, prices every model turn at Anthropic list rates, and breaks your burn down by project, model, day, and session — plus a cache-hit ratio that usually explains the biggest number on the page.

$ agentburn

  agentburn — ~/.claude/projects
  4 sessions · 122 model turns · $40.53 at list price
  11.52M in · 0.50M out · cache hit 62%

  project            turns  cost     cache%  tokens
  ──────────────────────────────────────────────────────────────
  gameforge          34     $29.04   63%     2.59M in · 0.12M out
  FictionFlow        28     $6.40    61%     2.92M in · 0.11M out
  tokenzip           41     $3.21    62%     5.27M in · 0.24M out
  pustakita          19     $1.87    58%     0.74M in · 0.04M out

(Sample output from fabricated transcripts — node gen-demo.mjs regenerates it. On a real machine it reads your real history.)

Why the two numbers that matter are turns and cache%

Claude Code re-sends context every turn. A 40-turn session that writes a big project to cache on turn 1 and reuses it 39 times is cheap. The same session blowing its cache every few turns (/compact, switched model, changed MCP servers) pays full input price repeatedly — that's the bill you never see explained anywhere else. agentburn surfaces it per project:

  • turns — how chatty the session really was
  • cache% — share of input served from cache (90% cheaper than fresh)
  • cost by model — the opus rows always sort first, and they should

Usage

npx @asynx6/agentburn   # or npm i -g @asynx6/agentburn
agentburn                    # totals + top projects
agentburn --models           # which model ate the budget
agentburn --days             # per-day table (find your bad Tuesday)
agentburn --sessions         # top individual sessions
agentburn --project tokenzip # one project, all details
agentburn --since 2026-09-01 # cutoff
agentburn --dir ./transcripts   # custom path (CI, other machines)
agentburn --json             # machine-readable, pipe to anything

Zero dependencies, Node ≥ 18, single file, auditable. Reads local JSONL only — nothing is uploaded anywhere, no API key needed.

Honest limitations

  • Prices are Anthropic list numbers from lib/pricing.js (2026-09). Max/enterprise plans, prompt-discount agreements, or third-party backends (Bedrock/Vertex contracts) bill differently. Unknown models are counted as $0 and listed, never guessed.
  • Transcript usage is what the API reported — it excludes any overhead your plan adds.
  • Sub-agent (sidechain) turns are counted, attributed to their parent project; they show up as high turn counts.
  • Claude Code can rewrite transcripts (compaction); we dedupe by message uuid but a rewritten history is billed as-is.
  • The number is a ceiling estimate "what this would cost at list price", not a invoice reconciliation.

Tests

node test.js   # pricing math, dedupe, project parsing, --since

Ecosystem

Made by the same hands as tokenzip (what one image costs before you send it) and vibe-locker (what you leaked while shipping). agentburn closes the loop: tokenzip saves the tokens up front, agentburn shows what happened after.

License

MIT