26 References
26.1 Official Resources
26.1.1 Website
- Pi Homepage: https://pi.dev
- Documentation: https://pi.dev/docs/latest
- News: https://pi.dev/news
- Packages: https://pi.dev/packages
- Models: https://pi.dev/models
26.1.2 Installation
- npm package:
@earendil-works/pi-coding-agent - curl installer: https://pi.dev/install.sh
# npm
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
# curl
curl -fsSL https://pi.dev/install.sh | sh26.1.3 Source Code
- Repository: github.com/earendil-works/pi-mono
- License: MIT
- Issues: github.com/earendil-works/pi-mono/issues
26.1.4 Community
- Discord: Pi Discord server
- X (Twitter): @pi_dev
26.2 Developer Resources
26.2.1 SDK
- Package:
@earendil-works/pi-coding-agent - Core Types:
ExtensionAPI,ExtensionContext,AgentSession,Runtime - AI Utilities:
@earendil-works/pi-ai - TUI Components:
@earendil-works/pi-tui
26.2.2 Extension Development
26.2.3 Key Examples in the Repository
| Example | Description |
|---|---|
examples/extensions/gondolin/ |
Micro-VM tool isolation |
examples/extensions/snake.ts |
Game while waiting for model response |
examples/extensions/summarize.ts |
Custom conversation summaries |
examples/extensions/permission-gate.ts |
Confirm before dangerous commands |
examples/extensions/git-checkpoint.ts |
Auto-stash at each turn |
examples/extensions/path-protection.ts |
Block writes to sensitive paths |
26.2.4 Agent Skills Standard
Pi implements the Agent Skills standard for cross-harness compatibility:
- Skills use
SKILL.mdas the entry point - Progressive disclosure pattern (summary → details → scripts)
- YAML frontmatter for metadata
- Standard directory structure
26.2.5 Session Format
- Format: JSONL (JSON Lines)
- Version: 1
- Storage:
~/.pi/agent/sessions/<encoded-cwd>/<id>.jsonl - Tree Structure: Parent/child relationships via
id/parentId
26.2.6 Supported Providers
Built-in providers:
| Provider | Auth Method | API |
|---|---|---|
| Anthropic | API key / OAuth | Anthropic Messages |
| OpenAI | API key / OAuth | OpenAI Responses |
| Google Gemini | API key / OAuth | Google Gemini |
| Amazon Bedrock | AWS credentials | Bedrock |
| Azure OpenAI | API key | OpenAI Responses |
| DeepSeek | API key | OpenAI Completions |
| Groq | API key | OpenAI Completions |
| Mistral | API key | OpenAI Completions |
| Cerebras | API key | OpenAI Completions |
| NVIDIA NIM | API key | OpenAI Completions |
| xAI | API key / OAuth | OpenAI Completions |
| OpenRouter | API key / OAuth | OpenAI Completions |
| Cloudflare Workers AI | API key | OpenAI Completions |
| Cloudflare AI Gateway | API key | OpenAI Completions |
| Vercel AI Gateway | API key | OpenAI Completions |
| ZAI | API key | OpenAI Completions |
| Fireworks | API key | OpenAI Completions |
| Together AI | API key | OpenAI Completions |
| Hugging Face | API key | OpenAI Completions |
| Kimi For Coding | API key | OpenAI Completions |
| MiniMax | API key | OpenAI Completions |
| Qwen Token Plan | API key | OpenAI Completions |
| Xiaomi MiMo | API key | OpenAI Completions |
| GitHub Copilot | OAuth | OpenAI Completions |
| Radius | API key / OAuth | OpenAI Completions |
| OpenCode Zen | API key | OpenAI Completions |
| OpenCode Go | API key | OpenAI Completions |
| Ant Ling | API key | OpenAI Completions |
Custom providers via models.json or extensions.
26.2.7 CLI Quick Reference
# Basic usage
pi # Interactive mode
pi -p "prompt" # Print mode
pi --mode json # JSON event stream
pi --mode rpc # RPC mode
# Session management
pi -c # Continue last session
pi -r # Resume a session
pi --session <id> # Open specific session
pi --fork <id> # Fork a session
pi --no-session # Ephemeral mode
# Model selection
pi --model claude-sonnet-4 # Specific model
pi --model anthropic/claude-4 # Provider/model
pi --model claude-4:high # With thinking level
pi --provider anthropic # Specific provider
pi --thinking high # Set thinking level
pi --list-models # List available models
# Tools
pi --tools read,bash # Allowlist tools
pi --exclude-tools write # Disable specific tool
pi --no-tools # Disable all tools
# Resources
pi -e ./extension.ts # Load extension
pi --skill ./my-skill # Load skill
pi --no-context-files # Skip AGENTS.md loading
# Packages
pi install <source> # Install package
pi remove <source> # Remove package
pi update # Update Pi
pi update --all # Update Pi and packages
pi list # List packages
pi config # Configure resources
# Export
pi --export session.jsonl # Export session26.2.8 Interactive Commands
| Command | Description |
|---|---|
/login |
Authenticate with a provider |
/logout |
Clear credentials |
/model |
Switch models |
/settings |
Open settings panel |
/resume |
Resume a previous session |
/new |
Start a new session |
/session |
Show session info |
/tree |
Navigate session tree |
/fork |
Fork from earlier message |
/clone |
Clone current branch |
/compact |
Compact context |
/name <name> |
Set session name |
/export [file] |
Export session |
/share |
Share as GitHub gist |
/reload |
Reload resources |
/llama |
Manage llama.cpp models |
/copy |
Copy last message |
/hotkeys |
Show keybindings |
/changelog |
Show version history |
/quit |
Quit Pi |
26.2.9 Keybindings Quick Reference
| Key | Action |
|---|---|
Enter |
Submit (steering) |
Shift+Enter |
Newline |
Alt+Enter |
Submit (follow-up) |
Escape |
Abort |
Ctrl+C |
Quit (when empty) |
Ctrl+L |
Model selector |
Ctrl+X |
Copy last message |
Ctrl+V |
Paste |
Ctrl+G |
External editor |
Ctrl+P |
Cycle scoped models |
Shift+Tab |
Cycle thinking level |
Tab |
Path completion |
@ |
File reference |
!command |
Run shell command |
!!command |
Run hidden shell command |
26.3 License
Pi is open source software released under the MIT License.
MIT License
Copyright (c) Earendil Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
26.4 Organization
Earendil Inc. is the organization behind Pi.
- GitHub: github.com/earendil-works
- npm scope:
@earendil-works - Website: pi.dev