Pi uses JSON settings files with project settings overriding global settings. Edit directly or useDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/badlogic/pi-mono/llms.txt
Use this file to discover all available pages before exploring further.
/settings for common options.
Settings Files
- Global Settings
- Project Settings
Location:
~/.pi/agent/settings.jsonApplies to all projects and sessions.Merging Behavior
Project settings override global settings. Nested objects are merged:Model & Thinking
Default provider (e.g.,
"anthropic", "openai")Default model ID
Default thinking level:
"off", "minimal", "low", "medium", "high", "xhigh"Hide thinking blocks in output
Custom token budgets per thinking level
UI & Display
Theme name (
"dark", "light", or custom theme)Hide startup header
Show condensed changelog after updates
Action for double-escape:
"tree", "fork", or "none"Horizontal padding for input editor (0-3)
Max visible items in autocomplete dropdown (3-20)
Show terminal hardware cursor
Compaction
Enable automatic compaction
Tokens reserved for LLM response
Recent tokens to keep (not summarized)
Branch Summary
Tokens reserved for branch summarization when switching branches via
/treeRetry
Enable automatic retry on transient errors
Maximum retry attempts
Base delay for exponential backoff (2s, 4s, 8s)
Max server-requested delay before failing (60s)When a provider requests a retry delay longer than this (e.g., “quota resets in 5 hours”), the request fails immediately with an informative error. Set to
0 to disable the cap.Message Delivery
How steering messages are sent:
"all" or "one-at-a-time"How follow-up messages are sent:
"all" or "one-at-a-time"Preferred transport:
"sse", "websocket", or "auto"For providers that support multiple transports.Terminal & Images
Show images in terminal (if supported)
Clear empty rows when content shrinks (can cause flicker)
Resize images to 2000x2000 max before sending
Block all images from being sent to LLM
Shell
Custom shell path (e.g., for Cygwin on Windows)
Prefix for every bash command (e.g.,
"shopt -s expand_aliases")Useful for loading shell configuration:Model Cycling
Model patterns for Ctrl+P cycling (same format as Use wildcards to match multiple models. Ctrl+P cycles through matched models.
--models CLI flag)Markdown
Indentation for code blocks (default: two spaces)
Resources
These settings define where to load extensions, skills, prompts, and themes.Path Resolution
- Paths in
~/.pi/agent/settings.jsonresolve relative to~/.pi/agent - Paths in
.pi/settings.jsonresolve relative to.pi - Absolute paths and
~are supported
Packages
npm/git packages to load resources fromString form (loads all resources):Object form (filters resources):
Extensions
Local extension file paths or directories
Skills
Local skill file paths or directories
Register skills as
/skill:name commandsPrompts
Local prompt template paths or directories
Themes
Local theme file paths or directories
Glob Patterns
Arrays support glob patterns and exclusions:pattern- Glob match!pattern- Exclude matches+path- Force-include exact path-path- Force-exclude exact path
Complete Example
$schema field enables editor auto-completion and validation.
Interactive Settings
Use/settings to modify common options in interactive mode:
- Change thinking level
- Switch themes
- Configure message delivery
- Set transport preference
- Toggle compaction
- And more…
Keybindings
Customize keyboard shortcuts via~/.pi/agent/keybindings.json:
interrupt,clear,exit,suspendcycleThinkingLevelcycleModelForward,cycleModelBackward,selectModelexpandTools,toggleThinkingexternalEditorfollowUp,dequeuepasteImagenewSession,tree,fork,resume
- Standard text editing actions (see
packages/tuidocumentation)
packages/coding-agent/src/core/keybindings.ts.
Environment Variables
| Variable | Description |
|---|---|
PI_CODING_AGENT_DIR | Override config directory (default: ~/.pi/agent) |
PI_PACKAGE_DIR | Override package directory |
PI_SKIP_VERSION_CHECK | Skip version check at startup |
PI_CACHE_RETENTION | Set to long for extended prompt cache (Anthropic: 1h, OpenAI: 24h) |
VISUAL, EDITOR | External editor for Ctrl+G |
Next Steps
Extensions
Build TypeScript extensions
Skills
Create Agent Skills
Prompt Templates
Make reusable prompts
Themes
Customize colors
Pi Packages
Share via npm/git
CLI Reference
All CLI flags