@tian.zuo/pi-token-speed
Live and final tokens-per-second meter for the pi coding agent.
Package details
Install @tian.zuo/pi-token-speed from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@tian.zuo/pi-token-speed- Package
@tian.zuo/pi-token-speed- Version
0.1.1- Published
- Sep 22, 2026
- Downloads
- 237/mo · 14/wk
- Author
- tian.zuo
- License
- MIT
- Types
- extension
- Size
- 17.9 KB
- Dependencies
- 1 dependency · 1 peer
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@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