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

tokenscope-ai

v0.2.2

Published

Chrome DevTools for your context window — see where your AI tokens go

Readme

npm version

tokenscope

Chrome DevTools for your context window. See exactly where your AI tokens go — and stop wasting them.

tokenscope treemap report

Your agent session just burned 500K tokens. Where did they go? tokenscope profiles your session logs and tells you: which files got re-sent six times, which tool result dumped 20K tokens of JSON the model never used, and what it's costing you.

npx tokenscope-ai ~/.claude/projects/my-project

tokenscope terminal output

Why

  • 100% local. No API key, no account, no telemetry. Your logs never leave your machine.
  • Actionable. Every finding comes with a concrete fix and an estimated saving — like a linter, not a dashboard.
  • Fast. Profiles a session in under a second.

Install

npx tokenscope-ai <session.jsonl>        # zero-install
npm install -g tokenscope-ai            # or install globally

Usage

tokenscope-ai ~/.claude/projects/my-project        # newest session in a directory
tokenscope-ai session.jsonl                        # a specific session file
tokenscope-ai session.jsonl --html report.html    # + shareable HTML treemap report
tokenscope-ai session.jsonl --plan pro             # budget usage instead of dollar cost (Pro/Max subscribers)

The HTML report is a single self-contained file — open it in any browser, share it with your team, attach it to a PR.

Supported sources

| Source | Status | |---|---| | Claude Code session logs (~/.claude/projects/) | ✅ v0.1 | | Universal proxy mode (any tool, any provider) | 🔜 v0.2 | | OpenAI / raw API JSONL dumps | 🔜 v0.3 | | Gemini CLI, aider, community adapters | 🔜 adapter spec |

Token counts use a local tokenizer (o200k) and are estimates (~±5%) — profiling is about proportions and deltas, not billing precision.

Findings rules

| Code | Detects | |---|---| | W001 | Repeated content — the same chunks sent multiple times | | W002 | Bloated tool results — oversized outputs dominating the context | | W003 | Cache opportunity — low/no prompt cache hit rate (or, without usage data, heavy repeated content) that caching would fix |

More rules (cache-miss analysis, conversation decay, dead-weight system prompt sections) are on the roadmap. Have an idea for a rule? Open an issue.

Contributing

Adapters are ~100 lines: parse your tool's log format into the unified session model (src/parser/claudeCode.js is the reference). PRs welcome.

License

MIT