OpenCode TPS Meter CLI

Output token speed in the OpenCode footer: a rolling TPS while streaming and an exact figure after the reply.

  • 94 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • The installer downloads OpenCode source, applies a patch and installs a wrapper in place of the usual launcher.
All reasons and checks

floze-the-genius/opencode-tps-meter

Install

Works in

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/opencode-tps-meter

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The installer downloads OpenCode source, applies a patch and installs a wrapper in place of the usual launcher.

This is third-party code. Review the repository files before installing.

What it does

Adds a throughput counter to the OpenCode TUI footer. While a reply streams it shows a rolling TPS over the last 15 seconds, and once the reply ends it prints an exact figure from the message's output tokens. OpenCode has no regular hook for the footer, so the installer downloads the source of the requested version, applies a patch and places a wrapper next to the `opencode` binary. The original launcher is kept as `opencode-stock`. If the source layout is unfamiliar, installation stops before the launcher is replaced.

Who it is for. OpenCode users who need to see where time is lost: in the model, the transport or rendering.

Good fit when

  • Replies feel slow, and it is unclear whether the model or the transport is to blame.
  • Two models or two OpenCode releases are compared by output speed.
  • Streaming speed should be visible right in the terminal, with no external dashboard.
  • A check is needed on whether output slowed down after an OpenCode update.

Not a fit when

  • Work happens in OpenCode Desktop; the patch covers the TUI and CLI only.
  • Replacing the launcher with a patched build on a work machine is not acceptable.
  • An exact TPS during streaming is needed; the live value is an estimate from stream deltas.

Example request

Install the TPS meter in OpenCode and show how it looks in the footer after a model reply.

Limitations

Installation needs `bun`, `git` and `curl`. OpenCode releases from 1.3.13 to 1.18.4 are tested; for newer ones the patcher tries to find anchors in the source. The last commit in the repository dates to July 2026. The installer patches source instead of using an official plugin: if a new OpenCode release lays out the footer differently, the patcher refuses and a new release of the tool is needed. Live TPS is estimated from stream deltas, and the final figure uses output tokens of the completed message.

How to disable. Run `npx @guard22/opencode-tps-meter uninstall` to remove the wrapper and restore the original launcher.

FAQ

How do I install the TPS meter for OpenCode?

Run `npx @guard22/opencode-tps-meter install`. The installer detects the OpenCode version, applies the patch and places a wrapper next to the binary.

How do I choose the OpenCode version?

Set the variable, for example `OPENCODE_TPS_VERSION=1.4.1 npx @guard22/opencode-tps-meter install`.

What happens to the opencode launcher after install?

The original launcher is saved as `opencode-stock` beside the wrapper. Uninstalling restores it.

What does the installer do with an unfamiliar source layout?

It exits with an error before replacing the launcher, so nothing is left half-installed.

Does the meter work in OpenCode Desktop?

No. The patch covers the TUI and CLI only.

Discussion

No questions or reviews yet.

CLI tools

An OpenCode TUI sidebar plugin that shows live token cache hit rate, session cost and the money the cache saved.

PluginMinimal access318Repository stars

A local Splunk dashboard shows tokens and cost for Claude Code, Codex and Cursor sessions, and an MCP server answers questions.

MCP serverExtended access147Repository stars

A terminal and browser viewer for coding agent spend: sessions by turn, subagent and context window, with API price estimates.

CLIMinimal access99Repository stars

A Telegram bot for OpenCode: send coding tasks, watch progress and switch models from your phone while OpenCode keeps running on your own computer

CLIBroad access1.4KRepository stars

A Windows plugin for OpenCode Desktop that sets edit boundaries, screens commands and ties test results to the current code.

PluginExtended access114Repository stars

A terminal monitor for Claude Code, Codex CLI and OpenCode sessions: tokens, context window, rate limits and ports in real time

CLIExtended access3.9KRepository stars

README in short

The text explains why the patch exists, how installation works, which OpenCode versions are tested and what the limits are: Desktop is out of scope and the live TPS stays an estimate.

README badge

Report a problem