# pi-tmux

tmux status for the [Pi coding agent](https://pi.dev).

- **Spinner** on the tmux window name while the agent is working, plus a spinner on the outer
  terminal title while any window of the session is busy.
- **🔔 mark** on the window name when the agent finishes, cleared automatically once you select that
  window.
- **Completion sound** when the finished window is not the one you are looking at.
- **AI-generated title** as the window name, so `bash` becomes `Fix OAuth callback`.

## Install

```bash
pi install npm:pi-tmux
```

It activates only inside tmux (`$TMUX`) and stays completely inactive anywhere else, so it is safe to
leave installed on every machine.

The completion sound plays a bundled mp3 through [`mpv`](https://mpv.io/). Without `mpv` installed
everything else still works; only the sound is skipped. Point it at another player with the
`sound.command` and `sound.args` settings.

## Commands

```
/rename                     regenerate the window name from the whole conversation
/rename Fix OAuth callback  set the window name explicitly

/pi-tmux                    open the settings menu
```

Use the arrow keys to move, Enter or Space to change a value, and Escape to close the menu. String
and number settings open an input screen. Changes are applied and saved immediately. Any arguments
to `/pi-tmux` are ignored, so it always opens the same menu.

Settings live in `~/.pi/agent/pi-tmux.json`.

## Title generation

Titles are generated by the model the session is already running on, at low thinking effort, in the
language you wrote in. Set `naming-model` in the settings menu to use a cheaper model instead, or
clear the field to go back to the session model.

## License

MIT
