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

@piash.tanjin/agent-usage

v0.3.0

Published

Open-source companion for Agent Usage: reports token counts from Claude Code, Codex, Pi, OpenCode, Muse Code and Gemini CLI, never content.

Readme

@piash.tanjin/agent-usage

The open-source companion for Agent Usage, a public leaderboard of AI coding-agent token usage. It reads token counts from your coding tools' local logs and uploads daily totals per tool and model — never prompts, code, file paths or credentials.

npx @piash.tanjin/agent-usage pair <CODE> --server <URL>   # no install needed

Or install it once and use the shorter agentusage command (the unscoped names agentusage/agent-usage on npm belong to other projects):

npm i -g @piash.tanjin/agent-usage
agentusage status

Requires Node.js 22.13 or newer.

Getting started

  1. Sign up on the Agent Usage website. Onboarding shows a one-time pairing code, valid for 10 minutes.
  2. Pair this machine. The first sync runs right away:
    npx @piash.tanjin/agent-usage pair ABC-123 --server https://your-agent-usage-site
  3. Keep it current:
    npx @piash.tanjin/agent-usage watch            # syncs every 5 minutes; Ctrl+C to stop
    npx @piash.tanjin/agent-usage sync             # or sync once, whenever you like

Commands

| Command | What it does | |---|---| | pair [CODE] [--server URL] [--name DEVICE] [--only a,b] | Pair this device with your profile, then sync. Prompts for the code if you leave it out. --only limits which tools are read and is remembered. | | sync | Upload daily token counts now. | | watch [--every MINUTES] | Keep syncing (default every 5 minutes). | | preview | Print exactly what would be uploaded. Nothing is sent. | | status [--period YYYY-MM\|all] | Your local totals by tool and model. No network. | | verify [claude\|codex\|cursor] [--yes] | Prove you own these accounts (see below). | | unpair | Revoke this device's upload credential and delete the local config. |

sync, preview and status also accept --only claude,codex,….

What it reads

| Tool | Local logs | |---|---| | Claude Code | ~/.claude/projects (or $CLAUDE_CONFIG_DIR/projects) | | Codex | ~/.codex/sessions, ~/.codex/archived_sessions (or $CODEX_HOME) | | Pi / OMP | ~/.pi/agent/sessions, ~/.omp/agent/sessions | | OpenCode | ~/.local/share/opencode/opencode.db | | Muse Code | ~/.local/share/muse/sessions (or $MUSE_SESSIONS_DIR) | | Gemini CLI | ~/.gemini/tmp/*/chats |

Tools you don't use are skipped. Counting rules follow CodexBar's local scanners, so streamed or resumed sessions aren't double counted.

Cursor keeps no token logs on disk. Its usage comes only from Cursor itself, through agentusage verify cursor.

What it sends

One record per tool, model and UTC day:

{
  "provider": "claude",
  "model": "claude-sonnet-5-5",
  "date": "2026-09-29",
  "input_tokens": 18230,
  "cached_input_tokens": 96410,
  "output_tokens": 4112,
  "event_id": "c1f0…9a2e",
  "collector_version": "0.3.0"
}

event_id is a hash of device, tool, model and day, so re-syncing a day replaces it instead of adding to it. Run npx @piash.tanjin/agent-usage preview to see your own records before anything is sent.

Verified accounts

Anyone can edit their local logs, so every number on the board is self-reported unless verified. verify proves you own the account behind your usage:

| Account | How | What leaves your machine | |---|---|---| | codex | The server checks OpenAI's signature on Codex's ID token. | Only the signed ID token, which can't be used to act as you. Your access token is never read. | | claude | The server asks Anthropic once who the login belongs to, then discards it. | Your Claude Code login token, once, after you confirm. | | cursor | The server reads your account and Cursor's own token counts from Cursor, then discards the login. | Your Cursor login token, once, after you confirm. |

A verified account can back only one profile. Verified profiles get a badge and skip the 7-day wait before new accounts are ranked.

Files

  • ~/.agent-usage/config.json holds the server URL and this device's upload credential (mode 0600). Override the folder with AGENT_USAGE_HOME.

License

MIT