opencode-tui-tps
v0.1.0
Published
OpenCode TUI plugin that shows tokens per second (tok/s) in the session sidebar
Maintainers
Readme
opencode-tui-tps
OpenCode TUI plugin that shows tokens per second (tok/s) in the session sidebar.
Features
- Displays the average output speed of the latest assistant message
- Updates live while streaming (uses
Date.now()until the message completes) - Uses the official
tokensfield fromAssistantMessage, no estimation - Sits in the
sidebar_contentslot, below the built-in Context block
Install
Add to ~/.config/opencode/tui.json:
{
"plugin": [
"opencode-tui-tps"
]
}Restart opencode. The sidebar will show a Speed block with the current output rate.
Development
bun install
bun run buildThe plugin registers via module.tui with api.slots.register:
- Slot:
sidebar_content(append mode) - Order:
950(renders afteroh-my-opencode-slim)
Requirements
- opencode >= 1.18.15 (TUI plugin system with
module.tui)
License
MIT
