opencode-token-speed-pluginOpenCode TUI plugin that displays real-time LLM output token speed (tok/s)
3
+1 in 30 days
90
14 in 7 days
32.7
Multi-signal model
4 months ago
2026-04-21
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-token-speed-plugin@1.0.4"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-token-speed-plugin@1.0.4"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D opencode-token-speed-pluginopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
A OpenCode TUI plugin that displays real-time LLM output token speed (tok/s) in the session prompt area.
Features
- Real-time speed display — Shows output token speed during streaming using a 2-second sliding window.
- Persistent display — When streaming ends, the last measured speed is kept visible.
- Non-intrusive — Uses the
session_prompt_rightslot (append mode), so it doesn't replace any built-in UI.
Setup
Add the plugin to your tui.json (not opencode.json):
{
"plugin": ["opencode-token-speed-plugin"]
}
That's it. OpenCode will automatically install the plugin on next run.
Note: This is a TUI plugin, so it must be configured in
~/.config/opencode/tui.json, notopencode.json.
How it works
- Listens to
message.part.deltaevents to count characters as they stream in. - Estimates tokens using the
chars / 4heuristic within a 2-second sliding window. - Displays
▲ XX.X tok/sto the right of the session prompt.
License
MIT