pi-tps-footer

Tokens-per-second in pi's footer — live estimate while streaming, decayed per-model average at rest; opt-in observation log

Packages

Package details

extension

Install pi-tps-footer from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-tps-footer
Package
pi-tps-footer
Version
1.0.1
Published
Aug 8, 2026
Downloads
137/mo · 137/wk
Author
kmike84
License
MIT
Types
extension
Size
19.8 KB
Dependencies
0 dependencies · 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

pi-tps-footer

test license: MIT pi extension

Shows tokens-per-second in pi's footer: a live estimate while the model is streaming, and a running average when idle. Counts are kept per model, so switching models never mixes their numbers.

Optionally, it can also log every completed turn (model, token counts, decode and TTFT latency, stop reason) to a JSONL file for offline analysis — see below.

Install

pi install git:github.com/kmike/pi-tps-footer

Commands

Command Effect
/tps Notify the current model's tok/s
/tps reset Reset the current model's counters
/tps log Show observation-log state and path
/tps log on / /tps log off Enable/disable the observation log (persisted)

Observation log

Off by default. When enabled with /tps log on, each completed turn is appended as a JSON line to ~/.pi/agent/pi-tps-footer/observations.jsonl (override with the PI_OBSERVATIONS_LOG environment variable).

Development

npm test

License

MIT