Live·typescript · pi

/code

Pick code blocks and inline snippets from Pi's responses to copy, insert, or run.


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
KeyAction
EnterCopy to clipboard
Insert into editor
EscClose

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.