A plugin for OpenCode that shows provider usage in a TUI dialog.
| Provider | Auth Type | Usage Data |
|---|---|---|
| GitHub Copilot | OAuth | Premium requests quota, reset date |
| OpenAI/Codex | OAuth | 5-hour & weekly limits, credits |
Recommended: install with the OpenCode plugin installer so both the server and TUI targets are configured:
opencode plugin opencode-usage-trackerIf you want to configure it manually, add the package to both configs:
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-usage-tracker"]
}tui.json
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["opencode-usage-tracker"]
}The TUI dialog will not load if the package is only present in opencode.json.
Open the usage dialog from either:
/usagein chat- Command palette (
Ctrl+P) ->Usage
Both entry points open the provider picker dialog.
Supported slash command:
/usage # Open provider picker
The dialog displays a native TUI usage view for the selected provider scope.
The plugin reads authentication tokens from OpenCode's auth.json file located at:
- Linux:
~/.local/share/opencode/auth.json - macOS:
~/Library/Application Support/opencode/auth.json
Tokens are automatically populated when you authenticate with providers in OpenCode.
- Read-only: This plugin only fetches usage data - it does not consume any quota
- Fresh Data: Usage data is fetched fresh on each command (no caching)
MIT