earendil-works /
pi
A minimal terminal coding agent you extend with skills, extensions and packages
- 117.2k stars
- 5.8k stars since 3 Oct
- TypeScript
- Updated today
- Some experience
- Coding agents & dev tools
Pi is a monorepo that holds a coding agent you run in the terminal, plus the libraries it is built on. These include a multi-provider LLM API, an agent runtime with tool calling, and a terminal UI library.
The agent keeps its core small. It leaves out features such as sub-agents and plan mode on purpose. You either ask Pi to build what you want, or install a package that adds it. Extensions, skills, prompt templates and themes can be bundled as Pi packages and shared through npm or git.
You can use it interactively, script it in print or JSON mode, drive it over RPC, or embed it in your own app with the TypeScript SDK. Pi has no built-in permission system. It runs with your user's permissions, so the README suggests Docker or a sandbox if you need limits.
What it does
Customizable by design
Extensions, skills, prompt templates and themes let you change how Pi behaves. You can bundle them as packages and share them via npm or git.
Several ways to run it
Use the interactive terminal UI, print or JSON mode for scripts, RPC for control from other programs, or the TypeScript SDK to build your own apps.
Unified LLM API
The pi-ai package gives one interface to providers such as OpenAI, Anthropic and Google. Inside Pi, /login connects a subscription or API key.
Reusable building blocks
The agent runtime (tool calling and state) and the terminal UI library (differential rendering) are separate packages you can use on their own.
Sandboxing guidance
Docs cover three ways to contain Pi: a Gondolin micro-VM extension, plain Docker, or an OpenShell sandbox.
What you could build
- Run a coding agent in your terminal to work on a project directory.
- Script Pi in print or JSON mode to automate repeated coding tasks.
- Build your own agent-powered app with the Pi TypeScript SDK.
- Write an extension or skill package and share it with others through npm or git.
- Run the agent inside Docker or a micro-VM to keep it away from your host system.
Get started
Install Pi with the installer script or npm (Node.js 22.19 or newer). Then run pi in your project folder, use /login to connect a provider, and give it a task.
curl -fsSL https://pi.dev/install.sh | shnpm install -g --ignore-scripts @earendil-works/pi-coding-agentcd /path/to/project
piCommands are copied from the project's README. Read it on GitHub for the full setup.
Anything better than pi?
Pi is a strong pick if you want a minimal terminal agent you can reshape with extensions and skills. For a more batteries-included agent, look at OpenCode or Codex. For a library to build your own agent, look at Vercel AI.
-
opencodeAlternative You want a terminal coding agent that works out of the box, with build and plan modes, many model providers and a desktop app. Trade-off: It has more built-in features and a larger surface, so it is less minimal and less shaped around your own extensions.
-
codexAlternative You already pay for ChatGPT or use OpenAI models and want a polished, officially supported terminal agent. Trade-off: It is centred on OpenAI and offers less room to reshape the agent than Pi.
-
openclaudeAlternative You want a ready-made terminal agent that connects to cloud and local backends, including Ollama and MCP, from one interface. Trade-off: It is a less customizable and smaller project, and it is not built around an extension and package model.
-
aiUse alongside You are building your own app or agent in TypeScript and want one API across model providers, with chat UI hooks. Trade-off: It is a library, not a ready terminal agent, so you write the agent loop and the interface.
More in Coding agents & dev tools
rea
MCP server that lets AI agents reverse engineer apps, binaries and websites locally