Skip to content

Configuration

PizzaPi loads configuration from two JSON files merged together — project-local settings win over global ones:

FileScope
~/.pizzapi/config.jsonGlobal — applies to all projects
.pizzapi/config.jsonProject-local — overrides global for this project

You can also override any setting with environment variables.


// ~/.pizzapi/config.json (or .pizzapi/config.json in your project)
{
// API key issued by the relay server during `pizzapi setup`
"apiKey": "pk_live_abc123...",
// WebSocket URL of the relay server.
// Set to "off" to disable the relay entirely (no setup wizard, no streaming).
// Default: ws://localhost:7492 (the pizzapi web default port)
"relayUrl": "wss://relay.example.com",
// Replace the default system prompt entirely
"systemPrompt": "You are a helpful coding assistant.",
// Append to the default system prompt without replacing it
"appendSystemPrompt": "Always write tests for new code.",
// Override the agent config directory (skills, extensions, etc.)
// Default: ~/.pizzapi
"agentDir": "~/.pizzapi",
// Additional skill paths — merged on top of the default locations:
// ~/.pizzapi/skills/ and <cwd>/.pizzapi/skills/
"skills": [
"~/my-custom-skills",
"/absolute/path/to/skills"
],
// Trust gate: allow project-local hooks (.pizzapi/config.json) to run.
// Must be in the GLOBAL config (project configs cannot self-authorize).
"allowProjectHooks": false,
// Project-local Claude Code plugins that have been explicitly trusted.
// Each entry is the absolute path to the plugin root directory.
// Managed via `pizza plugins trust <path>` / `pizza plugins untrust <path>`.
// Must be in the GLOBAL config (project configs cannot self-authorize).
"trustedPlugins": [
"/home/user/projects/my-app/.pizzapi/plugins/my-linter"
],
// Timeout (ms) for each MCP server's tools/list call (default: 30000).
// Set to 0 to disable.
"mcpTimeout": 30000,
// Show warnings when startup is slow (default: true).
// Set to false to suppress slow-startup notifications.
"slowStartupWarning": true,
// OS-level sandbox configuration.
// mode: "none" | "basic" (default) | "full"
// All other fields are srt-native overrides merged on top of the preset.
"sandbox": {
"mode": "full",
"network": {
"allowedDomains": ["*.github.com", "api.anthropic.com"]
},
"filesystem": {
"denyRead": ["~/.kube"],
"allowWrite": [".", "/tmp"],
"denyWrite": [".env.production"]
}
}
}

KeyTypeDefaultDescription
apiKeystringAPI key for authenticating with the relay server. Issued during pizzapi setup.
relayUrlstringws://localhost:7492WebSocket URL of the relay server. Set to "off" to disable relay entirely.
systemPromptstring(pi default)Fully replace the default system prompt
appendSystemPromptstringAppend to the default system prompt
agentDirstring~/.pizzapiAgent config directory (skills, extensions, etc.)
skillsstring[][]Additional skill directories. Supports ~ expansion.
allowProjectHooksbooleanfalseTrust gate: allow project-local hooks to run. Global config only.
trustedPluginsstring[][]Trusted Claude Code plugin paths. Global config only. Managed via pizza plugins trust.
oauthClientNamestring"PizzaPi"Global default client_name for MCP OAuth registration. Can also be set per-server in mcpServers entries. Per-server values take precedence. See Client Name Override.
mcpTimeoutnumber30000Timeout (ms) for each MCP server’s tools/list call during startup. Set to 0 to disable. See Safe Mode.
sandboxobject(see below)OS-level sandbox config. See Agent Sandbox.
sandbox.modestring"basic"Preset: "none", "basic", or "full".
sandbox.network.allowedDomainsstring[][] (full) / unset (basic)Domains the agent may reach. Required for outbound access in full mode.
sandbox.network.deniedDomainsstring[][]Domains explicitly blocked.
sandbox.filesystem.denyReadstring[]merged with presetAdditional paths blocked from reading.
sandbox.filesystem.allowWritestring[][".", "/tmp"]Paths allowed for writing (replaces preset when set).
sandbox.filesystem.denyWritestring[]merged with presetAdditional paths blocked from writing.
slowStartupWarningbooleantrueShow warnings when startup takes longer than expected (slow MCP servers, etc.). See Safe Mode.
subagent.maxParallelTasksnumber8Max tasks in a single parallel subagent call. Global config only.
subagent.maxConcurrencynumber4Max concurrent agent sessions running simultaneously. Global config only.
providerSettingsobjectProvider-specific settings. See Web Search below.

PizzaPi can add web search tools to supported providers, giving the agent the ability to search the web during conversations.

  • Anthropic uses Anthropic’s server-side web_search_20250305 tool type.
  • Ollama Cloud registers web_search and web_fetch tools that call Ollama’s REST APIs with your Ollama Cloud credentials.

Add a providerSettings block to ~/.pizzapi/config.json:

~/.pizzapi/config.json
{
"providerSettings": {
"anthropic": {
"webSearch": {
"enabled": true,
"maxUses": 5,
"allowedDomains": ["docs.python.org", "developer.mozilla.org"],
"blockedDomains": ["example.com"]
}
}
}
}
KeyTypeDefaultDescription
enabledbooleanfalseEnable web search for Anthropic models.
maxUsesnumber5Maximum number of searches per request.
allowedDomainsstring[]Only return results from these domains.
blockedDomainsstring[]Never return results from these domains.

For Ollama Cloud, enable web search under providerSettings["ollama-cloud"].webSearch:

~/.pizzapi/config.json
{
"providerSettings": {
"ollama-cloud": {
"webSearch": {
"enabled": true,
"maxResults": 5,
"maxContentChars": 8000,
"maxLinks": 100
}
}
}
}
KeyTypeDefaultDescription
enabledbooleanfalseRegister Ollama web_search and web_fetch tools.
maxResultsnumber5Default number of search results to request from Ollama (110).
maxContentCharsnumber8000Truncate fetched page content to this many characters (1100000).
maxLinksnumber100Truncate fetched page links to this many entries (11000).

You can also enable web search via environment variables (these take precedence if the config values are not already set):

VariableDescription
PIZZAPI_WEB_SEARCHSet to 1 to enable web search.
PIZZAPI_WEB_SEARCH_MAX_USESMax searches per request (default: 5).
PIZZAPI_WEB_SEARCH_ALLOWED_DOMAINSComma-separated list of allowed domains.
PIZZAPI_WEB_SEARCH_BLOCKED_DOMAINSComma-separated list of blocked domains.
PIZZAPI_OLLAMA_WEB_SEARCHSet to 1 to enable Ollama Cloud web tools.
PIZZAPI_OLLAMA_WEB_SEARCH_MAX_RESULTSDefault Ollama search results per request (110, default: 5).
PIZZAPI_OLLAMA_WEB_FETCH_MAX_CONTENT_CHARSMax chars for fetched page content (1100000, default: 8000).
PIZZAPI_OLLAMA_WEB_FETCH_MAX_LINKSMax links from fetched pages (11000, default: 100).

Every config option can also be set as an environment variable. Environment variables take effect for the current process only and do not override saved config values in JSON files — the JSON is loaded first, then env vars for the relay connection are applied on top.

VariableEquivalent config keyNotes
PIZZAPI_API_KEYapiKey
PIZZAPI_RELAY_URLrelayUrlSet to off to disable relay for this invocation
PIZZAPI_NO_MCPSet to 1 to skip MCP servers (Safe Mode)
PIZZAPI_NO_PLUGINSSet to 1 to skip plugin loading (Safe Mode)
PIZZAPI_NO_HOOKSSet to 1 to skip hook execution (Safe Mode)
PIZZAPI_NO_RELAYSet to 1 to skip relay connection (Safe Mode)
PIZZAPI_SANDBOXsandbox.modeOverride sandbox mode: none, basic, or full (Sandbox)
PIZZAPI_NO_SANDBOXSet to 1 to disable sandbox (shorthand for none) (Sandbox)

Example:

Terminal window
export PIZZAPI_API_KEY="pk_live_abc123..."
export PIZZAPI_RELAY_URL="wss://relay.example.com"
pizzapi

Disable the relay for one invocation:

Terminal window
PIZZAPI_RELAY_URL=off pizzapi

Disable the relay permanently (no env var needed each time):

~/.pizzapi/config.json
{
"relayUrl": "off"
}

In addition to PizzaPi’s own config, the underlying pi agent has its own settings file for model defaults, compaction, retry behavior, and UI preferences. These are separate from ~/.pizzapi/config.json:

FileScope
~/.pi/agent/settings.jsonGlobal pi settings
.pi/settings.jsonProject-local pi settings (overrides global)

Edit directly or use the /settings command inside a session.

{
"defaultProvider": "anthropic",
"defaultModel": "claude-sonnet-4-20250514",
"defaultThinkingLevel": "medium",
"compaction": {
"enabled": true,
"reserveTokens": 16384,
"keepRecentTokens": 20000
},
"retry": {
"enabled": true,
"maxRetries": 3,
"baseDelayMs": 2000,
"maxDelayMs": 60000
},
"enabledModels": ["claude-*", "gpt-4o"]
}

See Providers & Models for model configuration and Sessions & Context for compaction and session settings.


When PizzaPi starts, config is resolved in this order (later entries win):

  1. Built-in defaults
  2. ~/.pizzapi/config.json (global)
  3. <cwd>/.pizzapi/config.json (project-local)
  4. Environment variables (PIZZAPI_API_KEY, PIZZAPI_RELAY_URL)

PizzaPi automatically looks for skills in these locations (all merged):

  1. ~/.pizzapi/skills/ — your global personal skills
  2. <cwd>/.pizzapi/skills/ — project-local skills
  3. Any paths listed in the skills config array

See the Skills & Extensions guide for how to write and use skills.


Create .pizzapi/config.json in your project root to customize behavior for that repo:

my-project/.pizzapi/config.json
{
"appendSystemPrompt": "This is a Next.js 15 project using the App Router. Always use TypeScript.",
"skills": [
".pi/skills"
]
}

Commit this file to share it with your team — just keep apiKey out of project-local config (use the global file or environment variables instead).


The pizza web command has its own separate config file at ~/.pizzapi/web/config.json for managing the self-hosted relay server. This is distinct from the CLI config above.

Terminal window
# View current web hub config
pizzapi web config
# Set values
pizzapi web config set port 9000
pizzapi web config set extraOrigins "https://example.com"
pizzapi web config set vapidSubject "mailto:ops@example.com"
KeyDefaultDescription
port7492Host port to expose the web UI on
vapidSubjectmailto:admin@pizzapi.localVAPID subject for web push notifications
extraOrigins(none)Extra allowed CORS origins, comma-separated

CLI flags like --port and --origins also persist to this config file automatically.

See the CLI Reference and Self-Hosting guide for more details.