# Pi

> A minimal, extensible terminal coding agent that reads, edits and runs commands, and leaves features such as sub-agents and plan mode to extensions you add. Run it in EnvHaven from any browser, signed in once with your own account, and keep it working 24/7; or install it on your own machine.

_Updated November 23, 2026 · Checked against Pi 0.87.1 in EnvHaven v1.9.0_

| At a glance |  |
| --- | --- |
| Made by | Earendil |
| Command | `pi` |
| Version checked | 0.87.1, in EnvHaven v1.9.0 |
| License | MIT, [source](https://github.com/earendil-works/pi) |
| Documentation | [docs.pi.dev/latest](https://docs.pi.dev/latest) |

## Use Pi in EnvHaven

1. Open your workspace in any browser, on a laptop, a tablet or a phone.
2. Tap **Launch**, choose Pi and tap **Sign in**: it starts Pi, which asks you to sign in the first time. For an API key, choose **Set key** instead and paste `ANTHROPIC_API_KEY`, `OPENAI_API_KEY` or `GEMINI_API_KEY`; the workspace keeps it write-only.
3. Start it with one tap: signed in, Pi gets a green dot in the Launch menu and an icon in the workspace's top bar. Support is built in (0.87.1), so there is nothing to install or update.
4. Give it a task. Runs unchanged; it never stops to ask.
5. Close the tab whenever you like. The workspace is an always-on Linux machine, so Pi keeps working, and every device you open it from shows the same session.

Every agent signs in with your own account: EnvHaven never resells tokens or adds a markup.

## Install Pi on another machine

macOS, Linux:

```bash
curl -fsSL https://pi.dev/install.sh | sh
```

npm (Node.js 22.19 or later):

```bash
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
```

## Sign in from the terminal

In a workspace the Launch menu does this for you. On any other machine, or when you would rather type it:

- Type `/login` inside Pi, pick a provider and follow its sign-in or API-key flow; on a remote machine, paste the final redirect URL or code back into Pi.
- Or set a provider key such as `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY` or `OPENROUTER_API_KEY`.

## Run Pi without permission prompts

Load trusted project resources without the startup prompt:

```bash
pi --approve
```

Limit the tools it may use:

```bash
pi --tools read,grep,find,ls
```

Pi never asks before using a tool: it has no approval system to turn off. Its only prompt is project trust at startup, when a folder carries Pi settings, extensions or skills, which `--approve` (load them) or `--no-approve` (skip them) answers for one run.

**In EnvHaven:** Runs unchanged; it never stops to ask. The details, and when full access is safe, are on the [Pi full-access page](https://envhaven.com/yolo/pi).

## Instructions file

Pi reads `AGENTS.md`, `AGENTS.override.md`, `CLAUDE.md`, `~/.pi/agent/AGENTS.md`.

## Add MCP servers

Built-in MCP arrived in Pi 0.99.0; the 0.87.1 build in EnvHaven 1.9.0 extends through packages installed with `pi install <source>` instead.

The [MCP config converter](https://envhaven.com/mcp-config) writes the same server for every agent at once.

## Run it from scripts

```bash
pi -p "<prompt>"
```

Headless runs cannot stop to ask, so they need the full-access setting above.

## Pi away from your desk

Pi keeps working only while the machine it runs on is awake. In EnvHaven that machine is the workspace, which never sleeps: start a task, close the laptop and check on it from a phone.

- [Pi in the browser](https://envhaven.com/agents/pi/browser)
- [Pi on iPhone](https://envhaven.com/agents/pi/iphone)
- [Pi on iPad](https://envhaven.com/agents/pi/ipad)
- [Pi on Android](https://envhaven.com/agents/pi/android)
- [Pi on a Chromebook](https://envhaven.com/agents/pi/chromebook)
- [Pi on Windows](https://envhaven.com/agents/pi/windows)
- [Pi on a VPS](https://envhaven.com/agents/pi/vps)
- [Pi in Docker](https://envhaven.com/agents/pi/docker)
- [Pi on a Raspberry Pi](https://envhaven.com/agents/pi/raspberry-pi)
- [Pi 24/7](https://envhaven.com/agents/pi/24-7)

## Compare Pi

- [Pi vs OpenCode](https://envhaven.com/compare/opencode-vs-pi)
- [Pi vs Claude Code](https://envhaven.com/compare/pi-vs-claude-code)

## When Pi misbehaves

- [Pi: No API key found for the selected model.](https://envhaven.com/errors/pi/no-api-key-found)
- [Is Pi down?](https://envhaven.com/status/pi) Live status of the providers it depends on.

## Keep reading

- [Pi full-access mode](https://envhaven.com/yolo/pi)
- [Pi in the browser](https://envhaven.com/agents/pi/browser)
- [Pi on iPhone](https://envhaven.com/agents/pi/iphone)
- [Pi on iPad](https://envhaven.com/agents/pi/ipad)
- [Pi vs OpenCode](https://envhaven.com/compare/opencode-vs-pi)
- [Pi vs Claude Code](https://envhaven.com/compare/pi-vs-claude-code)

Source: https://envhaven.com/agents/pi
