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

tokens-gone

v0.2.14

Published

Local dashboard for AI coding agent token usage and costs. Reads Claude Code, Codex, and Pi logs, aggregates spend, slices interactively.

Readme

tokens-gone

Local web dashboard for AI coding agent token usage and cost. Reads Claude Code, Codex, and Pi session logs, aggregates tokens and dollars, and lets you slice the data interactively.

Run

npx tokens-gone

That's it — it builds nothing on your machine, starts a local HTTP server, and opens your browser at the dashboard. Subsequent runs reuse the on-disk parse caches (~/.cache/tokens-gone/*.json), so warm scans are sub-second even with thousands of session files.

Flags

-p, --port <n>   Port to listen on (default 27821, or $PORT)
--no-open        Don't open the browser
-h, --help       Show help
-v, --version    Print version

Environment

  • CLAUDE_CONFIG_DIR — override the Claude data dir (default ~/.claude).
  • CODEX_HOME — override the Codex data dir (default ~/.codex).
  • PI_CODING_AGENT_DIR — override the Pi agent dir (default ~/.pi/agent).
  • PI_CODING_AGENT_SESSION_DIR — override the Pi sessions dir directly.
  • PORT — same as --port.

Why

ccusage works but is slow (tens of seconds on real data) and refetches LiteLLM pricing every run. tokens-gone is the same idea but:

  • Cold scan: ~8s for 1.7GB of JSONL (5000+ files); warm: ~700ms.
  • Hardcoded Anthropic and OpenAI pricing — no network requests, ever.
  • Browser UI with click-to-filter on charts, models, projects, sessions.

How it works

  • server/providers/* walk provider-specific JSONL directories, parse logs streamingly, and cache parsed entries on disk keyed by (path, size, mtime). Unchanged files are reused verbatim; appended files are tail-parsed.
  • server/pricing.ts resolves Anthropic Claude and OpenAI GPT pricing by model name, including provider-prefixed and date-suffixed model IDs. It accounts for provider-specific caching, tiered pricing, and fast-mode rates.
  • server/server.ts exposes /api/data (gzipped) and /api/refresh.
  • The SPA loads all entries once and re-aggregates client-side on every filter change — fast enough for ~300k entries.

Development

Requires Bun for the dev/test loop. The published package runs on plain Node 20+.

bun install
bun run dev                # backend on :27821 + vite on :5173 (open :5173)
bun run dev:server         # just the backend (--hot)
bun run dev:client         # just vite

bun test
bun run typecheck
bun run build              # vite build + esbuild bundle of the server CLI

License

MIT