opencode-token-speed-plugin
v1.0.4
Published
OpenCode TUI plugin that displays real-time LLM output token speed (tok/s)
Maintainers
Readme
OpenCode Token Speed Plugin
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
