OpenCode Quota plugin
An OpenCode plugin with a /quota command: subscription limits, tokens and cost for many providers, kept out of context.
- 1,139 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The plugin uses provider credentials from OpenCode to query their quota APIs.
- Usage data is read from the local OpenCode history.
Install
- Works in
Manual install
opencode plugin add @slkiser/opencode-quotaCommand from the Install section; restart OpenCode afterwards and type `/quota`. For OpenCode 1 use the 4.x branch: `npx @slkiser/opencode-quota@4 init`.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The plugin uses provider credentials from OpenCode to query their quota APIs.
- Usage data is read from the local OpenCode history.
This is third-party code. Review the repository files before installing.
What it does
OpenCode Quota shows remaining limits, token use and API cost inside OpenCode. After installation, `/quota` opens a window with Usage, Limits, Plugin and settings tabs; there is a sidebar panel, a status line and toasts. In Desktop 2.2.0 and newer the same data appears on a side tab and in a bottom strip. `/quota_usage` reports use for `today`, `24h`, `7d`, `30d`, `90d`, `all`, a session or the span between two dates, and `/quota_status` checks logins, providers and pricing. On the web the report is posted in chat but the model never sees it. The same report is available in a terminal through `npx @slkiser/opencode-quota@latest show`, even with OpenCode closed.
Who it is for. OpenCode users on Claude, Copilot, Cursor, Kimi, MiniMax, Z.ai and similar subscriptions who want limits and spend in view without leaving the interface.
Good fit when
- You want to see how much remains before a subscription limit resets.
- Token use and cost over a day, week or month are needed.
- Limits from several providers should sit in one window.
- A script or status bar needs the data as JSON.
- A custom provider with a quota API must be added.
Not a fit when
- OpenCode is older than 2.0.26: the first major version has a separate 4.x branch.
- You need reports for Claude Code or Codex outside OpenCode: the plugin is tied to OpenCode.
- Calls to providers' quota APIs are not allowed.
Example request
Show my limits and 30-day token use with `/quota_usage 30d`, then verify setup with `/quota_status`.Limitations
OpenCode 2.0.26 or newer is required; terminal commands also need Node.js 22.13 or 23.4 and newer. Some providers, including Anthropic, Cursor, Gemini CLI, Google AGY and Alibaba, need an extra setup step. Gemini CLI works only with Code Assist Standard or Enterprise accounts. For business plans of Chinese providers only your own API key's usage is shown. The Desktop GUI is marked experimental. The project is not affiliated with the OpenCode team or any provider.
How to disable. Remove `@slkiser/opencode-quota` from the `plugin` list in `opencode.json` or `opencode.jsonc` and restart OpenCode. Delete `opencode-quota/settings.jsonc` in the OpenCode config folder separately.
FAQ
Are separate keys needed?
Providers appear after logging in through `/connect`; API keys come from OpenCode or environment variables.
Where are settings stored?
In `opencode-quota/settings.jsonc` in the OpenCode config folder, with comments kept. Custom providers, the Claude CLI path and the export path are set only in that file.
How do I update the plugin?
Run `opencode plugin update` and restart OpenCode. Settings from versions 4.x and 5.x convert on first start.
What if `/quota_usage` is empty?
Start OpenCode once and use any model; usage then appears.
Can I use it without OpenCode?
View only: `npx @slkiser/opencode-quota@latest show` prints limits and `status` checks setup.
Discussion
No questions or reviews yet.
Related
PluginsA CLI that shows an agent the remaining quota of Claude, Codex, Cursor, Copilot and 15 more services in one compact report.
A desktop widget with quota balances and token use across Claude, Codex, Kimi, GLM and other agents in one window.
A limits and token spend monitor for Claude Code, Codex, Antigravity and Grok CLI: macOS menu bar, Windows tray, HTML reports
claudetop shows session cost, cache hit rate, plan limit windows and overspend alerts in the Claude Code status line
Token and cost reports for Claude Code, Codex, Gemini CLI and other agents from local logs, by day, month and session
Tokdash shows token usage and session cost for Claude Code, Codex, Gemini CLI and a dozen more agents locally
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Repository stars | Main difference |
|---|---|---|---|
| OpenCode Quota (this card) | no | 1,139 | |
| quota-axi | no | 174 | a console utility that reports remaining quotas for agents; OpenCode Quota is built into the OpenCode interface with a window, panel and status line |
| ccusage | no | 19,415 | counts tokens and cost from local logs; OpenCode Quota adds remaining subscription limits from providers |
README in short
One plugin entry loads both the server and the TUI. The marker in a bar shows even use until reset and can be turned off with `layout.evenUse`.