@kingingwang/pi-windows-arm64 0.87.0 → 0.99.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/CHANGELOG.md +121 -0
- package/bin/README.md +25 -711
- package/bin/docs/cli-integration.md +106 -0
- package/bin/docs/cli.md +329 -0
- package/bin/docs/compaction.md +22 -22
- package/bin/docs/configuration.md +47 -0
- package/bin/docs/containerization.md +109 -82
- package/bin/docs/custom-provider.md +109 -722
- package/bin/docs/docs.json +147 -99
- package/bin/docs/environment-variables.md +3 -5
- package/bin/docs/extensions.md +165 -2996
- package/bin/docs/how-pi-works.md +49 -0
- package/bin/docs/images/interactive-mode.png +0 -0
- package/bin/docs/index.md +24 -69
- package/bin/docs/json.md +193 -65
- package/bin/docs/keybindings.md +58 -103
- package/bin/docs/llama-cpp.md +16 -3
- package/bin/docs/mcp.md +188 -0
- package/bin/docs/message-types.md +261 -0
- package/bin/docs/models.md +81 -556
- package/bin/docs/packages.md +67 -166
- package/bin/docs/prompt-templates.md +31 -68
- package/bin/docs/providers.md +103 -240
- package/bin/docs/quickstart.md +61 -106
- package/bin/docs/rpc-commands.md +860 -0
- package/bin/docs/rpc-extension-ui.md +200 -0
- package/bin/docs/rpc.md +130 -1555
- package/bin/docs/sdk.md +79 -1169
- package/bin/docs/security.md +72 -32
- package/bin/docs/session-format.md +15 -215
- package/bin/docs/sessions.md +35 -141
- package/bin/docs/settings.md +117 -377
- package/bin/docs/shell-aliases.md +85 -5
- package/bin/docs/skills.md +51 -190
- package/bin/docs/slash-commands.md +60 -0
- package/bin/docs/terminal-setup.md +105 -78
- package/bin/docs/termux.md +74 -83
- package/bin/docs/themes.md +88 -274
- package/bin/docs/tmux.md +31 -39
- package/bin/docs/tui.md +74 -910
- package/bin/docs/usage.md +54 -272
- package/bin/docs/virtual-models.md +114 -0
- package/bin/docs/windows.md +45 -17
- package/bin/examples/README.md +13 -2
- package/bin/examples/extensions/README.md +2 -0
- package/bin/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/bin/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/bin/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/bin/examples/extensions/custom-provider-gitlab-duo/test.ts +5 -5
- package/bin/examples/extensions/debug-provider.ts +90 -0
- package/bin/examples/extensions/gondolin/package-lock.json +2 -2
- package/bin/examples/extensions/gondolin/package.json +1 -1
- package/bin/examples/extensions/jev-router.ts +113 -0
- package/bin/examples/extensions/sandbox/package-lock.json +2 -2
- package/bin/examples/extensions/sandbox/package.json +1 -1
- package/bin/examples/extensions/with-deps/package-lock.json +2 -2
- package/bin/examples/extensions/with-deps/package.json +1 -1
- package/bin/examples/rpc-client.ts +35 -0
- package/bin/examples/rpc-extension-ui.ts +26 -6
- package/bin/examples/sdk/14-codemode-mcp.ts +61 -0
- package/bin/examples/sdk/README.md +3 -2
- package/bin/export-html/ansi-to-html.d.ts.map +1 -1
- package/bin/export-html/ansi-to-html.js.map +1 -1
- package/bin/export-html/index.d.ts.map +1 -1
- package/bin/export-html/index.js.map +1 -1
- package/bin/export-html/template.css +10 -0
- package/bin/export-html/template.js +66 -17
- package/bin/export-html/tool-renderer.d.ts.map +1 -1
- package/bin/export-html/tool-renderer.js.map +1 -1
- package/bin/package.json +14 -12
- package/bin/pi.exe +2 -2
- package/bin/theme/dark.json +59 -72
- package/bin/theme/light.json +57 -69
- package/bin/theme/theme-schema.json +7 -2
- package/package.json +1 -1
- package/bin/docs/development.md +0 -90
package/bin/docs/settings.md
CHANGED
|
@@ -1,431 +1,171 @@
|
|
|
1
|
-
# Settings
|
|
1
|
+
# Settings Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This reference lists user-configurable settings, their types, defaults, and purposes. Project settings override agent-directory settings. Resource lists are combined. See [Configuration](configuration.md) for file locations and trust behavior.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|----------|-------|
|
|
7
|
-
| `~/.pi/agent/settings.json` | Global (all projects) |
|
|
8
|
-
| `.pi/settings.json` | Project (current directory) |
|
|
5
|
+
## Model and thinking
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Project Trust
|
|
13
|
-
|
|
14
|
-
On interactive startup, pi asks before trusting a project folder that contains project-local settings, resources, or project `.agents/skills` and has no saved decision for the folder or a parent folder in `~/.pi/agent/trust.json`. Trusting a project allows pi to load `.pi/settings.json` and `.pi` resources, install missing project packages, and execute project extensions.
|
|
15
|
-
|
|
16
|
-
Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, they use `defaultProjectTrust` from global settings: `ask` (default) and `never` ignore those project resources, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
|
|
17
|
-
|
|
18
|
-
If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.pi/agent/settings.json`, or change it with `/settings`.
|
|
19
|
-
|
|
20
|
-
`pi config` and package commands use the same project trust flow, except `pi update` never prompts. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
|
|
21
|
-
|
|
22
|
-
Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.pi/agent/trust.json` only; the current session is not reloaded, so restart pi for changes to take effect.
|
|
23
|
-
|
|
24
|
-
## All Settings
|
|
25
|
-
|
|
26
|
-
### Model & Thinking
|
|
7
|
+
<a id="model-cycling"></a>
|
|
27
8
|
|
|
28
9
|
| Setting | Type | Default | Description |
|
|
29
|
-
|
|
30
|
-
| `defaultProvider` | string |
|
|
31
|
-
| `defaultModel` | string |
|
|
32
|
-
| `defaultThinkingLevel` |
|
|
33
|
-
| `modelThinkingLevels` | object |
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
|
|
39
|
-
#### Cache Warming
|
|
40
|
-
|
|
41
|
-
Providers drop a prompt cache entry after a period of inactivity, so the first request after a pause pays full input price again. Cache warming re-sends the last request with a one-token output budget shortly before expiry:
|
|
42
|
-
|
|
43
|
-
- `"off"` disables warming.
|
|
44
|
-
- `"streaming"` protects expensive prefixes during long tool executions and stops as soon as the agent settles.
|
|
45
|
-
- `"idle"` also considers refreshes while waiting for your next prompt, using a fixed 15% continuation probability measured from real usage.
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"cacheWarming": "idle"
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
A refresh is sent only when the expected avoided cache-miss cost, minus the cost of the refresh, leaves at least $0.05 of expected savings. Active agent runs use 100% continuation probability. `/session` shows the next decision, continuation probability, expected savings, threshold, and estimated costs. When cache miss notices are enabled, each successful refresh appears in the transcript with its cost; notices identify extension overrides.
|
|
54
|
-
|
|
55
|
-
Warming stops when the context changes (model switch, compaction, branch navigation). Idle warming stops no later than 30 minutes after the last real provider request; warming during an active agent run stops after 60 minutes. Extensions can override each decision through the [`cache_warming_decision`](extensions.md#cache_warming_decision) event.
|
|
10
|
+
|---|---|---|---|
|
|
11
|
+
| `defaultProvider` | string | Automatic | Startup AI provider. |
|
|
12
|
+
| `defaultModel` | string | Automatic | Startup model ID. |
|
|
13
|
+
| `defaultThinkingLevel` | `"off" \| "minimal" \| "low" \| "medium" \| "high" \| "xhigh" \| "max"` | `"medium"` | Startup thinking level. |
|
|
14
|
+
| `modelThinkingLevels` | object | None | Per-model startup thinking levels keyed by exact `provider/modelId`. |
|
|
15
|
+
| `thinkingBudgets` | object | Built-in budgets | Token budgets for `minimal`, `low`, `medium`, and `high` thinking levels. |
|
|
16
|
+
| `enabledModels` | `string[]` | All available models | Model patterns used for startup selection and model cycling. Uses the same format as `--models`. |
|
|
17
|
+
| `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in the transcript. |
|
|
18
|
+
| `showCacheMissNotices` | boolean | `false` | Show notices for significant cache misses, successful cache warming, compaction usage, and provider recovery. |
|
|
19
|
+
| `cacheWarming` | `"off" \| "streaming" \| "idle"` | `"streaming"` | Keep eligible provider prompt caches warm during active runs or, with `"idle"`, between runs. Global setting only. |
|
|
56
20
|
|
|
57
|
-
|
|
21
|
+
Cache warming runs only when the model declares a cache lifetime and Pi estimates at least $0.05 in avoided cache-miss cost. Refresh usage counts toward session totals but does not enter model context. `/session` shows the next decision; extensions can override it with `cache_warming_decision`. See [Prompt Cache Lifetimes](models.md#prompt-cache-lifetimes).
|
|
58
22
|
|
|
59
|
-
|
|
23
|
+
See [Choose a Model](models.md) for model selection and thinking controls.
|
|
60
24
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"thinkingBudgets": {
|
|
66
|
-
"minimal": 1024,
|
|
67
|
-
"low": 4096,
|
|
68
|
-
"medium": 10240,
|
|
69
|
-
"high": 32768
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### UI & Display
|
|
25
|
+
## Interaction
|
|
75
26
|
|
|
76
27
|
| Setting | Type | Default | Description |
|
|
77
|
-
|
|
78
|
-
| `
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
| `enableAnalytics` | boolean | `false` | Opt-in analytics data sharing. Currently only asked for during the experimental first-time setup (`PI_EXPERIMENTAL=1`) |
|
|
85
|
-
| `trackingId` | string | - | Analytics tracking identifier, generated when `enableAnalytics` is turned on |
|
|
86
|
-
| `doubleEscapeAction` | string | `"tree"` | Action for double-escape: `"tree"`, `"fork"`, or `"none"` |
|
|
87
|
-
| `treeFilterMode` | string | `"default"` | Default filter for `/tree`: `"default"`, `"no-tools"`, `"user-only"`, `"labeled-only"`, `"all"` |
|
|
88
|
-
| `editorPaddingX` | number | `0` | Horizontal padding for input editor (0-3) |
|
|
89
|
-
| `outputPad` | number | `1` | Horizontal padding for user messages, assistant messages, and thinking (0 or 1) |
|
|
90
|
-
| `autocompleteMaxVisible` | number | `5` | Max visible items in autocomplete dropdown (3-20) |
|
|
91
|
-
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
|
|
92
|
-
| `tuiMode` | string | `"regular"` | Interactive TUI mode: `"regular"` or experimental `"fullscreen"`. Changes from `/settings` apply immediately; `--tui-mode` overrides this setting at startup |
|
|
93
|
-
| `fullscreenExitOutput` | string | `"transcript"` | Fullscreen exit output: `"transcript"` prints the final transcript and resume hint, while `"resume-hint"` restores the previous screen and prints only the resume hint. Has no effect in regular TUI mode |
|
|
94
|
-
| `fullscreenScrollbar` | string | `"auto"` | Fullscreen transcript scrollbar: `"auto"` shows it temporarily while scrolling or while the pointer is over its rightmost-column track, `"always"` reserves that column and keeps it visible, and `"hidden"` hides it. Has no effect in regular TUI mode |
|
|
95
|
-
| `fullscreenCopyOnSelect` | boolean | `true` | Automatically copy selected text in fullscreen mode. When disabled, selections stay highlighted and `Ctrl+X` copies the active selection |
|
|
96
|
-
|
|
97
|
-
For VS Code, include `--wait` so pi resumes after the editor exits:
|
|
98
|
-
|
|
99
|
-
```json
|
|
100
|
-
{
|
|
101
|
-
"externalEditor": "code --wait"
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Telemetry and update checks
|
|
106
|
-
|
|
107
|
-
`enableInstallTelemetry` controls the anonymous install/update ping to `https://pi.dev/api/report-install` and Pi attribution headers for OpenRouter, NVIDIA NIM, and Cloudflare provider requests. Opting out disables both. It does not disable update checks; Pi can still fetch `https://pi.dev/api/latest-version` to look for the latest version.
|
|
108
|
-
|
|
109
|
-
Set `PI_SKIP_VERSION_CHECK=1` to disable the Pi version update check. Use `--offline` or `PI_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
| `steeringMode` | `"all" \| "one-at-a-time"` | `"one-at-a-time"` | How queued steering messages are delivered. |
|
|
30
|
+
| `followUpMode` | `"all" \| "one-at-a-time"` | `"one-at-a-time"` | How queued follow-up messages are delivered. |
|
|
31
|
+
| `externalEditor` | string | `$VISUAL`, `$EDITOR`, then platform default | Command opened by the external-editor keybinding. |
|
|
32
|
+
| `doubleEscapeAction` | `"tree" \| "fork" \| "none"` | `"tree"` | Action for double Escape with an empty editor. |
|
|
33
|
+
| `treeFilterMode` | `"default" \| "no-tools" \| "user-only" \| "labeled-only" \| "all"` | `"default"` | Initial filter used by `/tree`. |
|
|
34
|
+
| `defaultProjectTrust` | `"ask" \| "always" \| "never"` | `"ask"` | Fallback project-trust behavior. **Can only be set in agent-directory settings.** |
|
|
110
35
|
|
|
111
|
-
|
|
36
|
+
## Tools
|
|
112
37
|
|
|
113
38
|
| Setting | Type | Default | Description |
|
|
114
|
-
|
|
115
|
-
| `
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
| `defaultTools` | `string[]` | `read`, `bash`, `edit`, `write` | Tools enabled at startup. Plain names replace the defaults; `+name` adds a tool and `-name` removes one. An empty array disables all built-in tools but not extension or SDK tools. |
|
|
41
|
+
| `codemode.mode` | `"on"` \| `"only"` | `"on"` | How the `codemode` tool presents tools while it is active. `on`: declared tools get their `codemode` declaration appended to their description, and `codemode` lists only tools that are not declared (MCP `codemode` exposure). `only`: `codemode` lists every tool scripts can call, and active built-in and extension tools are hidden from the model, so it reaches them through `codemode`. |
|
|
42
|
+
| `codemode.inlineBudget` | number | `3000` | Estimated tokens (characters / 4) the `codemode` tool's description may spend on tool declarations. Tools that do not fit are left out and found with `searchTools()`. `0` lists only namespaces. |
|
|
116
43
|
|
|
117
|
-
|
|
118
|
-
{
|
|
119
|
-
"httpProxy": "http://127.0.0.1:7890"
|
|
120
|
-
}
|
|
121
|
-
```
|
|
44
|
+
Available built-in tools are `read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, and `ls`. `defaultTools` can also name `codemode` and `tool_search`, which built-in extensions register inactive, and other extension tools registered inactive.
|
|
122
45
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
| Setting | Type | Default | Description |
|
|
126
|
-
|---------|------|---------|-------------|
|
|
127
|
-
| `warnings.anthropicExtraUsage` | boolean | `true` | Show a warning when Anthropic subscription auth may use paid extra usage |
|
|
128
|
-
|
|
129
|
-
```json
|
|
130
|
-
{
|
|
131
|
-
"warnings": {
|
|
132
|
-
"anthropicExtraUsage": false
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Compaction
|
|
138
|
-
|
|
139
|
-
| Setting | Type | Default | Description |
|
|
140
|
-
|---------|------|---------|-------------|
|
|
141
|
-
| `compaction.enabled` | boolean | `true` | Enable auto-compaction |
|
|
142
|
-
| `compaction.reserveTokens` | number | `16384` | Tokens reserved for LLM response |
|
|
143
|
-
| `compaction.keepRecentTokens` | number | `20000` | Recent tokens to keep (not summarized) |
|
|
144
|
-
| `compaction.modelOverrides` | object | - | Per-model `reserveTokens` and `keepRecentTokens` overrides keyed by exact `"provider/modelId"` |
|
|
46
|
+
A list of only `+name` and `-name` entries changes the inherited selection instead of replacing it. For example, this enables `codemode` next to the default tools:
|
|
145
47
|
|
|
146
48
|
```json
|
|
147
49
|
{
|
|
148
|
-
"
|
|
149
|
-
"enabled": true,
|
|
150
|
-
"reserveTokens": 16384,
|
|
151
|
-
"keepRecentTokens": 20000
|
|
152
|
-
}
|
|
50
|
+
"defaultTools": ["+codemode"]
|
|
153
51
|
}
|
|
154
52
|
```
|
|
155
53
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
```json
|
|
159
|
-
{
|
|
160
|
-
"compaction": {
|
|
161
|
-
"enabled": true,
|
|
162
|
-
"reserveTokens": 16384,
|
|
163
|
-
"keepRecentTokens": 20000,
|
|
164
|
-
"modelOverrides": {
|
|
165
|
-
"some-provider/big-model": {
|
|
166
|
-
"reserveTokens": 400000
|
|
167
|
-
},
|
|
168
|
-
"local/small-model": {
|
|
169
|
-
"reserveTokens": 2048,
|
|
170
|
-
"keepRecentTokens": 4096
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
Keys match exact, case-sensitive `provider/modelId` values, not names or glob patterns. Model IDs may contain slashes (for example, `openrouter/anthropic/claude-sonnet-4`).
|
|
178
|
-
|
|
179
|
-
Each token setting resolves independently: matching model override → ordinary `compaction` setting → built-in default. In the example, `some-provider/big-model` keeps the ordinary 20000 recent tokens. Token values must be non-negative safe integers. Invalid values in the matching model override produce an error when read; only omitted fields fall back to the ordinary setting. Model override entries must be objects. Invalid ordinary token settings produce an error when read, even if the active model has a valid override. Only omitted ordinary values use built-in defaults. Zero is accepted, but `reserveTokens: 0` leaves no response margin and also sets the summarization output budget to zero.
|
|
54
|
+
This replaces `bash` with `powershell` and enables `grep`: `["-bash", "+powershell", "+grep"]`. Project settings apply on top of user settings: a project list with only `+name` and `-name` entries changes the user's selection, and a project list with a plain name replaces it. In one list, plain names form the selection, and `+name` and `-name` then apply in order.
|
|
180
55
|
|
|
181
|
-
|
|
56
|
+
CLI tool options override this setting for one invocation; `--tools` does not accept `+name` or `-name`. See [Command Line](cli.md#tools).
|
|
182
57
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
See [compaction.md](compaction.md) for trigger and summarization behavior.
|
|
186
|
-
|
|
187
|
-
### Branch Summary
|
|
58
|
+
## Sessions and context
|
|
188
59
|
|
|
189
60
|
| Setting | Type | Default | Description |
|
|
190
|
-
|
|
191
|
-
| `
|
|
192
|
-
| `branchSummary.skipPrompt` | boolean | `false` | Skip "Summarize branch?" prompt on `/tree` navigation (defaults to no summary) |
|
|
61
|
+
|---|---|---|---|
|
|
62
|
+
| `sessionDir` | string | Agent session directory | Session storage directory. Relative paths resolve from the working directory. `PI_CODING_AGENT_SESSION_DIR` and `--session-dir` override this setting. |
|
|
193
63
|
|
|
194
|
-
###
|
|
64
|
+
### Compaction
|
|
195
65
|
|
|
196
66
|
| Setting | Type | Default | Description |
|
|
197
|
-
|
|
198
|
-
| `
|
|
199
|
-
| `
|
|
200
|
-
| `
|
|
201
|
-
| `
|
|
202
|
-
| `retry.maxUnauthorizedRetries` | number | `5` | Maximum retry attempts for HTTP 401/authentication failures |
|
|
203
|
-
| `retry.provider.timeoutMs` | number | SDK default | Provider/SDK request timeout in milliseconds |
|
|
204
|
-
| `retry.provider.maxRetries` | number | `0` | Provider/SDK retry attempts |
|
|
205
|
-
| `retry.provider.maxRetryDelayMs` | number | `60000` | Max server-requested delay before failing (60s) |
|
|
206
|
-
|
|
207
|
-
Agent-level retry covers HTTP provider errors, transport and stream disconnections, empty assistant responses, and responses containing only thinking without text or tool calls. HTTP 401/authentication failures remain bounded by `retry.maxUnauthorizedRetries`; other retryable failures use `retry.maxRetries`, which is unlimited by default. Exponential backoff never exceeds `retry.maxBackoffMs`.
|
|
67
|
+
|---|---|---|---|
|
|
68
|
+
| `compaction.enabled` | boolean | `true` | Enable automatic compaction. |
|
|
69
|
+
| `compaction.reserveTokens` | number | `16384` | Tokens reserved for the model response. |
|
|
70
|
+
| `compaction.keepRecentTokens` | number | `20000` | Recent tokens retained without summarization. |
|
|
71
|
+
| `compaction.modelOverrides` | object | None | Per-model token settings keyed by exact `provider/modelId`. |
|
|
208
72
|
|
|
209
|
-
|
|
73
|
+
<a id="per-model-compaction-overrides"></a>
|
|
210
74
|
|
|
211
|
-
|
|
75
|
+
Compaction token values must be non-negative safe integers. Each value resolves independently from the matching model override, then the ordinary compaction setting, then the built-in default. Project and user objects merge before model lookup.
|
|
212
76
|
|
|
213
|
-
|
|
214
|
-
{
|
|
215
|
-
"retry": {
|
|
216
|
-
"enabled": true,
|
|
217
|
-
"maxRetries": null,
|
|
218
|
-
"baseDelayMs": 2000,
|
|
219
|
-
"maxBackoffMs": 600000,
|
|
220
|
-
"maxUnauthorizedRetries": 5,
|
|
221
|
-
"provider": {
|
|
222
|
-
"timeoutMs": 3600000,
|
|
223
|
-
"maxRetries": 0,
|
|
224
|
-
"maxRetryDelayMs": 60000
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
```
|
|
77
|
+
See [Compaction Reference](compaction.md) for trigger, summarization, and validation behavior.
|
|
229
78
|
|
|
230
|
-
###
|
|
79
|
+
### Branch summaries
|
|
231
80
|
|
|
232
81
|
| Setting | Type | Default | Description |
|
|
233
|
-
|
|
234
|
-
| `
|
|
235
|
-
| `
|
|
236
|
-
| `nonStreaming` | boolean | `false` | Request a single non-streaming response from capable providers. Currently supported by `openai-completions` APIs. |
|
|
237
|
-
| `transport` | string | `"auto"` | Preferred transport for providers that support multiple transports: `"sse"`, `"websocket"`, `"websocket-cached"`, or `"auto"` |
|
|
238
|
-
| `httpIdleTimeoutMs` | number | `300000` | HTTP header/body idle timeout in milliseconds, also used by providers with explicit stream idle timeouts. Set to `0` to disable. |
|
|
239
|
-
| `websocketConnectTimeoutMs` | number | `15000` | WebSocket connect/open handshake timeout in milliseconds for providers that support WebSocket transports. Set to `0` to disable. |
|
|
82
|
+
|---|---|---|---|
|
|
83
|
+
| `branchSummary.reserveTokens` | number | `16384` | Tokens reserved when summarizing branch history. |
|
|
84
|
+
| `branchSummary.skipPrompt` | boolean | `false` | Skip the branch-summary prompt and default to no summary. |
|
|
240
85
|
|
|
241
|
-
|
|
86
|
+
## Terminal and display
|
|
242
87
|
|
|
243
88
|
| Setting | Type | Default | Description |
|
|
244
|
-
|
|
245
|
-
| `
|
|
246
|
-
| `
|
|
247
|
-
| `
|
|
248
|
-
| `
|
|
249
|
-
| `
|
|
250
|
-
| `
|
|
251
|
-
| `
|
|
252
|
-
| `
|
|
253
|
-
|
|
254
|
-
|
|
89
|
+
|---|---|---|---|
|
|
90
|
+
| `theme` | string | `"system"` | Built-in or custom theme name. `system` derives colors from the terminal theme. |
|
|
91
|
+
| `quietStartup` | boolean | `false` | Hide the startup header. |
|
|
92
|
+
| `tuiMode` | `"regular" \| "fullscreen"` | `"regular"` | Interactive terminal UI mode. |
|
|
93
|
+
| `fullscreenExitOutput` | `"transcript" \| "resume-hint"` | `"transcript"` | Output printed when fullscreen mode exits. |
|
|
94
|
+
| `fullscreenScrollbar` | `"auto" \| "always" \| "hidden"` | `"auto"` | Fullscreen transcript scrollbar behavior. |
|
|
95
|
+
| `fullscreenCopyOnSelect` | boolean | `true` | Copy selected text automatically in fullscreen mode. |
|
|
96
|
+
| `fullscreenWheelScrollLines` | `"auto"` \| number | `"auto"` | Lines per mouse-wheel event in fullscreen mode, from 1 to 100. `"auto"` moves one line per event in local macOS terminals, which already accelerate wheel and trackpad input; elsewhere, and over SSH, it speeds up fast wheel spins to at most 6 lines per event. Alt+wheel moves five times as far. |
|
|
97
|
+
| `editorPaddingX` | number | `0` | Horizontal editor padding from 0 to 3 cells. |
|
|
98
|
+
| `outputPad` | `0 \| 1` | `1` | Horizontal transcript padding. |
|
|
99
|
+
| `autocompleteMaxVisible` | number | `5` | Visible autocomplete entries, from 3 to 20. |
|
|
100
|
+
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while Pi positions it for input methods. |
|
|
101
|
+
| `terminal.showImages` | boolean | `true` | Display inline images when supported. |
|
|
102
|
+
| `terminal.imageWidthCells` | number | `60` | Preferred inline image width in terminal cells. |
|
|
103
|
+
| `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when rendered content shrinks. |
|
|
104
|
+
| `terminal.showTerminalProgress` | boolean | `false` | Show OSC 9;4 progress in the terminal tab. |
|
|
105
|
+
| `terminal.hyperlinks` | `boolean \| "auto"` | `"auto"` | Override OSC 8 hyperlink detection. |
|
|
106
|
+
| `terminal.images` | `"kitty" \| "iterm2" \| "auto" \| false` | `"auto"` | Override inline-image protocol detection. |
|
|
107
|
+
| `terminal.trueColor` | `boolean \| "auto"` | `"auto"` | Override true-color detection. |
|
|
108
|
+
| `images.autoResize` | boolean | `true` | Resize images to at most 2000 by 2000 pixels before sending them to a model. |
|
|
109
|
+
| `images.blockImages` | boolean | `false` | Prevent images from being sent to models. |
|
|
110
|
+
| `markdown.codeBlockIndent` | string | `" "` | Prefix used to indent rendered code blocks. |
|
|
111
|
+
| `markdown.mermaid` | `"off" \| "final" \| "streaming"` | `"streaming"` | Mermaid rendering mode. |
|
|
112
|
+
|
|
113
|
+
See [Themes](themes.md) and [Terminal Setup](terminal-setup.md) for format and platform details.
|
|
114
|
+
|
|
115
|
+
## Network and retries
|
|
255
116
|
|
|
256
117
|
| Setting | Type | Default | Description |
|
|
257
|
-
|
|
258
|
-
| `
|
|
259
|
-
| `
|
|
260
|
-
| `
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
{
|
|
272
|
-
"shellPath": "C:\\Program Files\\Git\\bin\\bash.exe"
|
|
273
|
-
}
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
```json
|
|
277
|
-
{
|
|
278
|
-
"npmCommand": ["mise", "exec", "node@20", "--", "npm"]
|
|
279
|
-
}
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
`npmCommand` is used for all npm package-manager operations, including installs, uninstalls, and dependency installs inside git packages. User-scoped npm packages install under `~/.pi/agent/npm/`; project-scoped npm packages install under `.pi/npm/`. Use argv-style entries exactly as the process should be launched. When `npmCommand` is configured, git package dependency installs use plain `install` to avoid npm-specific flags in wrappers or alternate package managers.
|
|
283
|
-
|
|
284
|
-
### Tools
|
|
285
|
-
|
|
286
|
-
| Setting | Type | Default | Description |
|
|
287
|
-
|---------|------|---------|-------------|
|
|
288
|
-
| `defaultTools` | string[] | - | Built-in tools enabled initially. When omitted, Pi uses its standard defaults |
|
|
289
|
-
|
|
290
|
-
`defaultTools` selects the built-in tools enabled at startup. Extension and SDK custom tools remain enabled. Available built-ins are `read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, and `ls`:
|
|
291
|
-
|
|
292
|
-
```json
|
|
293
|
-
{
|
|
294
|
-
"defaultTools": ["bash", "edit", "write"]
|
|
295
|
-
}
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
On Windows, select `powershell` instead of `bash`, or include both:
|
|
118
|
+
|---|---|---|---|
|
|
119
|
+
| `transport` | `"auto" \| "sse" \| "websocket" \| "websocket-cached"` | `"auto"` | Preferred transport for AI providers that support multiple transports. |
|
|
120
|
+
| `httpProxy` | string | None | Proxy URL applied as `HTTP_PROXY` and `HTTPS_PROXY` for Pi-managed HTTP clients. **Can only be set in agent-directory settings.** |
|
|
121
|
+
| `httpIdleTimeoutMs` | number | `300000` | HTTP header and body idle timeout in milliseconds. Set to `0` to disable. |
|
|
122
|
+
| `websocketConnectTimeoutMs` | number | `15000` | WebSocket connection timeout in milliseconds. Set to `0` to disable. |
|
|
123
|
+
| `nonStreaming` | boolean | `false` | Request a single non-streaming response from capable providers. Currently supported by `openai-completions` APIs. |
|
|
124
|
+
| `retry.enabled` | boolean | `true` | Enable automatic agent-level retry. |
|
|
125
|
+
| `retry.maxRetries` | number or null | `null` | Maximum agent-level retry attempts; `null` retries without a limit. |
|
|
126
|
+
| `retry.baseDelayMs` | number | `2000` | Base delay for agent-level exponential backoff. |
|
|
127
|
+
| `retry.maxBackoffMs` | number | `600000` | Maximum agent-level backoff delay (10 minutes). |
|
|
128
|
+
| `retry.maxUnauthorizedRetries` | number | `5` | Maximum retry attempts for HTTP 401/authentication failures. |
|
|
129
|
+
| `retry.provider.timeoutMs` | number | `httpIdleTimeoutMs` | Provider request timeout in milliseconds. |
|
|
130
|
+
| `retry.provider.maxRetries` | number | `0` | Provider-level retry attempts. |
|
|
131
|
+
| `retry.provider.maxRetryDelayMs` | number | `60000` | Maximum server-requested delay in milliseconds. Set to `0` to disable the limit. |
|
|
299
132
|
|
|
300
|
-
|
|
301
|
-
{
|
|
302
|
-
"defaultTools": ["read", "powershell", "edit", "write"]
|
|
303
|
-
}
|
|
304
|
-
```
|
|
133
|
+
Agent-level retry covers HTTP provider errors, transport and stream disconnections, empty assistant responses, and responses containing only thinking without text or tool calls. HTTP 401/authentication failures remain bounded by `retry.maxUnauthorizedRetries`; other retryable failures use `retry.maxRetries`, which is unlimited by default. Exponential backoff never exceeds `retry.maxBackoffMs`.
|
|
305
134
|
|
|
306
|
-
|
|
135
|
+
Keep `retry.provider.maxRetries` at `0` unless provider-level retries are required. Provider retries can delay Pi from handling quota and usage-limit errors itself.
|
|
307
136
|
|
|
308
|
-
|
|
137
|
+
## Shell
|
|
309
138
|
|
|
310
139
|
| Setting | Type | Default | Description |
|
|
311
|
-
|
|
312
|
-
| `
|
|
140
|
+
|---|---|---|---|
|
|
141
|
+
| `shellPath` | string | Platform default | Custom shell executable path. Supports a leading `~`. |
|
|
142
|
+
| `shellCommandPrefix` | string | None | Prefix prepended to every shell command. |
|
|
143
|
+
| `npmCommand` | `string[]` | `npm` | Command and arguments used for npm package lookup and installation. |
|
|
313
144
|
|
|
314
|
-
|
|
315
|
-
{ "sessionDir": ".pi/sessions" }
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
When multiple sources specify a session directory, precedence is `--session-dir`, `PI_CODING_AGENT_SESSION_DIR`, then `sessionDir` in settings.json.
|
|
319
|
-
|
|
320
|
-
### Model Cycling
|
|
321
|
-
|
|
322
|
-
| Setting | Type | Default | Description |
|
|
323
|
-
|---------|------|---------|-------------|
|
|
324
|
-
| `enabledModels` | string[] | - | Model patterns for Ctrl+P cycling (same format as `--models` CLI flag) |
|
|
145
|
+
See [Shell aliases](shell-aliases.md) for shell setup and [Pi Packages](packages.md) for package-manager behavior.
|
|
325
146
|
|
|
326
|
-
|
|
327
|
-
{
|
|
328
|
-
"enabledModels": ["claude-*", "gpt-4o", "gemini-2*"]
|
|
329
|
-
}
|
|
330
|
-
```
|
|
147
|
+
## Resources
|
|
331
148
|
|
|
332
|
-
|
|
149
|
+
Resource paths in user settings resolve from the agent directory. Paths in project settings resolve from the project `.pi` directory. Absolute paths and `~` are supported.
|
|
333
150
|
|
|
334
151
|
| Setting | Type | Default | Description |
|
|
335
|
-
|
|
336
|
-
| `
|
|
337
|
-
| `
|
|
152
|
+
|---|---|---|---|
|
|
153
|
+
| `packages` | array | `[]` | npm, git, or local Pi package sources. See [Pi Packages](packages.md). |
|
|
154
|
+
| `extensions` | `string[]` | `[]` | Extension files or directories. |
|
|
155
|
+
| `skills` | `string[]` | `[]` | Skill files or directories. |
|
|
156
|
+
| `prompts` | `string[]` | `[]` | Prompt-template files or directories. |
|
|
157
|
+
| `themes` | `string[]` | `[]` | Theme files or directories. |
|
|
158
|
+
| `enableSkillCommands` | boolean | `true` | Register skills as `/skill:name` commands. |
|
|
338
159
|
|
|
339
|
-
|
|
160
|
+
Resource arrays support glob exclusions with `!pattern`, exact inclusion with `+path`, and exact exclusion with `-path`. Pi loads resources listed in both user-level and project settings.
|
|
340
161
|
|
|
341
|
-
|
|
162
|
+
The built-in extensions are named `builtin:mcp`, `builtin:llama.cpp`, `builtin:codemode`, and `builtin:tool-search` in `extensions`. They load by default; `-builtin:mcp` disables one. A `+builtin:<name>` or `-builtin:<name>` entry in project settings overrides the user setting. `pi config` lists them under Built-in. `--no-extensions` disables them too, and `-e builtin:<name>` loads one explicitly.
|
|
342
163
|
|
|
343
|
-
|
|
164
|
+
## Updates, telemetry, and warnings
|
|
344
165
|
|
|
345
166
|
| Setting | Type | Default | Description |
|
|
346
|
-
|
|
347
|
-
| `
|
|
348
|
-
| `
|
|
349
|
-
| `
|
|
350
|
-
| `
|
|
351
|
-
| `themes` | string[] | `[]` | Local theme file paths or directories |
|
|
352
|
-
| `enableSkillCommands` | boolean | `true` | Register skills as `/skill:name` commands |
|
|
353
|
-
|
|
354
|
-
Arrays support glob patterns and exclusions. Use `!pattern` to exclude. Use `+path` to force-include an exact path and `-path` to force-exclude an exact path.
|
|
355
|
-
|
|
356
|
-
#### packages
|
|
357
|
-
|
|
358
|
-
String form loads all resources from a package:
|
|
359
|
-
|
|
360
|
-
```json
|
|
361
|
-
{
|
|
362
|
-
"packages": ["pi-skills", "@org/my-extension"]
|
|
363
|
-
}
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
Object form filters which resources to load:
|
|
367
|
-
|
|
368
|
-
```json
|
|
369
|
-
{
|
|
370
|
-
"packages": [
|
|
371
|
-
{
|
|
372
|
-
"source": "pi-skills",
|
|
373
|
-
"skills": ["brave-search", "transcribe"],
|
|
374
|
-
"extensions": []
|
|
375
|
-
}
|
|
376
|
-
]
|
|
377
|
-
}
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
See [packages.md](packages.md) for package management details.
|
|
381
|
-
|
|
382
|
-
## Example
|
|
383
|
-
|
|
384
|
-
```json
|
|
385
|
-
{
|
|
386
|
-
"defaultProvider": "anthropic",
|
|
387
|
-
"defaultModel": "claude-sonnet-4-20250514",
|
|
388
|
-
"defaultThinkingLevel": "medium",
|
|
389
|
-
"modelThinkingLevels": {
|
|
390
|
-
"anthropic/claude-sonnet-4-20250514": "high"
|
|
391
|
-
},
|
|
392
|
-
"theme": "dark",
|
|
393
|
-
"compaction": {
|
|
394
|
-
"enabled": true,
|
|
395
|
-
"reserveTokens": 16384,
|
|
396
|
-
"keepRecentTokens": 20000
|
|
397
|
-
},
|
|
398
|
-
"retry": {
|
|
399
|
-
"enabled": true,
|
|
400
|
-
"maxRetries": null
|
|
401
|
-
},
|
|
402
|
-
"enabledModels": ["claude-*", "gpt-4o"],
|
|
403
|
-
"warnings": {
|
|
404
|
-
"anthropicExtraUsage": true
|
|
405
|
-
},
|
|
406
|
-
"packages": ["pi-skills"]
|
|
407
|
-
}
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
## Project Overrides
|
|
411
|
-
|
|
412
|
-
Project settings (`.pi/settings.json`) override global settings. Nested objects are merged:
|
|
413
|
-
|
|
414
|
-
```json
|
|
415
|
-
// ~/.pi/agent/settings.json (global)
|
|
416
|
-
{
|
|
417
|
-
"theme": "dark",
|
|
418
|
-
"compaction": { "enabled": true, "reserveTokens": 16384 }
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
// .pi/settings.json (project)
|
|
422
|
-
{
|
|
423
|
-
"compaction": { "reserveTokens": 8192 }
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
// Result
|
|
427
|
-
{
|
|
428
|
-
"theme": "dark",
|
|
429
|
-
"compaction": { "enabled": true, "reserveTokens": 8192 }
|
|
430
|
-
}
|
|
431
|
-
```
|
|
167
|
+
|---|---|---|---|
|
|
168
|
+
| `collapseChangelog` | boolean | `false` | Show a condensed changelog after an update. |
|
|
169
|
+
| `enableInstallTelemetry` | boolean | `true` | Enable anonymous install/update reporting and selected provider attribution headers. Does not control update checks. |
|
|
170
|
+
| `enableAnalytics` | boolean | `false` | Opt in to analytics data sharing. Currently used only by the experimental first-run setup. |
|
|
171
|
+
| `warnings.anthropicExtraUsage` | boolean | `true` | Warn when Anthropic subscription authentication may use paid extra usage. |
|