@kzsh/pi-burn

Track cost-per-request in pi sessions

Packages

Package details

extension

Install @kzsh/pi-burn from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@kzsh/pi-burn
Package
@kzsh/pi-burn
Version
0.0.1
Published
Jul 8, 2026
Downloads
109/mo · 8/wk
Author
kzsh
License
unknown
Types
extension
Size
22.2 KB
Dependencies
0 dependencies · 3 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-burn

Tracks request cost over the course of a pi session and surfaces it in the status bar and a graph widget.

What it shows

The status bar updates after every completed request:

$0.013/req  $0.008/min  ●cr:$0.001  ●in:$0.011  ●cw:$0.000  ●out:$0.001
Field Meaning
$0.013/req Rolling average cost of the last 3 requests
$0.008/min Cost rate over the last 60 seconds
●cr / ●in / ●cw / ●out Per-type cost breakdown (cache read, input, cache write, output)

A two-row braille sparkline above the editor shows per-type cost history across all requests in the session.

Commands

/burn — open the settings panel. Toggle cost-per-request, cost-per-minute, and decimal precision.

Flags

--burn-precision <0-3> — decimal places for dollar amounts. Defaults to 3.

Installation

pi install npm:@kzsh/pi-burn

To try without installing:

pi -e npm:@kzsh/pi-burn