← Catalog

@tian.zuo/pi-token-speed

Live and final tokens-per-second meter for the pi coding agent.

Extension

Install

Install with PiG

pig install npm:@tian.zuo/pi-token-speed

Install with Pi

pi install npm:@tian.zuo/pi-token-speed
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.2 (README.md). PiG does not review it.

@tian.zuo/pi-token-speed

Release notes: changelog · GitHub releases

Live and final tokens-per-second reporting for the pi coding agent.

pi install npm:@tian.zuo/pi-token-speed

How it works

While the assistant streams, the footer shows a smoothed tokens-per-second rate; when the message finishes it shows a summary with the average rate, total output tokens, and time-to-first-token. The summary stays on screen after the stream stops — including the model's between-stream thinking and tool-call gaps — so the readout is always visible instead of blanking out whenever generation pauses.

The live rate is sampled from streamed text (a responsive chars-per-token estimate); the end-of-message average uses the provider's authoritative output token count when available. The mode is remembered in ~/.pi/token-speed/config.json.

Commands

  • /tps — cycle the display mode: live → final → off.
  • /tps live — live meter + summary.
  • /tps final — summary only.
  • /tps off — show nothing.

License

MIT © Tian Zuo