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

@npv12/opencode-quota

v2.1.1

Published

OpenCode quota visibility for the /quota command and TUI sidebar. Maintained fork of @slkiser/opencode-quota by Pranav (npv12).

Readme

OpenCode Quota

Quota visibility in OpenCode: the /quota command, the TUI sidebar panel, and a terminal show command.

This is a maintained fork of @slkiser/opencode-quota, published as @npv12/opencode-quota by Pranav (npv12).

[!IMPORTANT] You need OpenCode 2.0.16+ and Node.js 22.13+ or 23.4+.

Quick start

Add OpenCode Quota to opencode.jsonc or opencode.json, and keep your other plugins. The package also exports ./tui, which OpenCode loads automatically beside the server plugin:

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": ["@npv12/opencode-quota"],
}

Restart OpenCode, then type /quota. See Manual install for the settings file and alternatives.

What you get

  • Sidebar panel: always-visible, muted, headerless Quota rows with simple provider names, optional compact windows (1h, 5h, 7d, 30d), one-decimal resets (2.9h, 2.9d), and bare percentages. Non-time labels and unavailable countdowns are omitted. It keeps the lowest remaining window for each provider/source and keeps value rows. OpenCode Zen rows and errors are hidden from the sidebar.
  • /quota command: shows current quota as a popup dialog, or in the chat when tuiCommandDisplay is inline.
  • Terminal: npx @npv12/opencode-quota@latest show collects live quota and works even with OpenCode closed.
  • Scripts and status bars: show --json prints cached JSON, with an optional threshold probe for CI. See External integration.
  • Retry at the reset: when a request hits a limit and that provider's quota shows a used-up window, OpenCode retries after it resets. Turn off with waitForQuotaReset: false.

Commands

Slash commands

| Command | What it shows | | -------- | ------------- | | /quota | Current quota |

CLI commands

| Command | What it does | | --------------------------------------- | ------------ | | npx @npv12/opencode-quota@latest show | Show current quota as text or JSON |

show collects live quota in your terminal and works with OpenCode closed. Add --json for machine output that reads the cache instead, and --threshold <pct> (with --json) to exit non-zero when comparable cached quota is below the threshold. Add --help to see all options.

Providers

Most providers work automatically once you log in through OpenCode. Needs setup links show the extra step. OpenAI ChatGPT quota requires an OAuth login; stored API keys show "ChatGPT quota unavailable for API key" without a ChatGPT request.

Pre-configured American providers

| Provider | Auth/setup | Data from | Reports | | ------------------ | -------------------------------------------------------------- | ------------------ | ------------------ | | Anthropic (Claude) | Needs setup | Local CLI/OAuth | Quota | | Chutes AI | Automatic | Remote API | Quota | | Cursor | Needs setup | Local estimate | Budget and spend | | GitHub Copilot | Automatic | Remote API | Budget and usage | | Google AGY | Needs setup | Remote API | Quota | | Kilo Gateway | Automatic | Remote API | Quota and balance | | NanoGPT | Automatic | Remote API | Quota and balance | | Ollama Cloud | Automatic | Remote API | Quota and usage | | OpenAI | Automatic | Remote API | Quota | | OpenCode Go | Automatic | Remote API | Quota | | OpenCode Zen | Automatic | Remote API | Budget and balance | | OpenRouter | Automatic | Remote API | Budget and spend | | Synthetic | Automatic | Remote API | Quota | | xAI SuperGrok | Automatic | Remote API | Quota |

| Provider | Auth/setup | Data from | Reports | | ----------------------- | -------------------------------------------------------------- | ------------------ | ------------------ | | Anthropic (Claude) | Needs setup | Local CLI/OAuth | Quota | | Chutes AI | Automatic | Remote API | Quota | | Cursor | Needs setup | Local estimate | Budget and spend | | Gemini CLI | Needs setup | Remote API | Quota | | GitHub Copilot | Needs setup | Remote API | Budget and usage | | Google AGY | Needs setup | Remote API | Quota | | NanoGPT | Automatic | Remote API | Quota and balance | | OpenAI | Automatic | Remote API | Quota | | OpenCode Zen | Automatic | Remote API | Budget and balance | | OpenRouter | Automatic | Remote API | Budget and spend | | Synthetic | Automatic | Remote API | Quota | | xAI SuperGrok | Automatic | Remote API | Quota |

Gemini CLI works only with Gemini Code Assist Standard or Enterprise (organization) accounts. Personal Google users should use Google AGY.

Pre-configured Chinese providers

| Provider | Auth/setup | Data from | Reports | | ----------------------------- | ---------------------------------------------------------------------------- | -------------- | ------------------ | | Alibaba Coding Plan | Automatic | Local estimate | Quota | | Alibaba Personal Token Plan | Needs setup | Official CLI | Quota | | DeepSeek | Automatic | Remote API | Balance and status | | Kimi Code | Automatic | Remote API | Quota | | Kimi Code (CN) | Automatic | Remote API | Quota | | MiniMax Token Plan | Automatic | Remote API | Quota | | MiniMax Token Plan (CN) | Automatic | Remote API | Quota | | Xiaomi MiMo | Needs setup | Dashboard API | Quota and balance | | Z.ai Coding Plan | Automatic | Remote API | Quota | | Zhipu Coding Plan | Automatic | Remote API | Quota |

| Provider | Auth/setup | Data from | Reports | | ------------------------ | ---------- | ---------- | ------- | | Kimi Code | Automatic | Remote API | Quota | | Kimi Code (CN) | Automatic | Remote API | Quota | | MiniMax Token Plan | Automatic | Remote API | Quota | | MiniMax Token Plan (CN) | Automatic | Remote API | Quota | | Zhipu Coding Plan | Automatic | Remote API | Quota |

These show only your own member API key's usage, not the whole organization's.

Custom providers

Track a provider that is not listed, from its quota API or from a local estimate, with a global quotaProviders definition in your OpenCode Quota settings file. See the custom-provider guide.

Troubleshooting

  1. Provider missing? Log in to it again in OpenCode 2.
  2. Using a companion plugin (Cursor, Google)? List it before @npv12/opencode-quota in opencode.json.
  3. claude or bl not found? See Service environment.
  4. show --json empty? It reads cached data only, so trigger a normal refresh first, or run show for a live check.

More fixes: Troubleshooting.

Reference

Guides: Manual install · Configuration · Providers · Troubleshooting · External integration

Outside links: OpenCode docs · OpenCode config · OpenCode plugins · OpenCode CLI plugins · models.dev pricing data · Node.js downloads

License

MIT. OpenCode Quota is not built by the OpenCode team and is not affiliated with OpenCode or any provider listed above.

This fork tracks the upstream project at https://github.com/slkiser/opencode-quota.