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

@nukcole-xinluo9510/pi-claude-subs-quota

v0.1.1

Published

Pi extension — live Claude subscription quota in a status widget

Readme

📊 pi-claude-subs-quota

Know before you're throttled. A pi extension that shows your live Claude quota directly below the editor — no powerline, no extra API calls, no configuration.

pi install npm:@nukcole-xinluo9510/pi-claude-subs-quota

The insight

Every Anthropic API response already carries this:

anthropic-ratelimit-unified-5h-utilization: 0.14
anthropic-ratelimit-unified-7d-utilization: 0.06
anthropic-ratelimit-unified-5h-reset: 1781764800

This extension intercepts those headers via pi's after_provider_response hook and renders them as a persistent widget row — reading free data that was always there.

Zero extra API calls. Zero extra cost. Zero configuration.

What you see

A compact line appears below your editor on every turn:

 🟢 5h:14% ↺2h30m   🟢 7d:6% ↺4d12h   ⏰5h

Type /quota for a detailed breakdown:

╭─ Claude Subscription Quota ─────────────────
│ 5h window  🟢 ████░░░░░░░░░░░░  14%
│            ↺ resets in 2h30m
│ 7d window  🟢 █░░░░░░░░░░░░░░░   6%
│            ↺ resets in 4d12h
│ Active limit: 5-hour window
╰─ Updated: 14:32:01 ────────────────

| Icon | Meaning | |------|---------| | 🟢 | < 70% used — you're fine | | 🟡 | 70–90% used — start wrapping up | | 🔴 | > 90% used — throttle imminent | | 🔶 | Throttled | | ⛔ | Blocked |

The ⏰5h / ⏰7d indicator shows which window is currently your binding constraint.

Highlights

  • 📡 Passive by design — reads headers already in every API response, adds nothing
  • 🖥️ No powerline required — uses pi's native setWidget API, works standalone
  • 🔑 Dual auth — auto-detects OAuth subscription token or ANTHROPIC_API_KEY
  • 🚀 Instant startup — probes on session start so you see data before your first turn
  • 🪶 Zero dependencies — only node built-ins, one peer (@earendil-works/pi-coding-agent)

Install

pi install npm:@nukcole-xinluo9510/pi-claude-subs-quota

Restart pi. The widget appears automatically.

How it works

pi-claude-subs-quota hooks two pi events:

after_provider_response — fires on every API call pi makes. Extracts the anthropic-ratelimit-unified-* headers and calls ctx.ui.setWidget() to update the row below your editor. No requests of its own — pure interception.

session_start — makes one lightweight probe (1-token message to claude-haiku) to populate initial values before you send your first message.

Auth is resolved in order:

  1. ANTHROPIC_API_KEY environment variable
  2. ~/.pi/agent/auth.json → OAuth access token (subscription login)
  3. ~/.pi/agent/auth.json → API key

Requirements

  • pi 0.79+

License

MIT