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

@championswimmer/pi-speedometer

v0.1.3

Published

pi extension: live tokens/sec and time-to-first-token in the status bar

Readme

@championswimmer/pi-speedometer

A pi extension that shows live LLM streaming performance in the status bar:

⚡ 42.1 t/s ⏱ 412ms
  • ⚡ TPS — output tokens per second (first content delta → now / stream end)
  • ⏱ TTFT — time to first token (provider request → first content delta)

Values update live while streaming (throttled to ~4/sec) and the final exact numbers remain displayed after the response finishes.

Install

Development (symlink into pi's global extensions dir):

mkdir -p ~/.pi/agent/extensions
ln -s "$(pwd)/src/index.ts" ~/.pi/agent/extensions/pi-speedometer.ts

Hot-reload inside pi with /reload.

Quick one-off test:

pi -e ./src/index.ts

As a package (published on npm under the scoped name):

pi install npm:@championswimmer/pi-speedometer

Usage

The /speed command controls what is shown and how it is labeled:

| Command | Effect | |---|---| | /speed | Show current settings summary | | /speed tps on\|off | Toggle the tokens/sec readout | | /speed ttft on\|off | Toggle the time-to-first-token readout | | /speed tps icon\|text | Switch the TPS label between and TPS | | /speed ttft icon\|text | Switch the TTFT label between and TTFT |

Settings persist globally at ~/.pi/agent/pi-speedometer.json, with the shape:

{
  "showTps": true,
  "showTtft": true,
  "tpsStyle": "icon",
  "ttftStyle": "icon"
}

With both metrics off, the status entry is cleared.

Note: the npm package uses the scoped name @championswimmer/pi-speedometer because the unscoped pi-speedometer name is already taken on npm.

Notes

  • Provider usage streaming differs. Anthropic streams cumulative output-token counts mid-stream, so live TPS is exact. OpenAI chat-completions only send usage in the final chunk, so mid-stream TPS uses a chars / 4 estimate and snaps to the exact value when the stream ends. Google usually reports per-chunk.
  • Multiple LLM calls per agent run (tool loops) re-anchor the timing on each request, so the display always reflects the current call.
  • No runtime dependencies — only Node builtins and type-only imports from pi packages.