OpenAltFinder
Pi

Pi

Minimal, extensible open-source coding agent CLI with a multi-provider LLM API, packages, MCP support, and a TypeScript SDK.

Open source alternative to:

Pi is a minimal, deliberately extensible agent harness for coding work. You start pi in a project directory, connect a provider with /login, and work in a terminal UI that writes code, runs tools and keeps a session you can resume later. Install it with the shell script (or the PowerShell script on Windows), through npm, or with Nix; it needs Node.js 22.19 or newer, and the installers pin dependencies rather than pulling loose transitive versions.

The design is small on purpose: Pi ships extensions, skills, prompt templates and themes instead of a large built-in feature set, and it skips sub-agents and plan mode so you can add those behaviours as packages. Extensions are TypeScript modules that register tools, commands, providers or UI, loaded with jiti so there is no separate build step, while skills follow the Agent Skills specification and prompt templates and themes stay declarative. Packages group those resources and install from npm, git or a local path with pi install, and the pi-package keyword puts them in the pi.dev gallery. It also speaks MCP over stdio or streamable HTTP, runs headless through --print, --mode json or --mode rpc, and exposes a TypeScript SDK.

Compared with Claude Code or Codex, the appeal is control: MIT-licensed, indifferent to model vendor, with a catalog covering Anthropic, OpenAI, Gemini, GitHub Copilot, OpenRouter, Bedrock, Vertex and many others, and a custom-provider path for anything OpenAI-compatible. The trade-off is that Pi has no built-in permission system for files, processes, network or credentials — it runs with the permissions of the user who launched it, so isolation is your job through plain Docker, Docker Sandboxes, OpenShell or the Gondolin micro-VM extension. The project hardens its supply chain with pinned direct dependencies, an install lock, and audit checks, and treats third-party extensions and packages as code to review before loading.

Frequently Asked Questions

Which model providers does Pi support?

Pi's unified LLM API covers Anthropic, OpenAI, Google Gemini, GitHub Copilot, OpenRouter, Amazon Bedrock, Google Vertex AI, DeepSeek, Groq, Mistral, Cerebras, xAI, Together, Fireworks, Hugging Face, Moonshot, MiniMax, Qwen and others. Run /login to pick a provider and complete its OAuth or API-key flow, or set the matching environment variable such as ANTHROPIC_API_KEY or OPENAI_API_KEY for CI and headless machines. Anything OpenAI-compatible can be added through a custom provider configuration, and model references like sonnet:high let you pick a variant per invocation.

Can I run Pi non-interactively in scripts or CI?

Yes. pi --print runs the prompt, writes the final assistant text to stdout and exits, which also works with piped input such as a git diff. pi --mode json streams the whole session as JSONL events, and pi --mode rpc reads JSONL commands from stdin for an external controller. For application code there is a TypeScript SDK, and pi --export turns a saved session into an HTML file. Downloaded CLI binaries and the npm package both work without a terminal.

How do I extend Pi?

Extensions are TypeScript modules that add tools, commands, event handlers, model providers or terminal UI, loaded from user or project directories or straight from a file with pi --extension, and jiti compiles them so no build step is needed. Skills follow the Agent Skills specification with a SKILL.md file plus optional scripts and references, and prompt templates and themes cover instruction and appearance changes. Bundle any of them into a Pi package and distribute it through npm, git or a local path with pi install, or try one for a single run with pi -e.

Does Pi sandbox the coding agent?

Not by itself. Pi has no built-in permission system for filesystem, process, network or credential access, so the agent and its extensions run with the permissions of the user who started it. The documentation offers three isolation routes: run the whole process in plain Docker, use Docker Sandboxes to keep provider credentials on the host behind a proxy, or use OpenShell for policy-controlled filesystem, network and credential rules. A Gondolin extension keeps the Pi interface on the host while routing built-in tools into a local Linux micro-VM.

Does Pi support MCP servers?

Yes, over stdio and streamable HTTP. Add a local server with pi mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem ., or a remote one with pi mcp add docs --url and a bearer token environment variable, then inspect connections with pi mcp list. Servers are stored per user in ~/.pi/agent/mcp.json or per project in .pi/mcp.json, and project entries are only read after project trust is granted. Inside a session, /mcp handles sign-in, reconnect, exposure and enablement.

OpenAltFinder Score
94/100
Project Health (63%)
90/100
License (25%)
100/100
Recency (13%)
100/100
How scoring works
Project Details
Platforms
CLI
License
MIT
Self hostable
Yes
Repository details
Version
v1.5.2
Created
8/9/2025
Stars
122,317
Forks
15,777
Open issues
259
Last commit
11/16/2026

Updated 11/16/2026, 3:01:09 PM

View Repository
Repository activity

Get the latest open source alternatives delivered weekly.
Discover tools that give you freedom from proprietary software.

Similar open source alternatives