OpenCode V2 CLI plugin: Context and subscription Usage in the session sidebar.
Context
48,210 tokens
24% used
Usage
● Claude low pressure 0.4
5h ▃ 51% ↻ 2:25pm
week ▆ 59% ↻ Tue
● Codex pressure 1
week █ 90% ↻ Fri
- Gauges and percents show what is left in each window.
⇩55mrunway at the recent speed, shown only while going faster than an even spread.↻the window's reset;⊘the window is full.- Pressure, beside each subscription: how fast the budget is used against the time left, 5h window weighted 30%, weekly 70%.
1is on pace, above is ahead of pace (high pressureabove ~1.1), below is budget left over at reset (low pressurebelow ~0.7).
Clone somewhere under your OpenCode config directory and add it to ~/.config/opencode/cli.json:
{
"plugins": ["./packages/usage-sidebar", "-opencode.sidebar.context"]
}-opencode.sidebar.context hides the built-in Context section, which this one replaces.
| Group | Needs |
|---|---|
| Claude | Meridian as the Anthropic provider, listening on 127.0.0.1:3456 (QUOTA_URL in usage.ts; edit it for another port) |
| Codex | the Codex CLI login (~/.codex/auth.json) and the openai provider on a ChatGPT plan |
A missing source hides its group; nothing else breaks.
tui.tsxthe sidebar sectionusage.tsreadings, formatting, pressuremodel-icons.tsone glyph per model family