npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@guard22/opencode-tps-meter

v1.1.0

Published

Fail-closed OpenCode TUI patch for live and final output TPS observability

Readme

OpenCode TPS Meter

Adds live streaming and final output-token throughput to the OpenCode TUI footer. The installer uses a fail-closed source patcher: if an upstream layout is not recognized, it stops before replacing the user's launcher.

npm version license GitHub stars

Why this exists

Coding-agent throughput is operational data: it helps distinguish model latency, transport stalls, rendering delays, and regressions between releases. OpenCode does not currently expose a normal plugin hook for its TUI footer, so this project owns the compatibility work required to keep that signal visible.

It provides:

  • live rolling TPS over the last 15 seconds while a response is streaming
  • exact output TPS after the response completes
  • compatibility validation against legacy and current OpenCode layouts
  • launcher preservation and a clean uninstall path

Demo

OpenCode TPS Meter demo

Full video: assets/tps-meter-demo.mp4

This is a TUI/CLI patch, not a Desktop extension and not a normal OpenCode plugin. It patches the exact requested OpenCode source release during install.

Maintenance contract

  • Current compatibility target: OpenCode 1.18.4
  • Tested releases are patch-applied and typechecked in the GitHub Actions matrix
  • Split-TUI releases validate both packages/opencode and packages/tui
  • Unknown source layouts fail before the launcher is replaced
  • Security reports use private vulnerability reporting
  • Contributions follow the focused compatibility workflow in CONTRIBUTING.md

Primary maintainer: Floze

Install

Install the published package:

npx @guard22/opencode-tps-meter install

Install the latest repository version:

curl -fsSL https://raw.githubusercontent.com/floze-the-genius/opencode-tps-meter/main/install.sh | bash

Default behavior:

  • if OPENCODE_TPS_VERSION is set, install that exact OpenCode version
  • else if your installed opencode-stock or non-wrapper opencode version is detectable, patch that version
  • else fall back to the latest upstream stable OpenCode release

To force a specific version:

OPENCODE_TPS_VERSION=1.4.1 npx @guard22/opencode-tps-meter install

How the installer works

  • downloads the exact OpenCode tag for the requested version
  • runs a content-based auto-patcher against the OpenCode source
  • installs the patched source into ~/.local/share/opencode-tps-meter/releases/<version>
  • points ~/.local/share/opencode-tps-meter/current at the active release
  • installs a wrapper next to your detected opencode binary
  • preserves your original launcher as opencode-stock in that same directory

If the requested OpenCode version changed the TUI structure too much, the installer exits without replacing your launcher.

Compatibility

The installer now tries to patch newer OpenCode releases automatically. It is no longer hardcoded to a short manual allowlist.

Known tested versions are listed in manifest.sh.

Right now the tested set is:

  • 1.3.13
  • 1.3.14
  • 1.3.15
  • 1.3.16
  • 1.3.17
  • 1.4.0
  • 1.4.1
  • 1.14.20
  • 1.18.4

If you install a newer OpenCode release and the source layout still matches the expected TUI anchors, the installer should work without needing a new repo release.

Uninstall

npx @guard22/opencode-tps-meter uninstall

Notes

  • This patches OpenCode TUI/CLI, not Desktop.
  • It preserves your launch directory, so opencode opens the project you launched it from.
  • Live TPS is an estimate based on stream deltas.
  • Final TPS uses exact output-token usage from the completed assistant message.
  • Requires bun, git, and curl.
  • If upstream rewrites the TUI footer structure, the auto-patcher will fail cleanly instead of half-installing.

Tested

  • OpenCode 1.18.4
  • OpenCode 1.14.20
  • OpenCode 1.4.1
  • OpenCode 1.4.0
  • OpenCode 1.3.17
  • OpenCode 1.3.16
  • OpenCode 1.3.15
  • OpenCode 1.3.14
  • OpenCode 1.3.13
  • Bun 1.3.13