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

@smithers-orchestrator/usage

v0.24.2

Published

Report how much rate limit or subscription quota each registered Smithers account has consumed, across Claude, Codex, OpenAI, Anthropic, and Google providers.

Downloads

765

Readme

@smithers-orchestrator/usage

Report how much rate limit or subscription quota each registered Smithers account has consumed. Powers smithers usage.

$ smithers usage
ACCOUNT       PROVIDER      PLAN   WINDOW          USED          RESETS IN
claude-work   claude-code   max    5-hour session  33%           2h 41m
claude-work   claude-code   max    weekly          13%           5d 3h
codex-main    codex         pro    5-hour          12%           4h 02m
codex-main    codex         pro    weekly          40%           6d 1h
openai-ci     openai-api    —      requests/min    820/1000 left 0m 42s

What it reads, per provider

The numbers live in three incompatible shapes, so every adapter normalizes to one UsageReport.

| Provider | Source | Auth read from | | --- | --- | --- | | claude-code | GET api.anthropic.com/api/oauth/usage (5h + weekly %) | <configDir>/.credentials.json or macOS Keychain Claude Code-credentials | | codex | GET chatgpt.com/backend-api/wham/usage (5h + weekly %) | <configDir>/auth.json | | anthropic-api | live anthropic-ratelimit-* headers off count_tokens | account apiKey | | openai-api | live x-ratelimit-* headers off a max_tokens:1 POST | account apiKey | | gemini / antigravity / gemini-api | none yet (Google exposes no live quota) | — | | kimi, others | none | — |

The subscription endpoints (claude-code, codex) are undocumented: they are the same endpoints the official CLIs call, reachable by reading the CLI's own OAuth token off disk. They are best-effort — any failure degrades to a source: "none" report with a readable reason, never an exception.

Design

  • getAccountUsage(account) is the dispatcher. It switches on account.provider, mirroring accountToProviderEnv in @smithers-orchestrator/accounts.
  • getUsageForAccounts(accounts, opts) fans out in parallel through an on-disk cache (usage-cache.json). Cached reports come back with stale: true. The cache enforces a hard 180s floor for claude-code because its usage endpoint 429s aggressively below that.
  • Credentials are read on the host that owns them. Only the normalized UsageReport ever leaves the process — no token is returned or logged.

Safety

  • The Claude usage endpoint requires User-Agent: claude-code/<ver> and anthropic-beta: oauth-2025-04-20. Override the UA with SMITHERS_CLAUDE_CODE_UA if the installed version matters.
  • --fresh bypasses the soft cache but never the hard per-provider floor.

See .smithers/specs/usage-and-limits.md for the full design and the phased plan (gateway RPC, studio dashboard, Google local-estimate accounting).