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 reads settings from JSON files. Global settings apply to all projects; project settings override them for the current directory. Use /settings in interactive mode to modify common options, or edit the JSON files directly.
LocationScope
~/.pi/agent/settings.jsonGlobal (all projects)
.pi/settings.jsonProject (current directory only)

Example

{
  "defaultProvider": "anthropic",
  "defaultModel": "claude-sonnet-4-20250514",
  "defaultThinkingLevel": "medium",
  "theme": "dark",
  "compaction": {
    "enabled": true,
    "reserveTokens": 16384,
    "keepRecentTokens": 20000
  },
  "retry": {
    "enabled": true,
    "maxRetries": 3
  },
  "enabledModels": ["claude-*", "gpt-4o"],
  "warnings": {
    "anthropicExtraUsage": true
  },
  "packages": ["pi-skills"]
}

All settings

Model and thinking

SettingTypeDefaultDescription
defaultProviderstringDefault provider (e.g., "anthropic", "openai")
defaultModelstringDefault model ID
defaultThinkingLevelstring"off", "minimal", "low", "medium", "high", "xhigh"
hideThinkingBlockbooleanfalseHide thinking blocks in output
thinkingBudgetsobjectCustom token budgets per thinking level
Use thinkingBudgets to override default token allocations per level:
{
  "thinkingBudgets": {
    "minimal": 1024,
    "low": 4096,
    "medium": 10240,
    "high": 32768
  }
}

UI and display

SettingTypeDefaultDescription
themestring"dark"Theme name: "dark", "light", or a custom theme
quietStartupbooleanfalseHide the startup header
collapseChangelogbooleanfalseShow a condensed changelog after updates
enableInstallTelemetrybooleantrueSend an anonymous install/update version ping after first install or changelog-detected updates
doubleEscapeActionstring"tree"Action on double-escape: "tree", "fork", or "none"
treeFilterModestring"default"Default filter for /tree: "default", "no-tools", "user-only", "labeled-only", "all"
editorPaddingXnumber0Horizontal padding for the input editor (0–3)
autocompleteMaxVisiblenumber5Max visible items in the autocomplete dropdown (3–20)
showHardwareCursorbooleanfalseShow the terminal cursor
enableInstallTelemetry only controls the anonymous install/update ping to https://pi.dev/api/report-install. Disabling it does not disable update checks. Set PI_SKIP_VERSION_CHECK=1 to skip version checks, or use --offline / PI_OFFLINE=1 to disable all startup network operations.

Warnings

SettingTypeDefaultDescription
warnings.anthropicExtraUsagebooleantrueShow a warning when Anthropic subscription auth may use paid extra usage
{
  "warnings": {
    "anthropicExtraUsage": false
  }
}

Compaction

SettingTypeDefaultDescription
compaction.enabledbooleantrueEnable auto-compaction
compaction.reserveTokensnumber16384Tokens reserved for the LLM response
compaction.keepRecentTokensnumber20000Recent tokens to keep (not summarized)
See sessions for a full explanation of how compaction works.

Branch summary

SettingTypeDefaultDescription
branchSummary.reserveTokensnumber16384Tokens reserved for branch summarization
branchSummary.skipPromptbooleanfalseSkip the “Summarize branch?” prompt on /tree navigation (defaults to no summary)

Retry

SettingTypeDefaultDescription
retry.enabledbooleantrueEnable automatic agent-level retry on transient errors
retry.maxRetriesnumber3Maximum agent-level retry attempts
retry.baseDelayMsnumber2000Base delay for exponential backoff (2s, 4s, 8s)
retry.provider.timeoutMsnumberSDK defaultProvider/SDK request timeout in milliseconds
retry.provider.maxRetriesnumberSDK defaultProvider/SDK retry attempts
retry.provider.maxRetryDelayMsnumber60000Max server-requested retry delay before failing (60s)
When a provider requests a retry delay longer than retry.provider.maxRetryDelayMs (for example, Google’s “quota resets after 5h”), the request fails immediately with an informative error. Set to 0 to disable the cap.
{
  "retry": {
    "enabled": true,
    "maxRetries": 3,
    "baseDelayMs": 2000,
    "provider": {
      "timeoutMs": 3600000,
      "maxRetries": 0,
      "maxRetryDelayMs": 60000
    }
  }
}

Message delivery

SettingTypeDefaultDescription
steeringModestring"one-at-a-time"How steering messages are delivered: "all" or "one-at-a-time"
followUpModestring"one-at-a-time"How follow-up messages are delivered: "all" or "one-at-a-time"
transportstring"sse"Preferred transport for providers that support multiple transports: "sse", "websocket", or "auto"

Terminal and images

SettingTypeDefaultDescription
terminal.showImagesbooleantrueShow images in the terminal (if supported)
terminal.imageWidthCellsnumber60Preferred inline image width in terminal cells
terminal.clearOnShrinkbooleanfalseClear empty rows when content shrinks (can cause flicker)
images.autoResizebooleantrueResize images to 2000×2000 max before sending
images.blockImagesbooleanfalseBlock all images from being sent to the LLM

Shell

SettingTypeDefaultDescription
shellPathstringCustom shell path (e.g., for Cygwin on Windows)
shellCommandPrefixstringPrefix prepended to every bash command (e.g., "shopt -s expand_aliases")
npmCommandstring[]Command argv for npm package operations (e.g., ["mise", "exec", "node@20", "--", "npm"])
{
  "npmCommand": ["mise", "exec", "node@20", "--", "npm"]
}
npmCommand affects all npm operations including installs, uninstalls, and dependency installs inside git packages. When configured, git package dependency installs use plain install to avoid npm-specific flags.

Sessions

SettingTypeDefaultDescription
sessionDirstringDirectory where session files are stored; accepts absolute paths, relative paths, or ~
{ "sessionDir": ".pi/sessions" }
Precedence for session directory: --session-dir flag > PI_CODING_AGENT_SESSION_DIR env var > sessionDir in settings.

Model cycling

SettingTypeDefaultDescription
enabledModelsstring[]Model patterns for Ctrl+P cycling (same format as --models CLI flag)
{
  "enabledModels": ["claude-*", "gpt-4o", "gemini-2*"]
}

Markdown

SettingTypeDefaultDescription
markdown.codeBlockIndentstring" "Indentation for code blocks

Resources

These settings control where Pi loads extensions, skills, prompts, and themes from. Paths in ~/.pi/agent/settings.json resolve relative to ~/.pi/agent. Paths in .pi/settings.json resolve relative to .pi. Absolute paths and ~ are supported.
SettingTypeDefaultDescription
packagesarray[]npm or git packages to load resources from
extensionsstring[][]Local extension file paths or directories
skillsstring[][]Local skill file paths or directories
promptsstring[][]Local prompt template paths or directories
themesstring[][]Local theme file paths or directories
enableSkillCommandsbooleantrueRegister skills as /skill:name commands
Arrays support glob patterns and exclusions. Use !pattern to exclude, +path to force-include, and -path to force-exclude. Load a package with string form (loads all resources) or object form (filters specific resources):
{
  "packages": [
    "pi-skills",
    {
      "source": "pi-skills",
      "skills": ["brave-search", "transcribe"],
      "extensions": []
    }
  ]
}

Project overrides

Project settings (.pi/settings.json) override global settings. Nested objects are merged — you only need to specify the keys you want to change:
// ~/.pi/agent/settings.json (global)
{
  "theme": "dark",
  "compaction": { "enabled": true, "reserveTokens": 16384 }
}

// .pi/settings.json (project)
{
  "compaction": { "reserveTokens": 8192 }
}

// Result
{
  "theme": "dark",
  "compaction": { "enabled": true, "reserveTokens": 8192 }
}

Build docs developers (and LLMs) love