Base on: opencode-mystatus
An OpenCode plugin to query account quota usage for multiple AI platforms.
| Platform | Account Type | Data Source |
|---|---|---|
| OpenAI | Plus / Team / Pro | ~/.local/share/opencode/auth.json |
| MiniMax | Coding Plan | ~/.local/share/opencode/auth.json |
| Anthropic | Claude Pro | ~/.local/share/opencode/auth.json |
| GitHub Copilot | Individual / Business | ~/.local/share/opencode/auth.json |
Paste this into any LLM agent (Claude Code, OpenCode, Cursor, etc.):
Install the opencode-usage-checker plugin by following: https://raw.githubusercontent.com/vbgate/opencode-usage-checker/main/README.md
Instructions for LLM agents
To install this plugin, perform these steps:
-
Add
"opencode-usage-checker"to thepluginarray in~/.config/opencode/opencode.json -
Add the slash command to the
commandobject in the same file:
{
"plugin": ["opencode-usage-checker"],
"command": {
"mystatus": {
"description": "Query quota usage for all AI accounts",
"template": "Use the mystatus tool to query quota usage. Return the result as-is without modification."
}
}
}- Tell the user to restart OpenCode.
- Add the plugin and slash command to your
~/.config/opencode/opencode.json:
{
"plugin": ["opencode-usage-checker"],
"command": {
"mystatus": {
"description": "Query quota usage for all AI accounts",
"template": "Use the mystatus tool to query quota usage. Return the result as-is without modification."
}
}
}- Restart OpenCode
Copy the plugin files to your OpenCode config directory:
- Copy
plugin/mystatus.tsandplugin/lib/to~/.config/opencode/plugin/ - Copy
command/mystatus.mdto~/.config/opencode/command/ - Restart OpenCode
Use the /mystatus command to get complete quota information:
/mystatus
Simply ask in natural language, for example:
- "Check my OpenAI quota"
- "How much quota do I have left?"
- "Show my AI account status"
OpenCode will automatically use the mystatus tool to answer your question.
## AI Provider Quota Status
| Provider | Account | Plan | Used | Remaining | Reset In | Reset Date |
|---------------|--------------------|-----------------------|--------|-----------|-----------|-------------------|
| OpenAI | user@example.com | Team | 15% | 85% | 2h 30m | 19/02/2026 11:20 |
| MiniMax | abc1****xyz9 | Coding Plan - Pro | 20% | 80% | 4h 51m | 19/02/2026 11:20 |
| Anthropic | abc1****xyz9 | Claude Pro (5h) | 25% | 75% | 3h 20m | 19/02/2026 15:30 |
| Anthropic | abc1****xyz9 | Claude Pro (7d) | 40% | 60% | 6d 2h | 25/02/2026 09:00 |
| GitHub Copilot| @individual | pro | 24% | 76% | 19d 0h | 01/03/2026 00:00 |
Note: For MiniMax, the Used column shows remaining tokens (decreases over time), and Remaining shows used tokens.
- Query quota usage across multiple AI platforms in one command
- Visual progress bars showing remaining quota
- Reset time countdown with exact datetime
- Multi-language support (English / Vietnamese)
- API key masking for security
No additional configuration required. The plugin automatically reads credentials from:
- OpenAI, MiniMax, Anthropic & GitHub Copilot:
~/.local/share/opencode/auth.json
To query MiniMax Coding Plan quota, you need to obtain an API key from the MiniMax platform.
To query Anthropic (Claude) quota, you need OAuth credentials. The plugin uses the Anthropic OAuth API with refresh token support.
This plugin is safe to use:
Local Files Accessed (read-only):
~/.local/share/opencode/auth.json- OpenCode's official auth storage
API Endpoints (all official):
https://chatgpt.com/backend-api/wham/usage- OpenAI official quota APIhttps://www.minimax.io/v1/api/openplatform/coding_plan/remains- MiniMax official APIhttps://api.anthropic.com/api/oauth/usage- Anthropic official APIhttps://api.github.com/copilot_internal/user- GitHub Copilot official API
Privacy:
- No data is stored, uploaded, or cached by this plugin
- Sensitive information (API keys) is automatically masked in output
- Source code is fully open for review
# Using npm
npm install
npm run typecheck
npm run build
# Or using Bun
bun install
bun run typecheck
bun run buildMIT