@kingingwang/pi-darwin-arm64 0.87.0 → 0.87.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 +24 -0
- package/bin/README.md +25 -711
- package/bin/docs/cli-integration.md +106 -0
- package/bin/docs/cli.md +268 -0
- package/bin/docs/compaction.md +22 -22
- package/bin/docs/configuration.md +45 -0
- package/bin/docs/containerization.md +109 -82
- package/bin/docs/custom-provider.md +132 -784
- package/bin/docs/docs.json +139 -99
- package/bin/docs/environment-variables.md +3 -5
- package/bin/docs/extensions.md +134 -3020
- 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 +57 -102
- package/bin/docs/llama-cpp.md +3 -3
- package/bin/docs/message-types.md +261 -0
- package/bin/docs/models.md +55 -565
- package/bin/docs/packages.md +66 -167
- package/bin/docs/prompt-templates.md +31 -68
- package/bin/docs/providers.md +102 -240
- package/bin/docs/quickstart.md +61 -106
- package/bin/docs/rpc-commands.md +854 -0
- package/bin/docs/rpc-extension-ui.md +200 -0
- package/bin/docs/rpc.md +129 -1556
- package/bin/docs/sdk.md +76 -1171
- package/bin/docs/security.md +70 -32
- package/bin/docs/session-format.md +10 -214
- package/bin/docs/sessions.md +35 -141
- package/bin/docs/settings.md +109 -386
- 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 +68 -280
- package/bin/docs/tmux.md +31 -39
- package/bin/docs/tui.md +69 -923
- package/bin/docs/usage.md +54 -272
- package/bin/docs/windows.md +43 -17
- package/bin/examples/README.md +13 -2
- 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/gondolin/package-lock.json +2 -2
- package/bin/examples/extensions/gondolin/package.json +1 -1
- 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 +25 -5
- package/bin/examples/sdk/README.md +1 -1
- package/bin/package.json +8 -8
- package/bin/pi +2 -2
- package/package.json +1 -1
- package/bin/docs/development.md +0 -90
package/bin/docs/settings.md
CHANGED
|
@@ -1,431 +1,154 @@
|
|
|
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.
|
|
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. |
|
|
46
20
|
|
|
47
|
-
|
|
48
|
-
{
|
|
49
|
-
"cacheWarming": "idle"
|
|
50
|
-
}
|
|
51
|
-
```
|
|
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).
|
|
52
22
|
|
|
53
|
-
|
|
23
|
+
See [Choose a Model](models.md) for model selection and thinking controls.
|
|
54
24
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Each refresh is billed as a cache read of the full context plus one output token. Usage and cost show up in session totals but never enter model context. Pi schedules candidates at 90% of the cache lifetime while leaving at least ten seconds before expiry.
|
|
58
|
-
|
|
59
|
-
Warming needs a known cache lifetime for the model and the retention tier the request used (`short`, or `long` with `PI_CACHE_RETENTION=long`). The built-in catalog carries lifetimes for direct Anthropic; custom models and other providers can declare theirs with `promptCache` in `models.json` (see [Prompt Cache Lifetimes](models.md#prompt-cache-lifetimes)). Claude models that use budget-based rather than adaptive thinking are skipped while thinking is on, because Anthropic derives the thinking budget from `max_tokens` and keys the message cache on it, so a one-token request cannot reproduce the entry.
|
|
60
|
-
|
|
61
|
-
#### thinkingBudgets
|
|
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
|
-
|
|
85
|
-
|
|
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.
|
|
110
|
-
|
|
111
|
-
### Network
|
|
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.** |
|
|
35
|
+
|
|
36
|
+
## Tools
|
|
112
37
|
|
|
113
38
|
| Setting | Type | Default | Description |
|
|
114
|
-
|
|
115
|
-
| `
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
| `defaultTools` | `string[]` | `read`, `bash`, `edit`, `write` | Built-in tools enabled at startup. An empty array disables all built-in tools but not extension or SDK tools. |
|
|
116
41
|
|
|
117
|
-
|
|
118
|
-
{
|
|
119
|
-
"httpProxy": "http://127.0.0.1:7890"
|
|
120
|
-
}
|
|
121
|
-
```
|
|
42
|
+
Available built-in tools are `read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, and `ls`. CLI tool options override this setting for one invocation. See [Command Line](cli.md#tools).
|
|
122
43
|
|
|
123
|
-
|
|
44
|
+
## Sessions and context
|
|
124
45
|
|
|
125
46
|
| Setting | Type | Default | Description |
|
|
126
|
-
|
|
127
|
-
| `
|
|
128
|
-
|
|
129
|
-
```json
|
|
130
|
-
{
|
|
131
|
-
"warnings": {
|
|
132
|
-
"anthropicExtraUsage": false
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
```
|
|
47
|
+
|---|---|---|---|
|
|
48
|
+
| `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. |
|
|
136
49
|
|
|
137
50
|
### Compaction
|
|
138
51
|
|
|
139
52
|
| Setting | Type | Default | Description |
|
|
140
|
-
|
|
141
|
-
| `compaction.enabled` | boolean | `true` | Enable
|
|
142
|
-
| `compaction.reserveTokens` | number | `16384` | Tokens reserved for
|
|
143
|
-
| `compaction.keepRecentTokens` | number | `20000` | Recent tokens
|
|
144
|
-
| `compaction.modelOverrides` | object |
|
|
145
|
-
|
|
146
|
-
```json
|
|
147
|
-
{
|
|
148
|
-
"compaction": {
|
|
149
|
-
"enabled": true,
|
|
150
|
-
"reserveTokens": 16384,
|
|
151
|
-
"keepRecentTokens": 20000
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
#### Per-model compaction overrides
|
|
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.
|
|
180
|
-
|
|
181
|
-
Global and project settings merge recursively **before** model lookup. A project can override one field for a model without replacing its other fields or other models. A global model-specific value takes precedence over a project-wide fallback; override the same model entry in the project to change it.
|
|
182
|
-
|
|
183
|
-
`enabled` is not model-specific. The active model's token settings apply to manual compaction, automatic threshold checks (including between assistant turns), and overflow recovery. Switching models takes effect on the next check or compaction. Configure overrides in JSON; `/settings` retains the ordinary auto-compaction toggle.
|
|
184
|
-
|
|
185
|
-
See [compaction.md](compaction.md) for trigger and summarization behavior.
|
|
186
|
-
|
|
187
|
-
### Branch Summary
|
|
53
|
+
|---|---|---|---|
|
|
54
|
+
| `compaction.enabled` | boolean | `true` | Enable automatic compaction. |
|
|
55
|
+
| `compaction.reserveTokens` | number | `16384` | Tokens reserved for the model response. |
|
|
56
|
+
| `compaction.keepRecentTokens` | number | `20000` | Recent tokens retained without summarization. |
|
|
57
|
+
| `compaction.modelOverrides` | object | None | Per-model token settings keyed by exact `provider/modelId`. |
|
|
188
58
|
|
|
189
|
-
|
|
190
|
-
|---------|------|---------|-------------|
|
|
191
|
-
| `branchSummary.reserveTokens` | number | `16384` | Tokens reserved when selecting branch history; output is capped at 4096 tokens |
|
|
192
|
-
| `branchSummary.skipPrompt` | boolean | `false` | Skip "Summarize branch?" prompt on `/tree` navigation (defaults to no summary) |
|
|
59
|
+
<a id="per-model-compaction-overrides"></a>
|
|
193
60
|
|
|
194
|
-
|
|
61
|
+
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.
|
|
195
62
|
|
|
196
|
-
|
|
197
|
-
|---------|------|---------|-------------|
|
|
198
|
-
| `retry.enabled` | boolean | `true` | Enable automatic agent-level retry |
|
|
199
|
-
| `retry.maxRetries` | number or null | `null` | Maximum agent-level retry attempts; `null` retries without a limit |
|
|
200
|
-
| `retry.baseDelayMs` | number | `2000` | Base delay for agent-level exponential backoff |
|
|
201
|
-
| `retry.maxBackoffMs` | number | `600000` | Maximum agent-level backoff delay (10 minutes) |
|
|
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) |
|
|
63
|
+
See [Compaction Reference](compaction.md) for trigger, summarization, and validation behavior.
|
|
206
64
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
When a provider requests a retry delay longer than `retry.provider.maxRetryDelayMs`, the request fails immediately with an informative error instead of waiting silently. Set it to `0` to disable the limit.
|
|
210
|
-
|
|
211
|
-
Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explicitly needed. Setting it above `0` can make SDK/provider retries handle out-of-usage-limit errors before Pi sees them, which may block the agent until the provider quota resets in some circumstances.
|
|
212
|
-
|
|
213
|
-
```json
|
|
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
|
-
```
|
|
229
|
-
|
|
230
|
-
### Message Delivery
|
|
65
|
+
### Branch summaries
|
|
231
66
|
|
|
232
67
|
| 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. |
|
|
68
|
+
|---|---|---|---|
|
|
69
|
+
| `branchSummary.reserveTokens` | number | `16384` | Tokens reserved when summarizing branch history. |
|
|
70
|
+
| `branchSummary.skipPrompt` | boolean | `false` | Skip the branch-summary prompt and default to no summary. |
|
|
240
71
|
|
|
241
|
-
|
|
72
|
+
## Terminal and display
|
|
242
73
|
|
|
243
74
|
| Setting | Type | Default | Description |
|
|
244
|
-
|
|
245
|
-
| `
|
|
246
|
-
| `
|
|
247
|
-
| `
|
|
248
|
-
| `
|
|
249
|
-
| `
|
|
250
|
-
| `
|
|
251
|
-
| `
|
|
252
|
-
| `
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
|
257
|
-
|
|
258
|
-
| `
|
|
259
|
-
| `
|
|
260
|
-
| `
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
```json
|
|
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
|
|
75
|
+
|---|---|---|---|
|
|
76
|
+
| `theme` | string | Detected | Built-in or custom theme name. |
|
|
77
|
+
| `quietStartup` | boolean | `false` | Hide the startup header. |
|
|
78
|
+
| `tuiMode` | `"regular" \| "fullscreen"` | `"regular"` | Interactive terminal UI mode. |
|
|
79
|
+
| `fullscreenExitOutput` | `"transcript" \| "resume-hint"` | `"transcript"` | Output printed when fullscreen mode exits. |
|
|
80
|
+
| `fullscreenScrollbar` | `"auto" \| "always" \| "hidden"` | `"auto"` | Fullscreen transcript scrollbar behavior. |
|
|
81
|
+
| `fullscreenCopyOnSelect` | boolean | `true` | Copy selected text automatically in fullscreen mode. |
|
|
82
|
+
| `editorPaddingX` | number | `0` | Horizontal editor padding from 0 to 3 cells. |
|
|
83
|
+
| `outputPad` | `0 \| 1` | `1` | Horizontal transcript padding. |
|
|
84
|
+
| `autocompleteMaxVisible` | number | `5` | Visible autocomplete entries, from 3 to 20. |
|
|
85
|
+
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while Pi positions it for input methods. |
|
|
86
|
+
| `terminal.showImages` | boolean | `true` | Display inline images when supported. |
|
|
87
|
+
| `terminal.imageWidthCells` | number | `60` | Preferred inline image width in terminal cells. |
|
|
88
|
+
| `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when rendered content shrinks. |
|
|
89
|
+
| `terminal.showTerminalProgress` | boolean | `false` | Show OSC 9;4 progress in the terminal tab. |
|
|
90
|
+
| `terminal.hyperlinks` | `boolean \| "auto"` | `"auto"` | Override OSC 8 hyperlink detection. |
|
|
91
|
+
| `terminal.images` | `"kitty" \| "iterm2" \| "auto" \| false` | `"auto"` | Override inline-image protocol detection. |
|
|
92
|
+
| `terminal.trueColor` | `boolean \| "auto"` | `"auto"` | Override true-color detection. |
|
|
93
|
+
| `images.autoResize` | boolean | `true` | Resize images to at most 2000 by 2000 pixels before sending them to a model. |
|
|
94
|
+
| `images.blockImages` | boolean | `false` | Prevent images from being sent to models. |
|
|
95
|
+
| `markdown.codeBlockIndent` | string | `" "` | Prefix used to indent rendered code blocks. |
|
|
96
|
+
| `markdown.mermaid` | `"off" \| "final" \| "streaming"` | `"streaming"` | Mermaid rendering mode. |
|
|
97
|
+
|
|
98
|
+
See [Themes](themes.md) and [Terminal Setup](terminal-setup.md) for format and platform details.
|
|
99
|
+
|
|
100
|
+
## Network and retries
|
|
285
101
|
|
|
286
102
|
| Setting | Type | Default | Description |
|
|
287
|
-
|
|
288
|
-
| `
|
|
289
|
-
|
|
290
|
-
`
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
103
|
+
|---|---|---|---|
|
|
104
|
+
| `transport` | `"auto" \| "sse" \| "websocket" \| "websocket-cached"` | `"auto"` | Preferred transport for AI providers that support multiple transports. |
|
|
105
|
+
| `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.** |
|
|
106
|
+
| `httpIdleTimeoutMs` | number | `300000` | HTTP header and body idle timeout in milliseconds. Set to `0` to disable. |
|
|
107
|
+
| `websocketConnectTimeoutMs` | number | `15000` | WebSocket connection timeout in milliseconds. Set to `0` to disable. |
|
|
108
|
+
| `nonStreaming` | boolean | `false` | Request a single non-streaming response from capable providers. Currently supported by `openai-completions` APIs. |
|
|
109
|
+
| `retry.enabled` | boolean | `true` | Enable automatic agent-level retry. |
|
|
110
|
+
| `retry.maxRetries` | number or null | `null` | Maximum agent-level retry attempts; `null` retries without a limit. |
|
|
111
|
+
| `retry.baseDelayMs` | number | `2000` | Base delay for agent-level exponential backoff. |
|
|
112
|
+
| `retry.maxBackoffMs` | number | `600000` | Maximum agent-level backoff delay (10 minutes). |
|
|
113
|
+
| `retry.maxUnauthorizedRetries` | number | `5` | Maximum retry attempts for HTTP 401/authentication failures. |
|
|
114
|
+
| `retry.provider.timeoutMs` | number | `httpIdleTimeoutMs` | Provider request timeout in milliseconds. |
|
|
115
|
+
| `retry.provider.maxRetries` | number | `0` | Provider-level retry attempts. |
|
|
116
|
+
| `retry.provider.maxRetryDelayMs` | number | `60000` | Maximum server-requested delay in milliseconds. Set to `0` to disable the limit. |
|
|
299
117
|
|
|
300
|
-
|
|
301
|
-
{
|
|
302
|
-
"defaultTools": ["read", "powershell", "edit", "write"]
|
|
303
|
-
}
|
|
304
|
-
```
|
|
118
|
+
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
119
|
|
|
306
|
-
|
|
120
|
+
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
121
|
|
|
308
|
-
|
|
122
|
+
## Shell
|
|
309
123
|
|
|
310
124
|
| Setting | Type | Default | Description |
|
|
311
|
-
|
|
312
|
-
| `
|
|
125
|
+
|---|---|---|---|
|
|
126
|
+
| `shellPath` | string | Platform default | Custom shell executable path. Supports a leading `~`. |
|
|
127
|
+
| `shellCommandPrefix` | string | None | Prefix prepended to every shell command. |
|
|
128
|
+
| `npmCommand` | `string[]` | `npm` | Command and arguments used for npm package lookup and installation. |
|
|
313
129
|
|
|
314
|
-
|
|
315
|
-
{ "sessionDir": ".pi/sessions" }
|
|
316
|
-
```
|
|
130
|
+
See [Shell aliases](shell-aliases.md) for shell setup and [Pi Packages](packages.md) for package-manager behavior.
|
|
317
131
|
|
|
318
|
-
|
|
132
|
+
## Resources
|
|
319
133
|
|
|
320
|
-
|
|
134
|
+
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.
|
|
321
135
|
|
|
322
136
|
| Setting | Type | Default | Description |
|
|
323
|
-
|
|
324
|
-
| `
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
### Markdown
|
|
333
|
-
|
|
334
|
-
| Setting | Type | Default | Description |
|
|
335
|
-
|---------|------|---------|-------------|
|
|
336
|
-
| `markdown.codeBlockIndent` | string | `" "` | Indentation for code blocks |
|
|
337
|
-
| `markdown.mermaid` | string | `"streaming"` | Mermaid rendering mode: `"off"`, `"final"`, or `"streaming"` |
|
|
338
|
-
|
|
339
|
-
### Resources
|
|
137
|
+
|---|---|---|---|
|
|
138
|
+
| `packages` | array | `[]` | npm, git, or local Pi package sources. See [Pi Packages](packages.md). |
|
|
139
|
+
| `extensions` | `string[]` | `[]` | Extension files or directories. |
|
|
140
|
+
| `skills` | `string[]` | `[]` | Skill files or directories. |
|
|
141
|
+
| `prompts` | `string[]` | `[]` | Prompt-template files or directories. |
|
|
142
|
+
| `themes` | `string[]` | `[]` | Theme files or directories. |
|
|
143
|
+
| `enableSkillCommands` | boolean | `true` | Register skills as `/skill:name` commands. |
|
|
340
144
|
|
|
341
|
-
|
|
145
|
+
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.
|
|
342
146
|
|
|
343
|
-
|
|
147
|
+
## Updates, telemetry, and warnings
|
|
344
148
|
|
|
345
149
|
| 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
|
-
```
|
|
150
|
+
|---|---|---|---|
|
|
151
|
+
| `collapseChangelog` | boolean | `false` | Show a condensed changelog after an update. |
|
|
152
|
+
| `enableInstallTelemetry` | boolean | `true` | Enable anonymous install/update reporting and selected provider attribution headers. Does not control update checks. |
|
|
153
|
+
| `enableAnalytics` | boolean | `false` | Opt in to analytics data sharing. Currently used only by the experimental first-run setup. |
|
|
154
|
+
| `warnings.anthropicExtraUsage` | boolean | `true` | Warn when Anthropic subscription authentication may use paid extra usage. |
|