# 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

```bash
pi install npm:@kzsh/pi-burn
```

To try without installing:

```bash
pi -e npm:@kzsh/pi-burn
```
