@everyx/pi-status-line
Pi-native status line — TPS and TTFT integrated into footer via ctx.ui.setFooter
Package details
Install @everyx/pi-status-line from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@everyx/pi-status-line- Package
@everyx/pi-status-line- Version
1.0.5- Published
- Sep 7, 2026
- Downloads
- 971/mo · 73/wk
- Author
- every.x
- License
- MIT
- Types
- extension
- Size
- 20 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-status-line
Pi-native status line — live TPS + TTFT via ctx.ui.setFooter, inline with token stats.
Integrated into footer via setFooter — ↑/↓ right after ↓, single space join(" ") like official statsParts, persistent after turn.
| Metric | Definition |
|---|---|
| TPS | output+reasoning tokens / wall clock (firstToken → now), gaps during generation included, TTFT excluded, <250ms debounced |
| TTFT | turn_start → firstToken |
Tokens: provider-precise usage.output at message_end, falling back to a single ceil estimate on cumulative chars (CJK ≈ 1 token/char, other ≈ 4 chars/token) — never per-delta ceil, which inflates the sum.
footer: ↑6.3k ↓119 T1.2s 42.1T/s R113 ... 0.6%/1.0M (model)
↑ ttft ↑ tps
How it works
turn_startrecordst0(TTFT start); displayed values persist until the new turn's first token arrives.- Each
message_updateaccumulates chars only (tokens estimated once on the total); the live value is the running average over the generation so far (gaps counted, tool waits excluded structurally via pi's per-generationturn_start). - Values stay visible until the next turn's first token overwrites them (only
session_shutdownclears). - Engine:
tps.tsis pure (estimateTokens/TurnMetrics), testable without pi.
Future
This package is the home for all footer optimizations (context%, cost, etc.) — pi-status-line as a generic footer collection, not a single-metric package.
Config
None yet. Display thresholds and estimation strategy are future knobs.