Pi Is Not Another Claude Code
Most coding agents want you to adapt to them — learn their plan mode, their permission pop-ups, their sub-agents. Pi does the opposite.
Pi is a minimal terminal harness. Four tools by default: read, write, edit, bash. Everything else you add via TypeScript Extensions, Skills, Prompt Templates, and Themes. You shape Pi to your workflow, not the other way around.
Quick Start
1 | npm install -g --ignore-scripts @earendil-works/pi-coding-agent |
Then just talk. Pi ships with 30+ providers — Claude Pro/Max, ChatGPT Plus/Pro (Codex), Gemini, DeepSeek, Groq, Kimi, OpenRouter, Bedrock, Azure, and a local llama.cpp router.
1 | pi --model openai/gpt-4o "Help me refactor" |
Interactive Mode, Supercharged
Type / for commands, @ to attach files, !cmd to run bash and feed output to the model:
| Command | What it does |
|---|---|
/model |
Switch models (Ctrl+L) |
/login /logout |
Manage credentials |
/resume /tree /fork /clone |
Session tree navigation |
/compact |
Manual context compaction |
/share |
Export as private Gist |
/skill:name |
Run a Skill |
Queue while it thinks: Enter = steering, Alt+Enter = follow-up, Esc = abort. Configure steeringMode in settings.
Sessions are trees. JSONL stored in ~/.pi/agent/sessions/. Use /tree to jump to any point and branch in-place — all history preserved. Or pi -c to continue, pi -r to browse, pi --fork <id> to fork from CLI.
Why Pi Skips What Others Bake In
From the docs — Philosophy:
- No MCP. Build CLI tools with READMEs, or add MCP via an Extension.
- No sub-agents. Spawn pi via tmux, or build it as an Extension.
- No permission pop-ups. Run in a container, or build your own gate.
- No plan mode. Write plans to files, or build it.
- No background bash. Use tmux.
This keeps the core minimal. You install what you need, nothing you don’t.
Extend Everything
Skills — On-Demand Capability Packs
1 | <!-- ~/.pi/agent/skills/my-skill/SKILL.md --> |
Invoke via /skill:name or let the model auto-load. Place in ~/.pi/agent/skills/, .pi/skills/, or a Pi Package.
Extensions — TypeScript Power
1 | export default function(pi: ExtensionAPI) { |
Add custom tools, sub-agents, plan mode, permission gates, status lines, git checkpointing, even Doom while you wait. Place in ~/.pi/agent/extensions/ or share via Pi Package.
Pi Packages — Share Your Stack
1 | pi install npm:@foo/pi-tools |
Packages bundle extensions + skills + prompts + themes via package.json pi manifest. Auto-discovered from extensions/, skills/, prompts/, themes/.
Find them on npm (keywords:pi-package) or Discord.
Prompt Templates & Themes
- Templates: Markdown in
~/.pi/agent/prompts/→/templatenamewith{{focus}}variables - Themes:
dark/lightbuilt-in, hot-reload, in~/.pi/agent/themes/
Programmatic Use
SDK:
1 | import { createAgentSession, ModelRuntime, SessionManager } from "@earendil-works/pi-coding-agent"; |
RPC for non-Node integrations:
1 | pi --mode rpc # LF-delimited JSONL over stdin/stdout |
Print mode for one-shots:
1 | cat README.md | pi -p "Summarize this" |
Pro Tips
- Trust: First run in a new repo asks to trust
.pi/settings.jsonand project extensions. Use--approve/--no-approveto override,/trustto save decision. - Context:
AGENTS.md/CLAUDE.mdauto-loaded from~/.pi/agent/→ parents → cwd. Override withAGENTS.override.md. Disable with--no-context-files. - System prompt: Replace via
.pi/SYSTEM.md, append viaAPPEND_SYSTEM.md. - Env:
PI_OFFLINE=1disables all startup network calls.PI_CACHE_RETENTION=longfor extended prompt cache.
Who Is Pi For?
If you want an opinionated workflow out of the box, use Claude Code. If you want a minimal core you can bend to your workflow — extensions for your stack, skills for your domain, themes for your taste — Pi is it.
Start minimal. Add what you need. Share what you build.
Docs: pi.dev | GitHub: earendil-works/pi-coding-agent | Discord: community invite on README