@howaboua/opencode-usage-plugin
v0.1.4
Published
opencode plugin for tracking AI provider usage, rate limits, and quotas
Maintainers
Readme
OpenCode Usage Plugin
Track AI provider rate limits and quotas in real-time.
Features
- Live rate limits – See Codex/OpenAI hourly/weekly limits at a glance
- Proxy quota stats – Monitor Mirrowel Proxy credentials and tier usage
- Copilot usage – Track GitHub Copilot chat + completions quotas
- Inline status – Results appear directly in your chat, no context switching
- Zero setup – Auto-detects providers from your existing config
Installation
Add to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@howaboua/opencode-usage-plugin"]
}OpenCode installs dependencies automatically on next launch.
Usage
Check all providers
/usageCheck specific provider
/usage codex
/usage proxy
/usage copilotSupport the proxy
/usage supportSupported Providers
| Provider | Source |
|----------|--------|
| Codex / OpenAI | Auth tokens + /wham/usage endpoint |
| Mirrowel Proxy | Local /v1/quota-stats endpoint |
| GitHub Copilot | GitHub internal usage APIs |
Configuration
Optional config at ~/.config/opencode/usage-config.jsonc:
{
// Proxy server endpoint
"endpoint": "http://localhost:8000",
// API key for proxy auth
"apiKey": "your-key",
// Request timeout (ms)
"timeout": 10000,
// Show/hide providers in /usage output
"providers": {
"openai": true,
"proxy": true,
"copilot": true
}
}If missing, the plugin creates a default template on first run.
Copilot auth
Copilot is detected from either of these locations:
~/.local/share/opencode/copilot-usage-token.json~/.local/share/opencode/auth.jsonwith agithub-copilotentry~/.config/opencode/copilot-quota-token.json(optional override)
See AGENTS.md for internal architecture.
