r/opencode • • 9d ago

Built a GUI plugin that shows live tokens/sec in the OpenCode Desktop session header

OpenCode Desktop had no speed readout, so I built one: a pill in the session header showing tokens/sec for whatever model is streaming.

What it does

- Live estimate over a rolling 3-second window while tokens stream

- Exact provider-reported speed when each step ends (tokens.output + tokens.reasoning over firstToken to completed), labelled avg

- Hover for peak speed, output tokens and step count

- Green at 40+ tok/s, amber at 15+, red below

It uses the experimental GUI plugin API (@opencode/plugin 2.3.x) and the session.header slot, so it is Desktop only - no TUI or web. The prebuilt bundle is committed, so installing is: clone the repo, then add the folder to the plugins array in your global ~/.config/opencode/opencode.jsonc.

https://github.com/xTombstoneActual/opencode-desktop-tps

MIT licensed, no telemetry, nothing leaves your machine.

Disclosure: built with AI assistance - an AI coding agent wrote most of the code, with me directing the design, testing it live against real sessions and reviewing every line before publishing.

1 Upvotes

0 comments sorted by