Usage bars for the OpenCode V2 TUI sidebar.
The filled bar shows remaining usage. The | marker shows how much time remains in the limit window. Bar color compares usage with elapsed time: green is safely on pace, yellow is ahead of pace, and red is substantially ahead or exhausted.
Install the plugin:
opencode2 plugin add opencode-usage-barsThe plugin resolves connected credentials, fetches usage, and renders the bars in the TUI sidebar.
| Expanded usage bars | Collapsed summaries |
|---|---|
![]() |
![]() |
- Pace-aware green-to-yellow-to-red color gradient
- Collapsible account summaries colored by their worst limit
- Time remaining until reset by default; click to toggle the reset date and time
The countdown uses an hourglass icon; the reset date and time use a calendar icon. These are Nerd Font icons. Install a Nerd Font in your terminal for the intended appearance.
Note
This is the current provider list. Support for additional providers is planned.
- Codex: 5-hour and weekly limits, with support for multiple accounts and their stored OpenCode account labels.
- OpenCode Go: rolling, weekly, and monthly limits.
bun install
bun run checkFor local development, reference src/index.ts as a server plugin and src/tui.tsx as a CLI plugin. Both processes share usage data through $XDG_CACHE_HOME/opencode/usage-bars.json, or ~/.cache/opencode/usage-bars.json when XDG_CACHE_HOME is unset.
Usage data is currently cached locally, so the server and TUI must run on the same machine. Remote-server TUI connections do not display usage bars.


