@sirtenzin/opencode-tps
v0.0.2
Published
Display live tokens-per-second (TPS) meter in OpenCode TUI — per-session prompt readout plus a sidebar section listing every subagent's TPS in the current session with a running average.
Downloads
287
Maintainers
Readme
opencode-tps
Forked from the original upstream
williamcr01/opencode-tps.This fork is maintained at
SirTenzin/opencode-tps.
A plugin for OpenCode that displays a live Tokens Per Second (TPS) meter in the terminal UI — for the active session AND for every subagent it has spawned.

What it does
- Prompt readout — shows
TPS <n>on the right side of the prompt for the session you're viewing. - Sidebar section — when the current session has one or more subagents, the sidebar grows a
TPSsection listing the main agent and every subagent alphabetically, each with its live TPS. The section header shows the average TPS across every live agent in the section. - The sidebar section is conditionally rendered: if there are no subagents in the current session, nothing is added.
How TPS is calculated:
- Token deltas are sampled from
message.part.deltaevents on a 5 s rolling window. - A reading of
-means no tokens have streamed within the last ~1.5 s. - Counters clear automatically when streaming completes, errors out, or a tool call starts.
Installation
Via OpenCode CLI
opencode plugin @sirtenzin/opencode-tpsVia npm
- Add the plugin to your
opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@sirtenzin/opencode-tps"]
}then
cd ~/.opencode
npm install @sirtenzin/opencode-tpsRequirements
- OpenCode >= 1.3.14
- OpenCode TUI (Web UI does not support this plugin)
License
MIT
