Pi ships four tools. Claude Code ships 27. That is not a feature gap, it is the entire product thesis, and whether it appeals to you decides this in about thirty seconds.

Claude Code is a product: the capabilities exist, you use them. Pi is a toolkit: a small core plus a TypeScript extension system, and the behaviour you want is behaviour you write or install. If "I want to modify how my agent works" sounds like a chore, stop reading and stay where you are. If it sounds like the point, this is the one.

Install and first run

Pi needs Node 18 or newer.

npm install -g --ignore-scripts @earendil-works/pi-coding-agent

Or the install script on Linux and macOS:

curl -fsSL https://pi.dev/install.sh | sh

Then run pi in any project directory. No config file needed to start.

Providers

This is where Pi diverges hardest from Claude Code. Claude Code speaks the Anthropic protocol and only the Anthropic protocol. Pi supports 15 or more providers: Anthropic, OpenAI, Google, Azure, Bedrock, Mistral, Groq, Cerebras, xAI, Hugging Face, Kimi For Coding, MiniMax, NVIDIA, OpenRouter and Ollama among them.

Authentication is an API key or OAuth. Set the environment variable and Pi discovers the models automatically, so OPENROUTER_API_KEY in your shell is enough to make that provider's catalogue available. Switch models with /model or Ctrl+L. Use /login for subscription-based providers and /llama for local model management.

Providers not built in go in ~/.pi/agent/models.json, and they work as long as they speak a supported API shape (OpenAI, Anthropic, or Google).

The practical consequence: the protocol problem that limits Claude Code does not exist here. If you have a subscription whose good models are OpenAI-compatible, Pi reaches them and Claude Code cannot. We covered that constraint in detail in how to run Claude Code on a cheaper model.

Extensions, which is the actual product

Drop a .ts file into ~/.pi/agent/extensions/ and Pi loads it. That is the whole deployment story.

Extensions are loaded through jiti, so TypeScript runs without a compile step, and /reload picks up changes without restarting the session. An extension can register tools, intercept commands, add slash commands, and modify the system prompt.

The repository ships more than 50 examples, and the list tells you what the model is for: subagents, plan-mode, permission-gate, protected-paths, ssh, sandbox. Those are features Claude Code bundles. In Pi they are files you can read in a sitting and change.

That is the trade. In Claude Code, permission gating is behaviour you configure. In Pi it is roughly a hundred lines you own, which means you can make it do exactly what your team needs and it is also yours to maintain.

What the minimalism actually buys

Numbers rather than adjectives. On a cold request with no cache, Pi sends 2,768 input tokens against Claude Code's 28,407, because the tool catalogue is ~1.1k tokens rather than ~18.9k.

Two caveats worth stating plainly. First, that gap is a cold-start gap: with prompt caching in steady state, OpenCode measured cheaper per turn than Pi. Second, sources disagree slightly on the tool count, with the docs describing four default tools (read, write, edit, bash) and other write-ups counting five by including mcp. Either way the order of magnitude holds.

Where this matters is metered plans with hard caps. Where it does not matter is an unmetered subscription during a long session, and it is worth being honest that this is most people.

Working in it

Two input behaviours are worth knowing on day one because they change how you drive the agent.

Enter sends a steering message that gets delivered after the current tool call and interrupts the remaining ones. Alt+Enter queues a follow-up that waits for the agent to finish the turn.

That distinction is the difference between correcting a run in flight and stacking instructions. Most frustration with agentic tools comes from having only the second option.

When to pick which

Pi if you want to shape agent behaviour, work across multiple providers, or care about cold-start token cost. Also if you want to understand how an agent loop works, because the surface is small enough to read end to end.

Claude Code if you want capability without assembly, you are on Anthropic models anyway, and 27 tools existing by default is a benefit rather than overhead. Deep multi-file work remains its strongest ground.

Both is a common answer and not a cop-out. They install independently, they do not conflict, and the switching cost is one command. Using Claude Code as the daily driver and Pi for multi-provider or heavily customised work is a coherent setup.

The thing not to do is pick Pi expecting Claude Code with a smaller prompt. It is a different proposition. The four tools are not a limitation to work around, they are the offer.

FAQ

How do I install Pi coding agent?

Install globally with npm using npm install -g --ignore-scripts @earendil-works/pi-coding-agent, or run the shell installer at https://pi.dev/install.sh. Pi requires Node.js 18 or newer. Run pi inside any project directory to start; no configuration file is needed for the first session.

Which providers does Pi support?

Pi supports 15 or more providers including Anthropic, OpenAI, Google, Azure, Bedrock, Mistral, Groq, Cerebras, xAI, Hugging Face, Kimi For Coding, MiniMax, NVIDIA, OpenRouter and Ollama. Setting the relevant API key as an environment variable is enough for Pi to discover that provider's models. Additional providers can be added in ~/.pi/agent/models.json if they speak the OpenAI, Anthropic or Google API shape.

How do Pi extensions work?

Place a TypeScript file in ~/.pi/agent/extensions/ and Pi loads it automatically. Extensions run through jiti so no compilation step is required, and /reload applies changes without restarting. They can register tools, add slash commands, intercept commands and modify the system prompt. The repository ships over 50 examples including subagents, plan mode, permission gating and sandboxing.

Is Pi better than Claude Code?

Neither is better in general; they solve different problems. Pi suits developers who want to customise agent behaviour and work across multiple model providers, with a much smaller cold-start token footprint. Claude Code suits developers who want capability immediately without assembling it, and remains the stronger choice for deep multi-file work on Anthropic models.

How many tools does Pi have?

Four by default: read, write, edit and bash. Some comparisons count five by including an mcp tool. Either figure contrasts sharply with Claude Code's 27, which is the main reason Pi's tool catalogue costs around 1.1k tokens per request versus roughly 18.9k.

Sources