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-quotas-minimal

v0.1.0

Published

Quota footer status extension for pi (Codex, OpenCode Go, DeepSeek)

Readme

pi-quotas-minimal

Quota status extension for pi that shows remaining usage for subscription/API providers, in the style of pi-codex-usage.

Supported providers:

| Provider | Shown as | Data source | | --- | --- | --- | | OpenAI Codex (openai-codex) | Codex | https://chatgpt.com/backend-api/wham/usage (5h / 7d windows) | | OpenCode Go (opencode-go) | OpenCode Go | https://opencode.ai/zen/go/v1/usage (5h / week / month windows) | | DeepSeek (deepseek) | DeepSeek | https://api.deepseek.com/user/balance (prepaid balance) |

The status line appears automatically when the active model belongs to a supported provider. For unsupported providers nothing is shown.

Install

pi install npm:pi-quotas-minimal

Status line

Footer examples (percentages colored green/yellow/red by how much is left):

Codex 5h:(2h10m) 81% left 7d:(5d0h) 64% left
OpenCode Go 5h:(1h0m) 61% left week:(5d0h) 85% left month:(1d0h) 0% left
DeepSeek $110.00 ¥88.50
  • compact format shortens countdowns and drops the left/used suffix.
  • DeepSeek ignores the format setting (always 2-decimal balances).
  • Missing credentials → nothing is shown; a failed request → <Provider> unavailable.

Commands

| Command | Effect | | --- | --- | | /quotas | Open the settings menu. |

Menu items:

  • Show all sources — opens a framed popup panel (Provider Quotas) with a progress bar per window for every signed-in supported provider, r refreshes, q/Esc closes.
  • Status — show/hide the footer status for the current session (not persisted).
  • Modeleftused percentages.
  • Formatcompactfull.

Settings

Stored in ~/.pi/agent/quotas.json (or $PI_CODING_AGENT_DIR/quotas.json):

{
  "usageMode": "left",
  "format": "full"
}

Credentials are read from pi's own auth:

  • Codex: OAuth entry in ~/.pi/agent/auth.json (created by /login)
  • OpenCode Go: OPENCODE_API_KEY env var or auth.json["opencode-go"]
  • DeepSeek: DEEPSEEK_API_KEY env var or auth.json["deepseek"]

Development

npm install
npx tsc --noEmit --strict ... extensions/quotas-status.ts src/*.ts
pi -e ./extensions/quotas-status.ts   # quick test

License

MIT © 2026 Chuanjin Su