Skip to content

Extensions Overview

pi-code ships with 25+ built-in extensions that handle everything from tool output rendering to multi-agent coordination. Extensions aren’t plugins bolted on — they’re the primary way pi-code’s features are implemented.

What extensions can do

Extensions have full access to pi-code’s runtime:

  • Register tools — give the LLM new capabilities
  • Render TUI widgets — status bars, task boards, progress indicators
  • Hook lifecycle events — intercept tool calls, turn completions, errors
  • Register commands — add /slash commands for users
  • Inject context — modify the system prompt dynamically
  • Compose with each other — one extension can enhance another

Categories

Core tools — enhanced versions of bash, edit, read, and write with live output, diff previews, and smart truncation. Plus LSP, subagents, tasks, background execution, and plan mode.

UI & display — theme switching, status bar, output styles, keyboard shortcut reference, and tool display configuration.

Lifecycle & safety — hooks for automation, git integration, destructive command approval, WezTerm notifications, and project initialization.

Commands — agent invocation, skill commands, nested prompts, and command composition.

Installing extensions

Terminal window
# Global (default) — ~/.pi/agent/extensions/
bun run cli install <extension-name>
# Project-local — .pi/extensions/
bun run cli install -l <extension-name>

Global extensions install to ~/.pi/agent/extensions/. Project-local extensions install to .pi/extensions/ in your project directory. No wrapper scripts or environment variables — just pi.

Creating your own

See Creating Extensions for the full guide on building custom extensions.