← Catalog

@ohgodtamit/pi-tps

TPS stats widget with waterfall trace visualization for Pi

Extension

Install

Install with PiG

pig install npm:@ohgodtamit/pi-tps

Install with Pi

pi install npm:@ohgodtamit/pi-tps
Review before installing

Packages 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.

{
  "image": "https://pic1.imgdb.cn/item/69f9fb66a5f82cd27f48c614.png",
  "extensions": [
    "./extensions/pi-tps.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 1.0.1 (README.md). PiG does not review it.

@ohgodtamit/pi-tps

TPS (tokens per second) stats widget with waterfall trace visualization for Pi.

Direct fork of summertime-wu/pi-tps, upstream version 1.0.1 at commit 0e1b4e2b274fb2170c980a6e87f9a4baebac4737. This fork starts at version 1.0.0 and adapts the extension to current Pi APIs and modes.

pi-tps upstream preview

Features

  • Real-time TPS (tokens per second) display
  • Token usage tracking (input/output)
  • Waterfall trace visualization
  • Tool call monitoring
  • Thinking token stats
  • TTFT (time to first token) tracking
  • Color presets (morandi, forest, ocean, retro, ice, dusk, mono, nord)

TPS counts all generated output, including thinking and text, over the same generation interval, from the first thinking or text delta until generation ends. It is not a text-only rate with thinking time subtracted. Live output figures use provider-reported usage when the provider streams it and fall back to character-based estimates (thinking ÷4, text ÷3.5) otherwise; thinking-token figures are always estimated. Final output totals always use the provider's reported usage.

Install

pi install npm:@ohgodtamit/pi-tps@1.0.1

Requires Node.js 22.22.2 or newer and Pi 0.84.0 or newer, with no peer dependency upper bound. Installed smoke coverage targets Pi 0.84.0, 1.0.4, and 1.1.0; later versions are allowed but not tested.

Usage

The widget appears automatically above the editor in the Pi TUI.

Commands

  • /pi-tps - Configure display settings using the keyboard-operated settings picker

RPC clients can invoke /pi-tps via prompt, respond to the forwarded select and input dialogs, and receive configuration notifications and plain string widgets. Terminal-only presentation is not available over RPC. Print and JSON modes do not prompt or render the widget; the configuration command reports that an interactive TUI or RPC client is needed.

Configuration

Config file: ~/.pi/agent/pi-tps.json (unchanged from upstream).

{
  "showTraces": true,
  "showStats": true,
  "showTtft": false,
  "colorPreset": "mono",
  "maxTraces": 100,
  "maxDetailed": 6
}

Development

npm run typecheck --workspace @ohgodtamit/pi-tps
npm run unit --workspace @ohgodtamit/pi-tps
npm run pack:inspect --workspace @ohgodtamit/pi-tps
PI_TPS_CLI_VERSION=0.84.0 npm run smoke:installed --workspace @ohgodtamit/pi-tps
PI_TPS_CLI_VERSION=1.0.4 npm run smoke:installed --workspace @ohgodtamit/pi-tps
PI_TPS_CLI_VERSION=1.1.0 npm run smoke:installed --workspace @ohgodtamit/pi-tps

Installed smoke defaults to Pi 1.1.0 and uses a temporary home and an isolated npm install. No provider credentials are required; it exercises configuration without a model request.

Release

Releases use the root Changesets workflow. Add a changeset, run npm run release:version, and commit the generated manifest, changelog, and lockfile changes. Then run npm run release:plan (confirm only the intended @ohgodtamit/pi-tps version with tag latest) and npm run release:publish from the repository root.

License

MIT. LICENSE applies to local changes. Upstream declares MIT in its README and package metadata but provides no LICENSE file or copyright notice at the pinned revision. See THIRD_PARTY_NOTICES.md for provenance.