Tools / Pi

Pi Review

A deliberately minimal terminal coding agent that you extend instead of configuring

Last reviewed: October 2026

TL;DR

Pi is a terminal coding agent from Earendil whose philosophy is to ship powerful defaults and leave out the rest: no sub-agents, no plan mode, no permission popups, no built-in to-dos, no background bash. You add what you need through TypeScript extensions, skills, and packages. It supports 15+ providers, branching session trees, and an SDK, and it is one of the fastest-growing open-source alternatives to Claude Code.

License

MIT

Self-hosted

Yes

Cloud option

None

GitHub stars

114.6K★

Checked October 2026

Category

Developer Tools & AI Coding

Pricing

Free under MIT; you pay for model usage through your own subscriptions or API keys

What is Pi?

Pi is a minimal agent harness. The site lists what it deliberately omits and how to get it back: MCP is now built in (with Codemode), sub-agents are replaced by tmux or extensions, permission popups by running in a container or building a confirmation flow, plan mode by writing plans to files, built-in to-dos by a TODO.md, and background bash by tmux. Extensions are TypeScript modules that can add tools, commands, shortcuts, events, and TUI elements, skills are on-demand capability packages, and prompt templates are Markdown files invoked with /name, all bundled as Pi packages installable from npm or git. Sessions are stored as trees in a single file, so /tree lets you branch from any earlier point, /export produces HTML, and /share creates a gist link. Context comes from AGENTS.md (loaded from ~/.pi/agent/, parent directories, and the current directory) and SYSTEM.md, with auto-compaction of older messages.

Installation & self-hosting

Install with a curl script on macOS and Linux, a PowerShell script on Windows, npm install -g --ignore-scripts @earendil-works/pi-coding-agent, or Nix (nix run github:earendil-works/pi/stable). It requires Node.js 22.19 or newer, and the installers can provide it. Note that the npm install does not pin transitive dependencies, while the pi.dev installer does. Inside Pi, /login connects a subscription or API key for a built-in provider, and the pi-ai package offers a unified API across OpenAI, Anthropic, Google, and others. Modes include interactive terminal, print and JSON for automation, RPC control, and a TypeScript SDK for building apps.

User experience

You switch models mid-session with /model or Ctrl+L, branch sessions with /tree, and customize with /reload after asking Pi to build a feature. The security model is the thing to understand: Pi has no built-in permission system and runs with the permissions of the user and process that launch it, and the docs suggest three isolation options, a Gondolin extension, plain Docker, or OpenShell. This section reflects the README and site; we did not use Pi hands-on.

Key features

  • 15+ providers and hundreds of models, with API key or OAuth login and mid-session switching
  • Tree-structured sessions with branching, HTML export, and gist sharing
  • TypeScript extensions, skills, prompt templates, and shareable Pi packages
  • AGENTS.md and SYSTEM.md context files with auto-compaction
  • Interactive, print and JSON, RPC, and SDK modes
  • Built-in MCP support with Codemode

What Pi does well

  • A small, understandable core that you can reshape instead of fighting
  • Session trees make it easy to try alternatives without losing context
  • Embeddable through an SDK and RPC, not just a terminal app
  • Fast-growing community: about 115,000 stars, up roughly 10% in a month

Where Pi falls short

  • No built-in permission system, so it can do anything your user can unless you isolate it yourself
  • Minimal by design: features such as sub-agents, plan mode, and to-dos need extensions or conventions
  • The npm install does not pin transitive dependencies, which matters for supply-chain-conscious teams
  • New issues and pull requests from new contributors are auto-closed by default
  • Terminal only, with no bundled desktop or IDE experience

Pricing

Pi is free under the MIT license. Costs come from model usage with providers such as Anthropic, OpenAI, or Google, or from your own subscriptions, and local models through Ollama work too. The site mentions no paid plan.

Pi vs Claude Code

Claude Code and Codex are vendor-built coding agents with polished defaults and tight integration with their own models, including permission prompts and plan modes. Pi trades those built-ins for flexibility: it works with many providers and you add the behavior you want. Compared with OpenCode, which ships plan and build agents, LSP integration, and a desktop app, Pi starts smaller and expects you to extend it. Choose Pi if you enjoy tuning your tools; choose OpenCode or a vendor tool if you want a rich experience from the first minute.

See all Claude Code alternatives

Best for

  • Developers who want to customize their coding agent deeply
  • Teams embedding an agent through the SDK or RPC
  • People who use several model providers and want to switch freely
  • Users who like branching conversations while exploring approaches

Not ideal for

  • Developers who want a polished, batteries-included experience immediately
  • Teams that need permission prompts and managed policies by default
  • Users who prefer a graphical interface

Alternatives

OpenCodeClaude CodeCodex
Compare them all

Final verdict

Pi is a thoughtful, hackable alternative to the big coding agents, best for developers who want control and are willing to assemble their setup. Run it in a container or sandbox, since it deliberately has no permission system.

Sources