Extensions for the pi coding agent.
pi install git:github.com/hintjen/pi-extensionsThen /reload or restart pi.
Opens a TUI showing all messages on the current branch. Mark entries for removal and confirm to create a clean new branch.
✂️ Prune Branch — 2 marked for removal
○ 👤 user What is the capital of France?
▸ ✗ 🤖 asst The capital of France is Paris...
✗ 🔧 tool read: /tmp/notes.txt
○ 👤 user Thanks, now tell me about Germany
↑↓ navigate • Space toggle • a toggle all • Enter confirm • Esc cancel
2 to remove · 2 to keep · original branch preserved in /tree
Controls:
| Key | Action |
|---|---|
| ↑↓ | Navigate (skips non-prunable entries) |
| Space | Toggle removal on/off (auto-advances) |
| a | Toggle all prunable entries |
| Enter | Confirm and execute prune |
| Esc | Cancel |
How it works:
- Sessions are append-only trees, so pruning creates a new branch from the parent of the earliest removed entry
- If you remove messages from the middle, kept messages after the gap are replayed as context on the new branch
- The original branch is always preserved — use
/treeto get back to it - Structural entries (compaction, branch summaries) cannot be pruned
Registers two LLM tools (question and questionnaire) that create interactive TUI prompts during conversation, plus commands for exploration workflows.
Tools (called by the LLM):
question— Single question with selectable options + free-text fallback. Creates a TUI selector the user interacts with directly.questionnaire— Multi-question tabbed flow for gathering several related pieces of information at once.
Commands:
/explore [topic]— Loads a structured exploration prompt into the editor. The LLM then uses thequestion/questionnairetools to map out the design space interactively./snapshot <label>— Label the current point in the session tree for easy/treenavigation.
Why this is useful:
Every tool invocation creates a discrete node in the session tree. Use /tree to branch at decision points, answer differently on each branch, and compare alternative paths. This creates a navigable map of your entire exploration process.
pi remove git:github.com/hintjen/pi-extensionsMIT