# pi

> A minimal terminal coding agent you extend with skills, extensions and packages

- Repository: https://github.com/earendil-works/pi
- Category: Coding agents & dev tools
- Stars: 117,245 · Forks: 14,972 · Language: TypeScript · License: MIT
- Experience: Some experience
- Page: https://ir.adyog.com/repos/earendil-works/pi/

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.

## Who it's for

Developers comfortable with the terminal and Node.js who want a customizable coding agent; know that it has no built-in permission limits.

## 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 | sh
```
```
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
```
```
cd /path/to/project
pi
```

Tags: coding-agent, cli, typescript, llm, extensions
