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

pi-usage-plus

v0.2.0

Published

Super usage/quota extension for Pi & Pi Web – 10+ providers, Kimi/Moonshot, OpenRouter, OpenCode Go, DeepSeek, GLM, dual Pi & Pi Web compatible

Downloads

466

Readme

Pi Usage Plus

中文文档

Super usage/quota extension for Pi and pi-web — dual compatible, 10+ providers, Kimi/Moonshot, OpenRouter, OpenCode Go, DeepSeek, GLM, and pi-bridge unified quota.

Forked from @wayner6/pi-usage with expanded provider coverage and Pi & Pi Web dual-host hardening.

What it shows

  • A compact status line for the active model, such as Codex · 5h 92% · 7d 85% or Kimi · Balance ¥42.50.
  • Remaining balance, rate-limit windows, and reset times when the provider exposes them.
  • Live output speed while generating (e.g. · ⇣42 tok/s), sampled once per second from in-memory session usage — no extra network or disk I/O, hidden when idle.
  • Details for every configured provider through /usage.

The display follows the active model. It does not turn request failures into a zero balance.

Supported providers

| Provider | Authentication | Available information | | --- | --- | --- | | OpenAI Codex | ChatGPT Plus/Pro OAuth | 5-hour and 7-day quota windows | | xAI / Grok | OAuth | Account verification and spending-limit status | | Anthropic Claude | Claude OAuth or API key | Subscription status or API rate-limit headers | | DeepSeek | API key | Account balance | | GLM / Zhipu BigModel | API key | Coding Plan quota windows; standard pay-as-you-go keys cannot be queried | | OpenRouter | API key (or OAuth) | Account balance (total_credits - total_usage) | | OpenCode Go | API key | Rolling 5h / weekly / monthly quota windows | | Kimi / Moonshot | API key | Account balance (moonshot.cn / moonshot.ai auto-switch) | | CLIProxyAPI | pi-bridge plugin | Upstream quota windows and reset times (requires pi-bridge on the proxy) |

  • Pi & Pi Web dual compatible: Uses standard ExtensionAPI (setStatus/setWidget) which Pi Web's ExtensionStatusBar/ExtensionWidgets both implement. Includes Pi Web model_select watcher (750ms) so idle model switches are reflected.
  • Trust boundary: All provider requests use sameOriginFetch(url, expectedOrigin) – no cross-origin credential leak, no cookie/telemetry forwarding.

Pi Usage Plus uses Pi's existing provider authentication (OAuth tokens or API keys). CLIProxyAPI is queried via pi-bridge (Management Key never read).

Install

npm (recommended)

In Pi's terminal:

pi install npm:pi-usage-plus

In pi-web: open Settings → Plugins → Add Plugin, enter the following in Source, choose global, then select Install:

npm:pi-usage-plus

GitHub

In Pi's terminal:

pi install github:VinceJan/pi-usage-plus

In pi-web: open Settings → Plugins → Add Plugin, enter:

git:https://github.com/VinceJan/pi-usage-plus

After installing or updating, reload the session if it is already open.

Update

pi update npm:pi-usage-plus
# or
pi update --extensions

In pi-web: Settings → Plugins, select pi-usage-plus, choose Update, then use Reload Session.

Use

Send a normal message to refresh the quota for the active model. The status line then updates automatically.

In pi-web, an idle model switch is applied when the next message is sent. To refresh it immediately, use Reload Session.

| Command | Result | | --- | --- | | /usage or /quota | Show all available provider balances and quotas | | /usage current | Show the active model's provider only | | /usage refresh | Refresh the active provider now | | /usage doctor | Show authentication, adapter, and bridge diagnostics | | /usage settings | Show current plugin settings |

Settings

Use /usage settings followed by one of these commands:

/usage settings status on|off       # status line; on by default
/usage settings rate on|off         # live tok/s in the status line; on by default, hidden when idle
/usage settings widget on|off       # detailed widget; off by default
/usage settings interval <seconds>  # refresh interval; 120 by default
/usage settings timeout <seconds>   # request timeout; 10 by default

Settings are stored locally at ~/.pi/agent/pi-usage/config.json.

Privacy

Same as upstream: no browser cookies, telemetry, cloud sync, or third-party credential forwarding. Requests stay on the provider's official origin.

Credits

  • Upstream: @wayner6/pi-usage – original architecture, pi-bridge, GLM/Dual integration
  • Provider APIs: OpenRouter, OpenCode AI, Moonshot, DeepSeek, Anthropic, etc.
  • Community: LINUX DO

License

MIT