pi-tps-display

Pi extension showing live tokens-per-second while the model streams.

Packages

Package details

extension

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

$ pi install npm:pi-tps-display
Package
pi-tps-display
Version
0.1.0
Published
Sep 16, 2026
Downloads
191/mo · 12/wk
Author
jhonoryza
License
MIT
Types
extension
Size
7.9 KB
Dependencies
0 dependencies · 2 peers
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-display

Pi extension showing live tokens-per-second while the model streams.

Status bar: ⚡ 42.1 tok/s, optionally with TTFT + totals.

Install

Not published to npm. Install from the local path:

pi install /home/vm/Projects/pi-tps-display

On another machine, copy the repo first, then install the local path (or a git URL).

Local dev (no install):

pi -e /home/vm/Projects/pi-tps-display/index.ts

Auto-load global:

pi -e /Users/fajar/Documents/github/pi-tps-display/index.ts

Auto-load global:

cp index.ts ~/.pi/agent/extensions/pi-tps-display.ts

Command

/tps cycles display mode: tps → ttft → stats → full.

How it measures

  • message_start (user) starts TTFT clock.
  • text_start / thinking_start / toolcall_start stops TTFT, starts stream.
  • text_delta / thinking_delta counted via word estimate, reconciled with provider usage.output when it advances.
  • toolcall_delta counted only for edit / write; other tools pause the clock.
  • agent_end snaps total to authoritative usage.output, shows average.
  • Sliding window 1000ms, min span 250ms.