https://github.com/vbgate/opencode-mystatus
Check all your AI subscription quotas in one command. Supports OpenAI, Zhipu AI, and Google Antigravity. More platforms coming soon.
https://github.com/vbgate/opencode-mystatus
opencode opencode-plugin opencode-plugins
Last synced: about 1 month ago
JSON representation
Check all your AI subscription quotas in one command. Supports OpenAI, Zhipu AI, and Google Antigravity. More platforms coming soon.
- Host: GitHub
- URL: https://github.com/vbgate/opencode-mystatus
- Owner: vbgate
- License: mit
- Created: 2026-01-11T07:51:44.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-01-13T18:32:49.000Z (about 1 month ago)
- Last Synced: 2026-01-15T07:59:02.695Z (about 1 month ago)
- Topics: opencode, opencode-plugin, opencode-plugins
- Language: TypeScript
- Homepage:
- Size: 5.96 MB
- Stars: 115
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# opencode-mystatus
[](https://www.npmjs.com/package/opencode-mystatus)
[](https://www.npmjs.com/package/opencode-mystatus)
[](https://opensource.org/licenses/MIT)
An [OpenCode](https://opencode.ai) plugin to query account quota usage for multiple AI platforms.
[中文文档](./README.zh-CN.md)

## Supported Platforms
| Platform | Account Type | Data Source |
| ------------ | ----------------- | ---------------------------------------------- |
| OpenAI | Plus / Team / Pro | `~/.local/share/opencode/auth.json` |
| Zhipu AI | Coding Plan | `~/.local/share/opencode/auth.json` |
| Z.ai | Coding Plan | `~/.local/share/opencode/auth.json` |
| GitHub Copilot | Individual / Business | `~/.local/share/opencode/auth.json` |
| Google Cloud | Antigravity | `~/.config/opencode/antigravity-accounts.json` |
## Installation
### Let an LLM do it
Paste this into any LLM agent (Claude Code, OpenCode, Cursor, etc.):
```
Install the opencode-mystatus plugin by following: https://raw.githubusercontent.com/vbgate/opencode-mystatus/main/README.md
```
Instructions for LLM agents
To install this plugin, perform these steps:
1. Add `"opencode-mystatus"` to the `plugin` array in `~/.config/opencode/opencode.json`
2. Add the slash command to the `command` object in the same file:
```json
{
"plugin": ["opencode-mystatus"],
"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."
}
}
}
```
3. Tell the user to restart OpenCode.
### Manual Installation
1. Add the plugin and slash command to your `~/.config/opencode/opencode.json`:
```json
{
"plugin": ["opencode-mystatus"],
"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."
}
}
}
```
2. Restart OpenCode
### From Local Files
Copy the plugin files to your OpenCode config directory:
1. Copy `plugin/mystatus.ts` and `plugin/lib/` to `~/.config/opencode/plugin/`
2. Copy `command/mystatus.md` to `~/.config/opencode/command/`
3. Restart OpenCode
## Usage
### Option 1: Slash Command
Use the `/mystatus` command to get complete quota information:
```
/mystatus
```
### Option 2: Natural Language
Simply ask in natural language, for example:
- "Check my OpenAI quota"
- "How much Codex quota do I have left?"
- "Show my AI account status"
OpenCode will automatically use the mystatus tool to answer your question.
## Output Example
```
## OpenAI Account Quota
Account: user@example.com (team)
3-hour limit
██████████████████████████████ 85% remaining
Resets in: 2h 30m
## Zhipu AI Account Quota
Account: 9c89****AQVM (Coding Plan)
5-hour token limit
██████████████████████████████ 95% remaining
Used: 0.5M / 10.0M
Resets in: 4h
## Z.ai Account Quota
Account: 9c89****AQVM (Z.ai)
5-hour token limit
██████████████████████████████ 95% remaining
Used: 0.5M / 10.0M
Resets in: 4h
## GitHub Copilot Account Quota
Account: GitHub Copilot (individual)
Premium ████░░░░░░░░░░░░░░░░ 24% (229/300)
Quota resets: 19d 0h (2026-02-01)
## Google Cloud Account Quota
### user@gmail.com
G3 Pro 4h 59m ████████████████████ 100%
G3 Image 4h 59m ████████████████████ 100%
G3 Flash 4h 59m ████████████████████ 100%
Claude 2d 9h ░░░░░░░░░░░░░░░░░░░░ 0%
```
## Features
- Query quota usage across multiple AI platforms in one command
- Visual progress bars showing remaining quota
- Reset time countdown
- Multi-language support (Chinese / English)
- Multiple Google Cloud accounts support
- API key masking for security
## Configuration
No additional configuration required. The plugin automatically reads credentials from:
- **OpenAI, Zhipu AI, Z.ai & GitHub Copilot**: `~/.local/share/opencode/auth.json`
- **Google Cloud**: `~/.config/opencode/antigravity-accounts.json`
### Google Cloud Setup
To query Google Cloud (Antigravity) account quota, you need to install the [opencode-antigravity-auth](https://github.com/NoeFabris/opencode-antigravity-auth) plugin first to authenticate your Google account.
## Security
This plugin is safe to use:
**Local Files Accessed (read-only):**
- `~/.local/share/opencode/auth.json` - OpenCode's official auth storage
- `~/.config/opencode/antigravity-accounts.json` - Antigravity plugin's account storage
**API Endpoints (all official):**
- `https://chatgpt.com/backend-api/wham/usage` - OpenAI official quota API
- `https://bigmodel.cn/api/monitor/usage/quota/limit` - Zhipu AI official quota API
- `https://api.z.ai/api/monitor/usage/quota/limit` - Z.ai official quota API
- `https://api.github.com/copilot_internal/user` - GitHub Copilot official API
- `https://oauth2.googleapis.com/token` - Google official OAuth API
- `https://cloudcode-pa.googleapis.com/v1internal:fetchAvailableModels` - Google Cloud 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
## Google Cloud Models
The plugin displays quota for these models:
| Display Name | Model Key |
| ------------ | ---------------------------------------------- |
| G3 Pro | `gemini-3-pro-high` / `gemini-3-pro-low` |
| G3 Image | `gemini-3-pro-image` |
| G3 Flash | `gemini-3-flash` |
| Claude | `claude-opus-4-5-thinking` / `claude-opus-4-5` |
## Development
```bash
# Using npm
npm install
npm run typecheck
npm run build
# Or using Bun
bun install
bun run typecheck
bun run build
```
## License
MIT