PiG Documentation

Guides and references for configuring, using, and extending PiG.

Settings

PiG reads settings from ~/.pig/agent/settings.json. The file is optional. Every key is optional, and a key you leave out keeps its default.

Set PIG_HOME to move the whole configuration root. Set PIG_CODING_AGENT_DIR to move only this directory.

{
  "defaultModel": "claude-sonnet-4",
  "theme": "dark",
  "compaction": { "enabled": true }
}

Use /settings to change a setting from inside a session. PiG writes the file for you and applies the change without a restart.

Where PiG reads settings

PiG merges two files. A key set in the project file overrides the same key in the global file.

Scope
Path
global~/.pig/agent/settings.json
project<project>/.pig/settings.json

PiG reads the project file only after you trust the project. An untrusted project contributes nothing, so cloning a repository cannot change your shell, your model or your packages before you agree to it. See Security.

An empty default column means PiG has no value for the key until you set one, or the value depends on what it detects.

Models and providers

Key
Type
Default
Meaning
defaultProviderstringProvider used when none is chosen.
defaultModelstringModel used when none is chosen.
defaultThinkingLevelstringThinking level applied to a new session.
modelThinkingLevelsobjectThinking level for a new session per model, keyed by provider/modelId. It overrides defaultThinkingLevel.
enabledModelsstring[]allModels offered in the model selector.
thinkingBudgetsobjectToken budget per thinking level: minimal, low, medium, high.
transportstringHTTP transport used for provider calls.
retryobjectRetry policy: enabled, maxRetries, baseDelayMs, maxAgentDelayMs (the cap on each retry delay, default 60000), and a per-provider override. An explicit 0 is kept.
httpIdleTimeoutMsnumber300000Idle timeout for provider requests, in milliseconds. 0 or "disabled" turns it off.

Session behavior

Key
Type
Default
Meaning
compactionobjectAutomatic compaction: enabled, reserveTokens, keepRecentTokens, and modelOverrides (per-model reserveTokens and keepRecentTokens keyed by exact provider/modelId).
branchSummaryobjectSummary written when a session branches.
defaultToolsstring[]read, bash, edit, writeBuilt-in tools active in a new session.
steeringModestringone-at-a-timeHow queued steering messages are dispatched.
followUpModestringone-at-a-timeHow queued follow-up messages are dispatched.
sessionDirstringDirectory that holds session files.
defaultProjectTruststringTrust decision applied to a project that has none.

Interface

Key
Type
Default
Meaning
themestringActive theme name.
tuiModestringregularregular or fullscreen.
fullscreenScrollbarstringScrollbar behavior in fullscreen mode.
hideThinkingBlockbooleanfalseHide thinking blocks in the transcript.
doubleEscapeActionstringtreeAction bound to pressing escape twice.
treeFilterModestringdefaultFilter /tree opens with.
editorPaddingXnumberHorizontal padding inside the editor.
outputPadnumberPadding around tool output.
autocompleteMaxVisiblenumberRows shown in the autocomplete list.
showHardwareCursorbooleanfalseShow the terminal's own cursor.
markdownobjectMarkdown rendering: codeBlockIndent, mermaid.
quietStartupbooleanfalseSuppress the startup banner.
collapseChangelogbooleanfalseShow a condensed changelog.
lastChangelogVersionstringLast changelog version shown. PiG writes this.

Images and terminal

Key
Type
Default
Meaning
showImagesbooleanRender images when the terminal accepts them.
imageWidthCellsnumberWidth of a rendered image, in terminal cells.
imageAutoResizebooleanResize an image to fit the width.
blockImagesbooleanRefuse images entirely.
imagesobjectImage settings group. The individual keys above override it.
terminalobjectTerminal capability overrides.
clearOnShrinkbooleanfalseRepaint the screen when content shrinks.

Resources

Key
Type
Default
Meaning
packagesobject[]Packages to load. See packages.
extensionsstring[]Extension paths to load. See extensions.
skillsstring[]Skill paths to load. See skills.
promptsstring[]Prompt paths to load.
themesstring[]Theme paths to load.
enableSkillCommandsbooleantrueOffer skills as slash commands.

Shell and tools

Key
Type
Default
Meaning
shellPathstringShell used by the bash tool.
shellCommandPrefixstringPrefix applied to every shell command.
commandPrefixstringFormer name of shellCommandPrefix. PiG still reads it.
externalEditorstringEditor opened by app.editor.external.
npmCommandstring[]Command used to run npm.

Notices

Key
Type
Default
Meaning
warningsobjectWhich warnings are shown.
showCacheMissNoticesbooleanReport a prompt cache miss.
enableInstallTelemetrybooleantrueGate for the anonymous install/update ping and the pig-branded OpenRouter, NVIDIA, and Cloudflare attribution headers. The ping is not active yet: PiG has no endpoint to send it to. Override with PI_TELEMETRY.
enableAnalyticsbooleanfalseOpt in to analytics data sharing. PiG stores the choice; nothing sends data.
trackingIdstringAnalytics tracking identifier. PiG writes this on the first opt-in and keeps it when you toggle enableAnalytics. Bug reports omit it.
Adapted from upstream Pi documentation · Upstream documentation ↗ · MIT License