Skip to main content

Requirements

Node.js

Version 20.0.0 or later requiredCheck version: node --version

Bash Shell

Required for executing bash tool commandsBuilt-in on macOS/Linux. Git Bash on Windows.

Install Pi

Install Pi globally to use the pi command anywhere:
Verify installation:

Platform-Specific Setup

Pi works out of the box on macOS with Node.js 20+ installed.Install Node.js:
Install Pi:
For clipboard support with images, the @mariozechner/clipboard optional dependency is automatically installed.
Pi requires Node.js 20+ and a bash shell (usually pre-installed).Install Node.js:
Install Pi:
Pi requires a bash shell on Windows. The easiest option is Git Bash from Git for Windows.
1

Install Git for Windows

Download and install from git-scm.comThis includes Git Bash at C:\Program Files\Git\bin\bash.exe
2

Install Node.js

Download and install from nodejs.orgVerify installation in Git Bash:
3

Install Pi

In Git Bash or PowerShell:
Custom Shell Path:If you use Cygwin, MSYS2, or WSL, specify the bash path in ~/.pi/agent/settings.json:
Windows Terminal Note:In Windows Terminal, use Ctrl+Enter for multi-line input instead of Shift+Enter.
See the Windows setup guide for more details.
Pi runs on Android through Termux, a Linux terminal emulator.
1

Install Termux

Download from GitHub or F-Droid (NOT Google Play)
2

Install Termux:API

Install Termux:API for clipboard support
3

Install dependencies

4

Install Pi

Termux Limitations:
  • No image clipboard (text only)
  • Some native dependencies unavailable on ARM64
  • Storage access requires termux-setup-storage
See the Termux setup guide for a complete AGENTS.md example.

API Key Setup

API Key Providers

Most providers use API keys set via environment variables:
All Supported API Key Providers:

Making API Keys Permanent

Add to your shell configuration file:
Add to ~/.bashrc:

Using Auth File

Store credentials in ~/.pi/agent/auth.json instead of environment variables:
The auth file is created with 0600 permissions (user read/write only). Advanced: Key Resolution The key field supports three formats:

Cloud Provider Setup

Azure OpenAI uses the Responses API. Set these environment variables:
Then run:
Bedrock supports multiple authentication methods:Option 1: AWS Profile
Option 2: IAM Keys
Option 3: Bearer Token
Optional region (defaults to us-east-1):
Using Bedrock:
Bedrock Proxy Configuration:If connecting through a proxy:
Vertex AI uses Application Default Credentials (ADC):Local Development:
Production/CI:
Using Vertex:

OAuth Provider Setup

Several providers require OAuth authentication for subscription-based access:
1

Launch Pi

2

Start login

Select your provider:
  • Claude Pro/Max - Anthropic subscription
  • ChatGPT Plus/Pro - OpenAI Codex models
  • GitHub Copilot - Copilot subscription
  • Google Gemini CLI - Free or paid Cloud Code Assist
  • Google Antigravity - Free Gemini 3, Claude, GPT-OSS
3

Complete authentication

Follow the browser prompts. Credentials save to ~/.pi/agent/auth.json and auto-refresh.
Provider-Specific Notes:
  • Press Enter for github.com, or enter your GitHub Enterprise Server domain
  • If you get “model not supported”, enable it in VS Code:
    1. Open Copilot Chat
    2. Click model selector
    3. Select the model (warning icon)
    4. Click “Enable”
Gemini CLI:
  • Standard Gemini models via Cloud Code Assist
  • Free tier or paid subscription
  • For paid: set GOOGLE_CLOUD_PROJECT env var
Antigravity:
  • Free sandbox with Gemini 3, Claude, GPT-OSS
  • Any Google account, subject to rate limits
  • Requires ChatGPT Plus or Pro subscription
  • Access to GPT-5.x Codex models with extended context
  • Personal use only; for production, use OpenAI Platform API

Custom Providers

Use any OpenAI-compatible API (Ollama, vLLM, LM Studio) via models.json:Create ~/.pi/agent/models.json:
Use the model:

Environment Variables

Pi supports several environment variables for configuration:

Configuration Directories

Pi uses these directories:
Project-local configuration:

Verify Installation

Test your installation:

Next Steps

Interactive Mode

Learn the terminal UI, commands, and keyboard shortcuts

Providers & Models

Detailed provider setup and model selection

Settings

Configure thinking levels, themes, and behavior

Customization

Extend Pi with skills, extensions, and packages

Troubleshooting

If you get permission errors during global install:Option 1: Use nvm (recommended)
Option 2: Change npm’s default directory
If you see module errors after installation:
Pi requires bash on Windows. Install Git for Windows:
  1. Download from git-scm.com
  2. Install with default options
  3. Restart your terminal
  4. Run pi again
For other bash environments (Cygwin, MSYS2, WSL), set shellPath in ~/.pi/agent/settings.json.
For more help, visit the Discord community or check GitHub issues.