pi-head is a small Pi package that adds /head: a keyboard-scrollable viewer for the latest assistant response, opened from its first line.
Use it when an assistant response is long and you want to jump back to the beginning without entering tmux copy/history mode.
- Adds the
/headslash command. - Finds the latest assistant text response on the active session branch.
- Opens that response in a full-screen Pi TUI viewer starting at line 1.
- Supports keyboard scrolling, paging, top/bottom jumps, and quick close.
- Installs as a normal Pi package from GitHub.
Install directly from GitHub:
pi install git:github.com/omerxx/pi-headOr install with the HTTPS URL:
pi install https://github.com/omerxx/pi-headReload Pi after installing:
/reload
Inside Pi, run:
/head
The viewer opens on the latest assistant text response, starting at the first line.
| Key | Action |
|---|---|
j, ↓ |
Scroll down one line |
k, ↑ |
Scroll up one line |
space, f, PageDown |
Page down |
b, PageUp |
Page up |
g |
Jump to top |
G |
Jump to bottom |
q, Esc |
Close |
Update installed Pi packages:
pi update --extensionsOr update only this package:
pi update git:github.com/omerxx/pi-headThen reload Pi:
/reload
pi remove git:github.com/omerxx/pi-headThen reload Pi:
/reload
Clone the repo:
git clone https://github.com/omerxx/pi-head.git
cd pi-headInstall from a local checkout while testing:
pi install /absolute/path/to/pi-headOr load for a single run without installing:
pi -e /absolute/path/to/pi-headPackage dry run:
npm pack --dry-runpi-head/
package.json
extensions/
head.ts
package.json declares the Pi extension manifest:
{
"pi": {
"extensions": ["./extensions"]
}
}If you previously copied head.ts into ~/.pi/agent/extensions/, remove that standalone file after installing this package to avoid duplicate /head command registrations.
MIT