OpenCode v2 TUI plugin that shows the selected provider's quota/usage in the sidebar, plus a compact indicator above the prompt.
- OpenCode Go
- Kimi for Coding CN and Kimi for Coding Global
- Z.AI Coding Plan and Zhipu AI Coding Plan
- ChatGPT Go/Plus/Pro
Sidebar widget:
OpenCode Go Default
5h 42% ████████████░░░░░░░░░░░░░░░░ 3h 6m
1w 18% █████░░░░░░░░░░░░░░░░░░░░░░░ 2d 11h
1mo 7% ██░░░░░░░░░░░░░░░░░░░░░░░░░░ 20d
Compact indicator:
OpenCode Go ◈ ◇ ◇ 5h · 3h 6m
The glyphs stand for the provider's quota windows in order. Each fills up as usage rises: ◇ below 70%, ◈ from 70%, ◆ from 90%. The window the countdown tracks is colored by the same levels — green, amber, red — while the others stay muted.
Tip
Click the name to toggle between the provider name and the active account. Click the glyphs, label, or countdown to cycle the window it tracks.
Add the plugin to cli.json:
{
"plugins": ["github:lqmanh/opencode-usage"]
}| Option | Default | Description |
|---|---|---|
refreshSeconds |
300 |
Poll interval, minimum 30 |
{
"plugins": [
{
"package": "github:lqmanh/opencode-usage",
"options": {
"refreshSeconds": 120
}
}
]
}- Expired Console credentials are reported, not refreshed by the plugin; the token refreshes the next time OpenCode uses it, so send a prompt with an OpenCode Go model. Alternatively, configure an API key.
- No manual refresh; usage updates on the poll interval and when credentials change.
bun install
bun run checkTo load this checkout directly, point cli.json at the repository directory. The root tui.tsx re-exports src/tui.tsx because OpenCode resolves local plugin directories by filename, while installed packages use the ./tui export.