v0.3.0 — Now available

Pi Coding Agent

A minimal terminal coding harness.
Adapt Pi to your workflow, not the other way around.

Get Started
curl -fsSL https://pi.dev/install.sh | sh

Scroll to continue

Make it yours

Pi is a minimal terminal coding harness. Adapt Pi to your workflows, not the other way around. Customize Pi with extensions, skills, prompt templates, and themes. Bundle them as Pi packages and share via npm or git.

Pi ships with powerful defaults but skips features like sub-agents and plan mode. Ask Pi to build what you want, or install a package that does it your way.

Four modes: interactive, print/JSON, RPC, and SDK.

Change the harness, not your workflow

Pi isn't a sealed product. If you need a command, tool, provider, workflow, or UI tweak, just ask Pi to build it. It will customize itself on the fly.

Extensions & Skills

Build or install extensions — TypeScript modules with access to tools, commands, keyboard shortcuts, events, and the full TUI.

15+ Providers

Anthropic, OpenAI, Google, Azure, Bedrock, Mistral, Groq, Cerebras, xAI, Hugging Face, and more. Switch mid-session with /model.

Tree History

Sessions stored as trees. Navigate with /tree, branch from any point, label bookmarks, export to HTML, share via gist.

Context Engineering

AGENTS.md, SYSTEM.md, compaction, skills, prompt templates, and dynamic context via extensions. Full control over the context window.

Interactive. Print. RPC. SDK.

Pi operates in four distinct modes. Pick the one that fits your workflow — from a full TUI experience to embedding Pi directly in your apps.

01

Interactive

The full TUI experience. Navigate history with /tree, switch models with /model, steer and queue follow-ups.

02

Print / JSON

Use pi -p "query" for scripts and pipelines. Pass --mode json for structured event streams.

03

RPC

JSON protocol over stdin/stdout for non-Node integrations. Automate Pi from any language or toolchain.

04

SDK

Embed Pi in your applications. Full programmatic control over agent lifecycle, streaming, and results.

Steer or follow up

Submit messages while the agent works. Enter sends a steering message delivered after the current tool call, interrupting remaining tools. Alt+Enter queues a follow-up that waits until the agent finishes.

You control what goes in

Pi's minimal system prompt and extensibility let you do actual context engineering. Control what goes into the context window and how it's managed.

AGENTS.md

Project instructions loaded at startup from ~/.pi/agent/, parent directories, and the current directory.

SYSTEM.md

Replace or append to the default system prompt per-project.

Compaction

Auto-summarizes older messages when approaching the context limit. Fully customizable via extensions.

Skills

Capability packages with instructions and tools, loaded on-demand. Progressive disclosure without busting the prompt cache.

Prompt Templates

Reusable prompts as Markdown files. Type /name to expand.

Dynamic Context

Extensions can inject messages before each turn, filter message history, implement RAG, or build long-term memory.

What we didn't build (so you can)

Pi is aggressively extensible so it doesn't have to dictate your workflow. Features that other tools bake in can be built with extensions, skills, or installed from third-party Pi packages.

No MCP

Build CLI tools with READMEs (see Skills), or build an extension that adds MCP support.

No sub-agents

Spawn Pi instances via tmux, or build your own with extensions, or install a package that does it your way.

No permission popups

Run in a container, or build your own confirmation flow with extensions in line with your environment.

No plan mode

Write plans to files, or build it with extensions, or install a package.

No built-in to-dos

Use a TODO.md file, or build your own with extensions.

No background bash

Use tmux. Full observability, direct interaction.

Install Pi in one command

curl -fsSL https://pi.dev/install.sh | sh
powershell -c "irm https://pi.dev/install.ps1 | iex"
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
pnpm add -g --ignore-scripts @earendil-works/pi-coding-agent
bun add -g --ignore-scripts @earendil-works/pi-coding-agent

Get involved with Pi

GitHub

Report bugs, request features, and contribute to the source.

Discord

Join the community for discussion, sharing, and support.

Docs

Read the full documentation or browse the source on GitHub.