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

tokenjam

v0.6.6

Published

Zero-install launcher for TokenJam (tj): npx tokenjam runs the Python CLI via uvx/pipx and reports the recurring mistakes your AI agent keeps repeating, no setup required.

Downloads

1,526

Readme

tokenjam

npm npm downloads PyPI License: MIT

TokenJam ingests telemetry data about your agents from a multitude of sources and provides you a quick and easy way to visualize and optimize cost so that you get the most out of the tokens you pay for. This package is the zero-install launcher: no pip environment, no manual config.

npx tokenjam onboard   # or: pipx install tokenjam && tj onboard

What you get

tj onboard is guided setup: it writes a config, generates an ingest secret, and asks how you use AI agents (Claude Code, Codex, or your own SDK/API agents) to wire the right path. For Claude Code and Codex that means backfilling recent history and installing a statusline and hooks for live capture; restart and you're live. Onboarding unlocks the analyzer suite, the Lens dashboard, and the zero-token statusline in one command.

Your answer also decides which analyzers run. A coding-agent user (Claude Code, Codex) and an SDK/API user can change different things: the coding agent's harness builds the request and owns the prompt template, while an SDK process has no on-disk transcript and no subagent dispatch. Most analyzers run for both; the ones whose fix your persona can't reach are skipped rather than shown as advice you can't act on.

And it doesn't stop at advice. Every analyzer ends in a fix you can apply: a rule written into the right instruction file, an unused MCP server scoped down, a subagent pinned to a cheaper model, a cache breakpoint placed in the request your code builds. Each one is staged as a diff, dry-run by default, and undoable.

Commands

All arguments pass straight through to the Python CLI, so any tj subcommand and flag works here too.

| Command | What it does | |---|---| | npx tokenjam onboard | Guided setup: writes a config, generates an ingest secret, and optionally installs the background daemon for live capture. | | npx tokenjam context | Where your quota goes: re-read vs. net-new share, recurring inclusions, /compact candidates. | | npx tokenjam optimize | Cost-saving candidates from your actual usage: recurring blockers, repeat context, model downsizing, subagent right-sizing, unused MCP servers, oversized instruction files, and more. | | npx tokenjam rules list | The fixes on offer, and the files each would be written into. stage / check / apply / undo complete the loop. | | npx tokenjam | Bare run: still works, still zero-install, still a reference passthrough to the Python CLI. |

Go deeper

tj onboard sets up live capture, the local Lens dashboard, and the zero-token statusline in one command. From there:

tj optimize     # cost-saving candidates from your actual usage
tj rules list   # the fixes on offer, and the files they'd be written into
tj serve        # open the Lens dashboard at http://127.0.0.1:7391/

How the launcher works

This npm package is a thin launcher, not the real CLI. npx tokenjam shells out to the first available Python runner:

  1. uvx --from tokenjam tj …
  2. pipx run --spec tokenjam tj …
  3. an already-installed tj on your PATH

The real CLI is the Python package tokenjam (command: tj).

Requirements

A Python runner: uv (recommended) or pipx. If neither is present, npx tokenjam prints install guidance instead of failing silently.