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.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.
Install Pi
Install Pi with the one-line installer:Or install via npm:After installation, run
pi --version to confirm it’s available.Authenticate
Pi supports subscription providers (via OAuth) and API key providers. Choose the option that matches your setup.See Providers and models for all supported providers, environment variables, and cloud-provider setup (Azure, Bedrock, Vertex AI).
- API key
- Subscription login
Set your API key as an environment variable before launching 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.
Basic usage
Interactive mode
Just runpi in your project directory:
Non-interactive (print) mode
For one-shot prompts without opening the interactive TUI: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:
Continue a session
Sessions are saved automatically to~/.pi/agent/sessions/:
Platform notes
Pi works on Linux and macOS. For platform-specific setup:- Windows — Windows setup guide
- Android (Termux) — Termux setup guide
- tmux — tmux integration guide
- Terminal setup — Terminal configuration guide (key bindings, font, color support)
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