Watch the model
stream.

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

View the code Install
The meter running beside the OpenCode prompt
Beside the prompt, while the model is writing.

What it does

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 column a secondThe graph grows as the model streams, scaled to the busiest second of the turn.
Average holds through a toolA tool pause restarts the live rate. The average only counts time spent generating.
The frame staysWhen the turn ends, the graph, rate, peak, and time to first token freeze until the next token.
Cache on a long promptOnce the provider reports it, the frozen line shows the share served from the prompt cache.

Install

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

Questions

Which OpenCode?

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.

Where do options go?

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.

What does the line mean?

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.

How do I update?

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