Skip to content

Pi coding agent extensions — /prune, /explore, and more

License

Notifications You must be signed in to change notification settings

hintjen/pi-extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-extensions

Extensions for the pi coding agent.

Install

pi install git:github.com/hintjen/pi-extensions

Then /reload or restart pi.

Extensions

/prune — Interactively remove messages from your session

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 /tree to get back to it
  • Structural entries (compaction, branch summaries) cannot be pruned

/explore — Structured interactive Q&A for design exploration

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 the question/questionnaire tools to map out the design space interactively.
  • /snapshot <label> — Label the current point in the session tree for easy /tree navigation.

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.

Uninstall

pi remove git:github.com/hintjen/pi-extensions

License

MIT

About

Pi coding agent extensions — /prune, /explore, and more

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published