Install
Install with PiG
pig install npm:pi-tokstreamInstall with Pi
pi install npm:pi-tokstreamPackages 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.
pi-tokstream
Live tokens per second for your Pi session, recorded as data that other tools can draw. A producer-only Pi and Gentle Shell extension.
What it does
While the main model streams, it estimates the output rate (tok/s); when each message finalizes, it keeps the provider-reported throughput and usage (input, output, cache read, cache write). Finished subagent tasks are relayed with their own last reported usage. Everything goes into an append-only JSONL journal beside the session file, size-rotated so it stays bounded. It renders nothing: renderers such as the herdr-sidecar agents view read the journal and own all presentation.
What it solves
- "Is the model actually streaming, and how fast?" A side panel can show a live rate without hooking into Pi itself.
- Invented numbers. Estimates are labeled as estimates, provider numbers as
reported, and a missing category is
null, never zero. - Logs that grow forever. The journal rotates at 2 MiB and keeps one previous generation.
Install
# Gentle Shell
gentle-shell install npm:pi-tokstream
# Pi
pi install npm:pi-tokstream
Then /reload inside the session.
Quick reference
| Command | Effect |
|---|---|
/tokstream or /tokstream status | the switch plus the current snapshot (n/a (no data) before any measurement) |
/tokstream off | stop all journal production until /tokstream on or a Pi restart (not persisted) |
/tokstream on | resume production |
Documentation
| I want to… | Read |
|---|---|
| Read the journal from a renderer | docs/journal.md |
| Know who owns what between producer and renderer | docs/design.md |
| Run the tests | docs/development.md |
License
MIT — see LICENSE.