Earendil Inc. · Pi: Minimal, Extensible Open-Source Coding Agent for the Terminal
Pi is a minimal, open-source (MIT) terminal coding agent from Earendil. It reads, edits, and runs code using the model provider you choose, and it is designed to be extended rather than configured. It suits developers who want a small, scriptable agent they can shape with TypeScript extensions, skills, and packages.
Best for
Developers who want a small, model-agnostic terminal agent they fully control and are willing to extend with their own tools, and teams embedding an agent loop in their own software
Not ideal for
Developers who want MCP, sub-agents, plan mode, and approval prompts out of the box, teams that need built-in permission controls, and anyone who prefers an IDE or desktop interface
Who it's for
Developers who want a minimal, extensible, model-agnostic coding agent for the terminal or an agent toolkit to build on
Pi is for developers who find full-featured coding agents too opinionated. The core is small, model-agnostic, and easy to script, and its tree-structured sessions let you try an alternative approach without losing the first one. The cost is that you assemble the rest yourself. There are no approval prompts, no built-in MCP or sub-agents, and no IDE integration, so it rewards people willing to write extensions and run it in a container. Teams that want guardrails and batteries included should look elsewhere.
Who should use it
Developers who want a lightweight, model-agnostic terminal agent they can customize, people who switch between providers or local models often, and teams that need an embeddable agent loop through an SDK or RPC.
Who should skip it
Developers who want approvals, MCP, and sub-agents without extra setup, teams that need built-in permission controls, and anyone who prefers working in an IDE panel or desktop app.
Open Source
Free
Note: Pi itself is free. Costs come from the model provider, subscription, or hardware you use to run models.
API pricing
Free TypeScript SDK and RPC mode; model usage is billed by the provider you connect
Available models
Exploring two approaches to the same change
Sessions are stored as a tree, so you can go back to an earlier message, branch, and compare results, with an optional summary carried into the new branch.
Cost-aware model mixing
You can switch models mid-session with /model, for example using a cheaper or local model for exploration and a frontier model for the hard step.
Embedding a coding agent in internal tooling
Print, JSON event stream, RPC, and TypeScript SDK modes let other programs drive Pi without the interactive UI.
Pi Coding Agent vs. OpenCode
OpenCode is an open-source, multi-provider coding agent that ships more built in, including MCP support. Pi keeps a smaller core and leaves MCP, sub-agents, and plan mode to extensions, and it adds tree-structured, branchable sessions.
Pi Coding Agent vs. Claude Code
Claude Code is Anthropic's commercial agent for Claude models with approvals, subagents, and MCP built in. Pi is free and model-agnostic, and it can use Claude models, but it has no permission prompts and expects you to add features yourself.
Pi Coding Agent vs. OpenAI Codex
OpenAI Codex combines an open-source CLI with parallel cloud tasks and ChatGPT plan billing. Pi is terminal-only with no cloud tasks, but it can sign in with an OpenAI Codex subscription and use other providers in the same session.
Pi Coding Agent vs. Cline
Cline is an open-source, bring-your-own-key agent for VS Code, JetBrains, a desktop app, and the terminal, with a Plan/Act workflow and MCP built in. Pi is terminal-only, leaves plan mode and MCP to extensions by design, and is built to be scripted and embedded.
What is the Pi coding agent?
Pi is a minimal, open-source coding agent for the terminal built by Earendil Inc. It reads, edits, and runs code with the model you choose, and it is designed to be extended with TypeScript extensions, skills, prompt templates, themes, and packages.
Is Pi free and open source?
Yes. Pi is MIT licensed on GitHub (earendil-works/pi). You pay only for the model access you use, whether through API keys, a supported subscription, or local models.
Which models and providers does Pi support?
Pi supports API keys for many providers, including Anthropic, OpenAI, Google Gemini, DeepSeek, Mistral, Groq, xAI, OpenRouter, Kimi, and MiniMax, cloud platforms such as Azure OpenAI, Amazon Bedrock, and Google Vertex AI, OAuth sign-in for supported subscriptions such as OpenAI Codex and GitHub Copilot, and local models via llama.cpp, Ollama, LM Studio, vLLM, or SGLang.
Does Pi support MCP and sub-agents?
Not out of the box. Pi deliberately leaves out MCP, sub-agents, plan mode, and permission popups. You can add them through extensions, or use CLI tools and tmux instead.
Is Pi safe to run on my machine?
Pi runs with the permissions of the account that started it and does not ask before each tool call. Its documentation recommends running it inside a container, VM, or sandbox, and describes three options: a Gondolin micro-VM extension, plain Docker, and OpenShell.
How do I install Pi?
On macOS or Linux, run `curl -fsSL https://pi.dev/install.sh | sh`. On Windows, use the PowerShell installer. You can also install it from npm with `npm install -g --ignore-scripts @earendil-works/pi-coding-agent`, which requires Node.js 22.19 or newer. Then run `pi` in a project folder and use /login to connect a provider.

Anomaly
Developers who want a terminal-based AI coding agent with no vendor lock-in, the ability to bring any LLM provider, and undo control over agent file changes
FreeAnthropic
Developers and teams who want deep codebase reasoning, multi-file changes, and persistent project instructions in a terminal-friendly or IDE-native workflow
Paid
OpenAI
Developers and teams already paying for ChatGPT Plus, Pro, Business, or Enterprise who want one coding agent across the terminal, IDE, and parallel cloud tasks
Freemium
Cline
Developers and teams who want an open-source, model-agnostic AI coding agent they fully control, in their existing IDE or terminal
FreemiumPi takes the opposite approach to batteries-included coding agents. The core agent inspects files, runs commands, and edits code, and it shows every read, search, command, and edit in the transcript. It does not ask for approval before each tool call. Pi deliberately leaves out MCP, sub-agents, permission popups, plan mode, built-in to-dos, and background bash. You add those through TypeScript extensions, or use plain tools such as tmux and TODO.md files. Sessions are stored as a tree, so you can return to an earlier message and branch with /tree, split off separate work with /fork, or copy the current state with /clone. When you leave a branch, Pi can summarize it into the one you enter. You can switch models mid-session, steer the agent while it works, and shape context with AGENTS.md, SYSTEM.md, and compaction. Pi works with a long list of providers through API keys, including Anthropic, OpenAI, Google Gemini, DeepSeek, Mistral, Groq, xAI, OpenRouter, Kimi, and MiniMax. It also supports cloud platforms such as Azure OpenAI, Amazon Bedrock, and Google Vertex AI, OAuth sign-in for supported subscriptions such as OpenAI Codex and GitHub Copilot, and local models through llama.cpp or OpenAI-compatible servers such as Ollama and LM Studio. Beyond the interactive TUI, Pi runs in print, JSON event stream, and RPC modes and as a TypeScript SDK. The building blocks are published as separate npm packages (pi-ai for a unified multi-provider LLM API, pi-agent-core for the agent runtime, and pi-tui for the terminal UI), and other agents use them: DeepSeek Harness routes third-party providers through an adapter built on pi-ai, and Kimi Code's TUI is built on pi-tui. The cost of this minimalism is safety and convenience. Pi runs with your user's permissions and has no built-in permission system, so the project recommends a container, micro-VM, or sandbox. Features other agents ship by default have to be added as packages.
Pi 0.87.1 added Claude Opus 5.5 (with a 1M context window through Anthropic), GPT-6 Sol, and GPT-6 Luna through supported providers including GitHub Copilot and OpenAI Codex subscriptions, and made Grok 4.7 the default xAI model.
Pi 0.86.0 added cost-aware prompt cache warming during long tool runs and a /bug command with redacted diagnostics. Version 0.86.1 followed with Meta Muse sign-in via /login meta or META_API_KEY.
Are you the founder? Claim this listing →