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

@slkiser/opencode-quota

v3.11.2

Published

OpenCode quota & tokens usage with zero context window pollution. Supports GitHub Copilot, OpenAI (Plus/Pro), Qwen Code, Chutes AI, Synthetic, Google Antigravity, Z.ai coding plan and more.

Readme

OpenCode Quota sidebar


Quick start

npx @slkiser/opencode-quota init

[!IMPORTANT] OpenCode >= 1.4.3 and Node.js >= 20 are required.

  1. Restart OpenCode.
  2. Run /quota in OpenCode, or use opencode-quota show from your terminal.
  3. If you enabled the Sidebar panel, open the session sidebar and look for Quota.
  4. If you enabled Compact status line, look for the home-bottom quota line and the chat/session prompt quota line.
  5. If something looks wrong, run /quota_status in OpenCode or see Troubleshooting.

Update OpenCode Quota safely

  1. Close OpenCode.

  2. Run:

    npx @slkiser/opencode-quota@latest update
  3. Review the exact config edits and cache directories, then confirm.

  4. Restart OpenCode.

Use --dry-run to preview without changing anything. Use --yes only for explicit noninteractive confirmation. The update command changes only canonical OpenCode Quota plugin entries and removes only verified OpenCode Quota cache directories; it preserves settings, JSONC comments, tuple options, and other plugins.

What you get

More ways to use it:

  • Terminal checks with opencode-quota show before or without opening OpenCode
  • JSON output for scripts, status bars, CI checks, and external tools
  • Deterministic inline slash-command output shared by TUI and Desktop/server
  • Provider diagnostics for auth, quota sources, pricing, and bundled maintainer announcements

See Configuration for UI options and Manual install for setup details.

Commands

Core slash commands

The server plugin registers each command once for TUI and Desktop/server. Each command injects one ignored, no-reply inline message, does not call the model, and does not add output to model context. /tokens_between requires both dates inline and does not open a prompt dialog.

| Command | Use when | | --------------------------------------- | -------------------------------------------------------------------- | | /quota | Show your quota and usage details | | /quota_status | Diagnose setup, auth, provider detection, pricing, and announcements | | /quota_announcements | Read active bundled maintainer notices | | /pricing_refresh | Refresh local runtime pricing from models.dev | | /tokens_today | Show tokens used today | | /tokens_daily | Show tokens used in the last 24 hours | | /tokens_weekly | Show tokens used in the last 7 days | | /tokens_monthly | Show tokens used in the last 30 days, including pricing | | /tokens_all | Show tokens used across all local history | | /tokens_session | Show tokens used in the current session | | /tokens_session_all | Show current session plus descendant sessions | | /tokens_between YYYY-MM-DD YYYY-MM-DD | Show tokens used between two dates |

CLI commands

| Command | Use when | | ---------------------------------------------- | --------------------------------------------------------------------- | | opencode-quota update | Preview and confirm a scoped OpenCode Quota update | | opencode-quota update --dry-run | Preview exact config and cache targets without changing them | | opencode-quota show | Check quota from your terminal | | opencode-quota show --provider <id> | Check one provider only, such as copilot or openai | | opencode-quota show --json | Print JSON for scripts, status bars, and other tools | | opencode-quota show --json --threshold <pct> | Fail the command when cached quota drops below your chosen percentage |

Providers

Most providers work automatically. If a provider has a “Needs setup” link, open that setup note only if you use that provider.

| Provider | Auth/setup | Source | Reports | | ------------------------ | -------------------------------------------------------------- | ------------------ | --------------- | | Anthropic (Claude) | Needs setup | Local CLI/OAuth | Usage/quota | | GitHub Copilot | OpenCode OAuth or PAT | Remote API | Quota/usage | | OpenAI | Automatic | Remote API | Usage/quota | | Cursor | Needs setup | Local estimate | Estimated quota | | Qwen Code | Needs setup | Local estimate | Estimated quota | | Alibaba Coding Plan | OpenCode config | Local estimate | Estimated quota | | MiniMax Coding Plan | OpenCode config | Remote API | Usage/quota | | MiniMax Coding Plan (CN) | OpenCode config | Remote API | Usage/quota | | Kimi Code | OpenCode config | Remote API | Usage/quota | | Chutes AI | API key/config | Remote API | Usage/quota | | Synthetic | Automatic | Remote API | Quota | | Google Antigravity | Needs setup | Remote API | Usage/quota | | Google AGY | Needs setup | Remote API | Usage/quota | | Gemini CLI | Needs setup | Remote API | Usage/quota | | Z.ai Coding Plan | OpenCode config | Remote API | Usage/quota | | Zhipu Coding Plan | OpenCode config | Remote API | Usage/quota | | NanoGPT | API key/config | Remote API | Usage + balance | | DeepSeek | API key/config | Remote API | Balance/status | | Ollama Cloud | Needs setup | Dashboard scraping | Dashboard usage | | OpenCode Go | Needs setup | Dashboard scraping | Dashboard usage |

Setup details live in the Provider setup guide.

Troubleshooting

Start here when quota or token data looks wrong:

  1. Run /quota_status, or start with opencode-quota show for a terminal quota summary.
  2. Confirm the expected provider appears in the detected provider list.
  3. Confirm companion auth plugins are before @slkiser/opencode-quota in opencode.json.
  4. If token reports are empty, start OpenCode once so it creates opencode.db, then run a session with model usage.
  5. Check Troubleshooting for common symptoms and provider-specific fixes.

Reference

Contributors

Thanks to everyone who has contributed to OpenCode Quota.

License

MIT

Remarks

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

Star history

Star History Chart