A live tokens-per-second meter for the OpenCode TUI.
One column a second, beside the prompt. Rate, average, peak, and time to the first token. The same package on OpenCode V1 and V2.
Free open-source utility
tok/s ▃▆▇▇█▆▄ 42.0 ▲15% · avg 38.2 · pk 45.0 · ttft 0.8s
Red under 10 tok/s, yellow up to 30, green at 30 and above.
One package. OpenCode picks the entry for the version you run.
V2 2.x, in the prompt footer
{
"plugins": ["opencode-token-metrics"]
}
V1 1.x, from the terminal
opencode plugin opencode-token-metrics -g
Both. V2 reads the plugin from plugins in opencode.json and draws in the prompt footer. V1 installs into ~/.config/opencode/tui.json and draws beside the prompt. TUI plugins stay out of opencode.json on V1.
On V2, put the plugin in ~/.config/opencode/cli.json as { "package": "opencode-token-metrics", "options": { … } }. Options in opencode.json go to server plugins and never reach the meter. On V1, options are the second element of the plugin tuple in tui.json. The keys are the same either way. The full list is in the README.
The blocks are tokens per second, one second each. The number beside them is the live rate. Average is the turn so far, ignoring tool pauses. Peak is the fastest second, and it never sits below the average. ttft is the wait for the first token. cache is the share of the prompt the provider served from cache.
On V1, run the installer again. On V2, OpenCode picks up the published package the next time it installs plugins. Restart the TUI after either one.
opencode plugin opencode-token-metrics -g