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 terminal coding agent that reads files, runs shell commands, and edits code on your behalf. This page walks you through installation, authentication, and your first session.
1

Install Pi

Install Pi with the one-line installer:
curl -fsSL https://pi.dev/install.sh | sh
Or install via npm:
npm install -g @earendil-works/pi-coding-agent
After installation, run pi --version to confirm it’s available.
2

Authenticate

Pi supports subscription providers (via OAuth) and API key providers. Choose the option that matches your setup.
Set your API key as an environment variable before launching Pi:
export ANTHROPIC_API_KEY=sk-ant-...
pi
Pi will automatically detect the key and use Anthropic as the provider. Any of the supported providers can be used the same way — set the corresponding environment variable and launch Pi.
See Providers and models for all supported providers, environment variables, and cloud-provider setup (Azure, Bedrock, Vertex AI).
3

Run your first prompt

Navigate to the project you want to work on and start Pi:
cd /path/to/project
pi
Type a request and press Enter:
Summarize this repository and tell me how to run its checks.
Pi gives the model four tools by default — read, write, edit, and bash — and uses them to fulfill your request.

Basic usage

Interactive mode

Just run pi in your project directory:
pi
Type a message and press Enter. Use Shift+Enter (or Ctrl+Enter on Windows Terminal) for multi-line input.

Non-interactive (print) mode

For one-shot prompts without opening the interactive TUI:
pi -p "Summarize this codebase"
Pipe content from other commands:
cat README.md | pi -p "Summarize this text"
Pass files directly on the command line:
pi @src/app.ts @src/app.test.ts "Review these files together"

Switch models

Use /model or Ctrl+L to open the model selector. Use Shift+Tab to cycle the thinking level. Use Ctrl+P and Shift+Ctrl+P to cycle through your scoped model list. To start with a specific model:
pi --model claude-sonnet-4
pi --model openai/gpt-4o

Continue a session

Sessions are saved automatically to ~/.pi/agent/sessions/:
pi -c                    # Continue the most recent session
pi -r                    # Browse and select from past sessions
pi --session <path|id>   # Open a specific session by file path or partial UUID

Platform notes

Pi works on Linux and macOS. For platform-specific setup:
On Windows Terminal, Alt+Enter triggers fullscreen by default. Remap it using the terminal setup guide so Pi can receive the follow-up message shortcut.

Next steps

Providers and models

Set up API keys, OAuth, Azure, Bedrock, Vertex AI, and custom providers

Interactive mode

Learn commands, keyboard shortcuts, and the message queue

Sessions

Branch, fork, and navigate your conversation history

Extensions

Extend Pi with custom tools, commands, and UI components

Build docs developers (and LLMs) love