Guides
Configuration
Pi-Bolt has no configuration of its own: it reads Pi's. A few environment variables control the Pi-Bolt executable itself, for diagnostics and tuning.
Pi's configuration#
Pi-Bolt and Pi share the agent directory, ~/.pi/agent, and a project's .pi folder:
| File or folder | Holds |
|---|---|
settings.json | Settings: default model, theme, extensions on and off, and more |
auth.json, models.json | Logins and API keys; custom providers and models |
sessions/ | Saved sessions |
extensions/, prompts/ | Your extensions and prompt templates |
mcp.json | MCP servers |
Pi's Configuration, Settings
and Environment variables pages apply to Pi-Bolt as written.
PI_CODING_AGENT_DIR moves the agent directory, and PI_OFFLINE=1 (or --offline) turns off
network operations at startup.
Shared packages and Pi-Bolt overrides#
pi-bolt install and pi-bolt remove update the shared packages list, just as Pi does.
They do not create a separate copy. They also drop Pi-Bolt's own entry for that package in the same settings file (a
replacement, an addition or an exclusion), so Pi-Bolt then loads what the shared list declares: remove stops both
from loading the package, and install npm:tools@2 is not hidden by a Pi-Bolt entry for npm:tools@1.
Use --pi-bolt to change only piBolt.packages, which Pi ignores. These examples use fictional
package names:
$ pi-bolt install --pi-bolt npm:@example/bolt-tools $ pi-bolt remove --pi-bolt npm:@example/shared-tools
piBolt.packages extends packages in the same settings file. Entries are applied in order: a package
adds to the inherited list or replaces an entry with the same identity; a -source string excludes it. For example:
{
"packages": ["npm:@example/shared-tools", "npm:@example/theme"],
"piBolt": {
"packages": ["-npm:@example/shared-tools", "npm:@example/bolt-tools"]
}
}
Pi-Bolt loads @example/theme and @example/bolt-tools; Pi still loads @example/shared-tools and
@example/theme. Later changes to the shared list remain inherited. Package objects with resource filters work in
either list. Identity matching uses the npm package name, the Git repository, or the resolved local path, ignoring versions
and Git refs.
remove --pi-bolt removes an explicit override and, if the package is inherited, records an exclusion.
install --pi-bolt replaces a matching exclusion with the package. Add --local to either command to
edit .pi/settings.json instead of global settings. Each file's overrides affect only its own shared list;
project/global precedence is unchanged. A project exclusion does not exclude a global package.
These are configuration overrides, not separate installations. Pi and Pi-Bolt share installed package files, so selecting different versions or Git refs of the same package can replace the files used by both.
Existing configurations: before 0.9.1, piBolt.packages was an independent list, copied from
packages on the first pi-bolt install or removal. Pi-Bolt converts such a copy once, at its next
start: each shared package missing from the copy gets a -source exclusion, entries identical to their shared
entry are dropped (so future shared changes apply to them), and entries that differ or exist only for Pi-Bolt are kept. Pi-Bolt
then loads what it loaded before, and packages added to packages later are inherited. Pi-Bolt marks the list with
"packagesOverlay": true whenever it writes it; an unmarked list without -source entries is taken for
an old copy, so add the mark to a list you write by hand.
The installer uses --pi-bolt for OpenSec's optional Bun-only extensions. The existing startup repair for older
installations still moves those extensions out of the shared list, but does not copy other shared packages.
Pi-Bolt's environment variables#
These are read by the Pi-Bolt executable at run time.
| Variable | Effect |
|---|---|
PIBOLT_VARIANT | The build the installer or the npm package installs. See Choose a build. |
PIBOLT_HOME | npm package: where downloaded builds are kept. Default: ~/.pi-bolt. |
BUN_AOT=0 | Ignore the compiled code and run Pi from bytecode. Use it to tell whether a problem comes from the compiled code. |
BUN_STATIC_HEAP_VERBOSE=1 | Report how the compiled code and prebuilt heap were loaded. |
PI_TIMING=1 | Pi's startup timings, including each extension's factory. |
PI_TUI_SCROLL_ROWS=0 | Redraw every changed row instead of scrolling rows that only moved, for a terminal that does not scroll a region correctly. |
BUN_CONFIG_HTTP_KEEPALIVE_TIMEOUT=N | Seconds an idle connection to a server waits to be reused when the server does not say. Default: 4, as in Node. |
BUN_JSC_numberOfGCMarkers=N | Threads that mark during a garbage collection. Default: 2. |
MIMALLOC_PURGE_HOLES_MIN_INTERVAL=N | Milliseconds between returns of freed memory to the system. Default: 250. Lower returns memory sooner, for more CPU. |
JITI_FS_CACHE=false | Do not keep the transpiled source of run-time extensions (kept in cache/jiti of the agent directory). |
The installer has its own variables; see Installer options.
.env files#
Pi-Bolt does not read a .env file from the working directory. Pi on Bun does, because Bun loads one into every
program's environment; Pi on Node does not. A project's .env (its API keys, its proxy settings) belongs to the
project. Set what Pi should see in the shell that starts it.