Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/earendil-works/pi/llms.txt

Use this file to discover all available pages before exploring further.

Pi is a minimal terminal coding agent. Instead of baking in opinionated features, Pi gives you a powerful core and a rich extension system — so you shape it to fit how you work, not the other way around.

Quickstart

Install Pi and run your first coding session in under a minute

Providers & Models

Connect to Anthropic, OpenAI, Google, Bedrock, and 20+ more providers

Interactive Mode

Learn the TUI interface, commands, keyboard shortcuts, and message queue

Extensions

Build custom tools, commands, UI components, and event handlers in TypeScript

SDK

Embed Pi’s agent capabilities directly in your own Node.js application

pi-ai Library

Unified multi-provider LLM API with streaming, tool calling, and OAuth

What is Pi?

Pi runs as an interactive TUI coding agent — you type, the model reads your codebase, calls tools, and produces results. It ships with four built-in tools (read, write, edit, bash) and four run modes:
  • Interactive — Full TUI with session history, branching, and model cycling
  • Print — Non-interactive: send a prompt, get a response, exit
  • JSON — Stream all events as newline-delimited JSON
  • RPC — JSON-RPC over stdin/stdout for subprocess integration
1

Install Pi

curl -fsSL https://pi.dev/install.sh | sh
Or with npm: npm install -g @earendil-works/pi-coding-agent
2

Set an API key

export ANTHROPIC_API_KEY=sk-ant-...
Or authenticate interactively with /login after launch.
3

Start coding

pi
Then describe what you want — Pi reads files, runs commands, and edits code.

The Pi ecosystem

Pi is a monorepo. The pi CLI is built on top of three libraries you can use independently:

pi-ai

Unified LLM API across 20+ providers with streaming, tool calling, thinking/reasoning, and OAuth

pi-agent-core

Stateful agent runtime with tool execution, event streaming, and parallel tool calling

pi-coding-agent SDK

Full SDK for embedding the coding agent in your own app, with session management and extension support

Philosophy

Pi is aggressively minimal by design. Features like sub-agents, plan mode, MCP, and permission popups are deliberately absent from the core — you build them via extensions or install a community pi package. This keeps Pi fast, auditable, and adaptable to your exact workflow.

Build docs developers (and LLMs) love