Quota, usage, and token visibility in OpenCode and your terminal.
Quick start
npx @slkiser/opencode-quota init
Then restart OpenCode and type /quota.
[!IMPORTANT] You need OpenCode
2.0.16+and Node.js22.13+or23.4+. Still on OpenCode 1? Runnpx @slkiser/opencode-quota@4 initinstead.
Upgrading from 4.x? Read what changed in 5.0.
What you get
Sidebar panel
Popup toast
Status line
Token reports
Also:
- Terminal:
npx @slkiser/opencode-quota@latest showworks even with OpenCode closed. - Web and Desktop: slash commands post the report in the chat.
- Scripts and status bars: JSON, an export file, and metrics. See External integration.
- Your look: used or left, reset style, a runs-out estimate, and more. See Configuration.
- 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.
Updating
Close OpenCode, then preview and apply the update:
npx @slkiser/opencode-quota@latest update --dry-run
npx @slkiser/opencode-quota@latest update
Restart OpenCode. The updater never moves or deletes secrets. See Updating safely.
Breaking changes in 5.0.0
[!WARNING]
- OpenCode 1 is no longer supported.
initandupdatekeep OpenCode 1 users on 4.x (@slkiser/opencode-quota@4).- Logins come from OpenCode 2, never from
auth.json. If a provider is missing, log in again.- Web and Desktop get the slash commands, but no toasts or panels.
- TUI reports open in a popup. To keep them in the chat, set
tuiCommandDisplay: "inline".- OpenCode Zen uses your OpenCode Console sign-in:
opencode auth login opencode.
Full list: Moving to OpenCode 2.
Commands
Slash commands
Type these in OpenCode. Add dates after the command, like /tokens_between 2026-09-01 2026-09-25.
| Command | What it shows |
|---|---|
/quota |
Current quota |
/quota_status |
Setup check: logins, providers, pricing, and notices |
/quota_announcements |
Maintainer notices |
/pricing_refresh |
Refreshes token pricing from models.dev |
/tokens_today |
Tokens used today |
/tokens_daily |
Tokens used in the last 24 hours |
/tokens_weekly |
Tokens used in the last 7 days |
/tokens_monthly |
Tokens used in the last 30 days, with pricing |
/tokens_all |
Tokens used across all local history |
/tokens_session |
Tokens used in this session |
/tokens_session_all |
This session plus its subagent sessions |
/tokens_between YYYY-MM-DD YYYY-MM-DD |
Tokens used between two dates |
CLI commands
| Command | What it does |
|---|---|
npx @slkiser/opencode-quota@latest init |
Set up OpenCode Quota |
npx @slkiser/opencode-quota@latest provider add |
Add or update a custom provider |
npx @slkiser/opencode-quota@latest show |
Show current quota |
npx @slkiser/opencode-quota@latest status |
Check setup and provider problems |
npx @slkiser/opencode-quota@latest update |
Update an existing installation |
show and status work with OpenCode closed (how they differ). 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 needs a Codex login (/connect → OpenAI → Codex browser (legacy) or Codex device code (legacy)). OpenAI doesn't share ChatGPT usage with Sign in with ChatGPT logins or API keys, so those show a "ChatGPT quota unavailable" row without a ChatGPT request.
Pre-configured American providers
Personal
| 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 balance |
| 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 |
Business / Enterprise
| 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
Personal
| 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 |
Business / Team
| 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:
npx @slkiser/opencode-quota@latest provider add
It previews the change before saving. See the custom-provider guide.
Troubleshooting
- Run
/quota_statusin OpenCode, ornpx @slkiser/opencode-quota@latest statusin a terminal. - Provider missing? Log in to it again in OpenCode 2.
- Using a companion plugin (Cursor, Google)? List it before
@slkiser/opencode-quotainopencode.json. claudeorblnot found? See Service environment.- Token reports empty? Start OpenCode once, then use a model.
More fixes: Troubleshooting.
Reference
Guides: Manual install · Configuration · Providers · Troubleshooting · External integration · Updating safely
Outside links: OpenCode docs · OpenCode config · OpenCode plugins · OpenCode TUI · models.dev pricing data · Node.js downloads
Contributors
Thanks to everyone who has contributed to OpenCode Quota.
License
MIT. OpenCode Quota is not built by the OpenCode team and is not affiliated with OpenCode or any provider listed above.



