Overview
A Pi extension that lets you pick code blocks or inline snippets from recent assistant messages. Copy to clipboard, insert into the editor, or run directly.
Features
- Fuzzy search – Type to filter snippets
- Multiple actions – Copy, insert, or run
- Inline + blocks – Finds both `inline code` and fenced blocks
- Smart filtering – Inline snippets filtered to paths and commands
Usage
# Open picker
/code
# Show only fenced blocks
/code blocks
# Copy mode (skip action picker)
/code copy
# Run a specific snippet
/code run 2
| Key | Action |
|---|---|
Enter | Copy to clipboard |
→ | Insert into editor |
Esc | Close |
Installation
npm install @tmustier/pi-code-actions
Or via git:
pi install git:github.com/tmustier/pi-extensions
Why?
Pi often outputs commands and file paths. Instead of selecting and copying manually, /code gives you a searchable list with one-key actions.