The minimal, aggressively extensible coding harness that adapts to your workflow — not the other way around.
Write extensions in TypeScript. Share them as packages. Shape Pi to fit how you work.
By default, Pi gives the model just 4 tools: read, write, edit, and bash. Add what you need — nothing you don't.
Register custom tools, slash commands, keyboard shortcuts, event hooks, and even custom UI components — all without forking Pi.
Bundle extensions, skills, prompts & themes. Share via npm or git. Install with one command:
pi install npm:@foo/pi-tools
Explore solutions in parallel. Navigate a full tree of conversation branches — all in one file. Fork, clone, compact.
Hot-reload themes, custom keybindings, and a rich terminal UI with message queuing, steering, and model cycling.
Embed Pi in your own Node.js apps, or integrate over stdin/stdout JSONL. Pi adapts to your stack.
| Dimension | Claude Code | Pi |
|---|---|---|
| Providers | Anthropic only | 30+ providers including Anthropic, OpenAI, Google, Groq, Mistral, local LLMs via llama.cpp |
| Extensibility | MCP servers, hooks | TypeScript Extensions — custom tools, commands, UI, sub-agents, compaction, games (Doom!) |
| Session Model | Linear history | Tree branching — fork, clone, navigate branches in-place. All in one JSONL file. |
| Run Modes | Interactive + print | 4 modes: Interactive, Print, JSON streams, RPC (process integration) |
| SDK | Limited | Full Node.js SDK — embed Pi sessions in your own apps |
| Message Flow | Blocking | Steering + follow-up queue — send messages while agent works |
| Package system | — | Pi Packages — share extensions, skills, themes via npm/git |
| Context control | Compaction | Compaction + configurable logic + custom summaries via extensions |
| Local models | — | llama.cpp router server — download, load, run local LLMs with /llama |
| Trust model | Permissions | Project trust + extensions — no popups, build your own flow |
Pi doesn't try to be Claude Code. It lets you build whatever Claude Code is — your way.
-p--mode json--mode rpcPlace in ~/.pi/agent/extensions/ or bundle into a Pi Package.
On-demand capability packages following the Agent Skills standard. The model loads them automatically when needed.
Invoke: /skill:docker
Reusable Markdown prompts with variable placeholders. Expand with a slash command.
Invoke: /review focus=authentication
~/.pi/agent/skills/, .pi/skills/, or Pi Packages. No configuration needed.
Switch models mid-session. Mix subscription logins with API keys. Pi keeps provider-specific quirks out of your way.
/loginEvery conversation is a tree. Jump to any point, branch into new directions, switch between branches — all in a single JSONL file.
/treeFork: create a new session from any past message. Open the selector, pick a point, and continue with a clean file.
/forkClone: duplicate the active branch into a new session at the current position. Keep all history.
/cloneLong sessions? Automatic or manual compaction summarizes older messages, keeps recent context intact. Full history preserved in the JSONL — revisit anytime via /tree.
Share sessions as private GitHub gists with shareable HTML links. Export to HTML or JSONL. Import and resume from exported sessions.
/share /export session.htmlPi's philosophy: aggressively extensible so it doesn't dictate your workflow. Features baked into other tools are built your way.
Pi doesn't say "trust our defaults." It says "build what you need."
One command, zero fuss.
npm i -g @earendil-works/pi-coding-agent
API key or subscription login.
export ANTHROPIC_API_KEY=...
pi → /login
Just talk to Pi.
pi "Build me an API"
If you use Claude Code, try Pi. You'll keep Claude Code for Anthropic-only workflows —
and reach for Pi when you need flexibility, extensibility, and control.