CLI Reference
Synopsis
Section titled “Synopsis”pizzapi [command] [options]When called without a command, pizzapi starts an interactive coding session and streams it to the configured relay server.
Run pizzapi --help for a quick summary of all commands:
pizzapi v0.2.2 — PizzaPi coding agent
Usage: pizza Start an interactive agent session pizza web [flags] Manage the PizzaPi web hub (Docker) pizza runner [args] Manage the background runner daemon pizza runner stop Stop the runner daemon pizza setup Run first-time setup pizza usage [provider] Show API usage stats pizza models List available models pizza plugins [cmd] Manage Claude Code plugins (list/trust/untrust)
Flags: --cwd <path> Set working directory --safe-mode Skip MCP, plugins, hooks, and relay (fast startup) --no-mcp Skip MCP server connections --no-plugins Skip Claude Code plugin loading --no-hooks Skip hook execution --no-relay Skip relay server connection -v, --version Show version -h, --help Show this help
Run `pizza <command> --help` for command-specific help.Commands
Section titled “Commands”pizzapi (default)
Section titled “pizzapi (default)”Start an interactive pi coding session and relay it to the web UI.
pizzapipizzapi --cwd /path/to/projectpizzapi --safe-mode # Skip MCP, plugins, hooks, relaypizzapi --no-mcp # Skip only MCP servers| Flag | Description |
|---|---|
--cwd <path> | Working directory for the session (default: current directory) |
--safe-mode | Skip all external dependencies (MCP, plugins, hooks, relay) for instant startup |
--no-mcp | Skip MCP server connections only |
--no-plugins | Skip Claude Code plugin discovery and loading |
--no-hooks | Skip all hook execution |
--no-relay | Skip relay server connection |
--sandbox <mode> | Set sandbox mode: enforce, audit, or off. See Agent Sandbox. |
The session ID is derived from the runner configuration and displayed on startup. Open the relay server’s web UI to watch the session live.
If no API key is configured and the relay is not disabled, the CLI will automatically launch the setup wizard before starting the session.
Startup Performance
Section titled “Startup Performance”MCP servers are initialized in parallel with per-server timeouts (default: 30 seconds). If a server doesn’t respond in time, it’s skipped and an error is shown.
When startup takes longer than 5 seconds, a warning is displayed in both the TUI and web UI showing which servers were slow. You can disable this warning by setting "slowStartupWarning": false in your config.
pizzapi setup
Section titled “pizzapi setup”Run (or re-run) the first-time setup wizard. Prompts for the relay server URL, email, and password, then saves the API key to ~/.pizzapi/config.json.
pizzapi setuppizzapi runner
Section titled “pizzapi runner”Start the headless runner daemon. The daemon registers with the relay server and waits for session-spawn requests from the web UI or from agents using the spawn_session tool.
# Start the runner (foreground)pizzapi runner
# Start the runner in the backgroundpizzapi runner &
# Stop a running daemonpizzapi runner stopSee the Runner Daemon guide for detailed usage.
pizzapi runner stop
Section titled “pizzapi runner stop”Send a stop signal to the currently running runner daemon.
pizzapi runner stoppizzapi web
Section titled “pizzapi web”Start the PizzaPi web hub (relay server + web UI) using Docker Compose. This is the easiest way to self-host the relay — no need to clone the repo or configure Docker manually.
Run pizzapi web --help for the full usage:
pizza web — Manage the PizzaPi web hub (server + UI via Docker Compose)
Usage: pizza web [flags] Start the web hub pizza web stop Stop the web hub pizza web logs Tail container logs pizza web status Show container status pizza web config Show current configuration pizza web config set <k> <v> Update a config value
Flags: --port <port> Set the host port (persisted to config.json) --origins <list> Set extra allowed CORS origins (comma-separated, persisted) --tag <tag> UI image tag from GHCR (default: latest) --build Build UI locally (fallback mode) --dev-ui Run the local dev UI stack (repo checkout only) -f, --foreground Run in the foreground (don't detach) --no-cache Rebuild Docker image without layer cache -h, --help Show this help
Local dev UI stack (`--dev-ui` on a repo checkout): Runs the server and `dev:ui` together in Docker; the UI stays hot-reloaded on port 5173.
Docker build args (fallback mode): PREBUILT_UI (auto) Set by pizza web based on the host prebuild result
Configuration (~/.pizzapi/web/config.json): port Host port (default: 7492) vapidSubject VAPID subject for push notifications extraOrigins Extra CORS origins, comma-separated# Start on the default port (7492)pizzapi web
# Start on a custom port (persisted for future runs)pizzapi web --port 8080
# Set extra CORS origins (persisted)pizzapi web --origins "https://example.com,https://other.com"
# Pull a specific GHCR UI tagpizzapi web --tag main
# Build the UI locally (fallback mode)pizzapi web --build
# Run the local dev UI stack (repo checkout only)pizzapi web --dev-ui
# Run in the foreground (don't detach)pizzapi web --foreground
# Managementpizzapi web stoppizzapi web logspizzapi web status| Subcommand | Description |
|---|---|
| (none) | Build and start the relay server + web UI |
stop | Stop the running web hub |
logs | Tail the container logs |
status | Show running container status |
config | Show current configuration from config.json |
config set <key> <value> | Update a config value (see below) |
| Flag | Description |
|---|---|
--port <number> | HTTP port to expose (default: 7492). Persisted to config.json. |
--origins <list> | Extra CORS origins, comma-separated. Persisted to config.json. |
--tag <tag> | UI image tag to pull from ghcr.io/pizzaface/pizzapi-ui (default: latest). |
--build | Build UI locally instead of pulling GHCR image (fallback mode). |
--dev-ui | Run the local dev UI stack from a repo checkout. |
--foreground, -f | Run in the foreground instead of detaching |
--no-cache | Rebuild Docker image without layer cache |
--help, -h | Show help |
pizzapi web config
Section titled “pizzapi web config”View the current web hub configuration:
pizzapi web configpizzapi web config set
Section titled “pizzapi web config set”Update a configuration value. Changes are saved to ~/.pizzapi/web/config.json and take effect on the next pizza web start.
pizzapi web config set port 9000pizzapi web config set extraOrigins "https://example.com"pizzapi web config set vapidSubject "mailto:ops@example.com"| Key | Default | Description |
|---|---|---|
port | 7492 | Host port to expose the web UI on |
vapidSubject | mailto:admin@pizzapi.local | VAPID subject for web push notifications |
extraOrigins | (none) | Extra allowed CORS origins, comma-separated |
All settings and persistent data are stored in ~/.pizzapi/web/:
| File | Purpose |
|---|---|
config.json | All web hub settings (port, VAPID keys, origins, etc.) |
compose.yml | Auto-generated Docker Compose config (regenerated each run) |
data/ | Persistent auth database |
VAPID keys for push notifications are generated on first run and stored in config.json. They persist across restarts and config changes — push notification subscriptions won’t break.
pizzapi usage
Section titled “pizzapi usage”Show API usage and quota information for your authenticated providers.
# Show usage for all providerspizzapi usage
# Filter to a specific providerpizzapi usage anthropicpizzapi usage gemini
# Machine-readable JSON outputpizzapi usage --jsonAnthropic (Claude)
Section titled “Anthropic (Claude)”For Anthropic OAuth subscriptions, the command fetches quota utilization from the Anthropic API:
Claude usage (OAuth subscription)────────────────────────────────────────────────────── 5-hour window 12.3% (resets 2/24/2026, 2:15:00 PM) 7-day window 8.1% (resets 3/1/2026, 9:00:00 AM) 7-day (OAuth apps) 4.2% (resets 3/1/2026, 9:00:00 AM) 7-day (Opus) 2.0% (resets 3/1/2026, 9:00:00 AM) 7-day (Sonnet) 6.5% (resets 3/1/2026, 9:00:00 AM)
Extra usage enabled Monthly limit: $100 Credits used: $12.34 Utilization: 12.3%Gemini (Google Cloud Code Assist)
Section titled “Gemini (Google Cloud Code Assist)”For Gemini OAuth credentials, the command fetches quota buckets from the Google Cloud Code Assist endpoint:
Gemini usage (Google Cloud Code Assist, OAuth) Project: my-project-123────────────────────────────────────────────────────── INPUT / gemini-2.5-pro 85.0% remaining (850 left) resets 3/1/2026, 12:00:00 AM OUTPUT / gemini-2.5-pro 92.3% remaining (923 left) resets 3/1/2026, 12:00:00 AMpizzapi models
Section titled “pizzapi models”List all AI models available through the configured providers.
# Human-readable tablepizzapi models
# Machine-readable JSONpizzapi models --jsonExample output:
provider model notes--------- ----------------------- -----anthropic claude-opus-4-5 reasoning • 200,000 ctx • Claude Opus 4.5anthropic claude-sonnet-4-20250514 200,000 ctx • Claude Sonnet 4google gemini-2.5-pro reasoning • 1,000,000 ctx • Gemini 2.5 Propizzapi plugins
Section titled “pizzapi plugins”Discover and manage Claude Code plugins. PizzaPi can load plugins designed for Claude Code — their commands become slash commands, hooks map to pi lifecycle events, and skills are shared via the Agent Skills standard.
# List all discovered plugins (global + project-local)pizzapi plugins
# Trust all untrusted local plugins in the current projectpizzapi plugins trust
# Trust a specific plugin directorypizzapi plugins trust /path/to/plugin
# Remove a plugin from the trust listpizzapi plugins untrust /path/to/plugin
# Clear the entire trust listpizzapi plugins untrust
# Show the current trust listpizzapi plugins trusted
# Show helppizzapi plugins --help| Subcommand | Description |
|---|---|
(none) / list | List all discovered plugins with trust status |
trust [path] | Trust project-local plugins. No path = trust all untrusted in cwd. |
untrust [path] | Remove from trust list. No path = clear entire list. |
trusted | Show the current trust list from ~/.pizzapi/config.json |
Trust model:
- Global plugins in
~/.pizzapi/plugins/,~/.agents/plugins/, or~/.claude/plugins/are always auto-trusted — same as global skills or extensions. - Project-local plugins in
.pizzapi/plugins/,.agents/plugins/, or.claude/plugins/under your project directory can execute shell commands via hooks. They require explicit trust before loading.
There are three ways to trust a local plugin:
- CLI:
pizza plugins trust(pre-approve before starting a session) - TUI: Interactive confirmation dialog at session start
- Web UI: Amber trust banner with Trust / Skip buttons
Once approved by any method, the trust is persisted to ~/.pizzapi/config.json so future sessions auto-load without re-prompting.
pizzapi --version
Section titled “pizzapi --version”Print the installed version number and exit.
pizzapi --version# pizzapi v1.2.3Agent Tools
Section titled “Agent Tools”PizzaPi registers several tools that are available in every agent session:
| Tool | Description |
|---|---|
spawn_session | Spawn an independent agent session on the runner |
list_models | List available models and providers |
send_message | Send a message to another agent session |
wait_for_message | Wait for a message from another session |
check_messages | Non-blocking check for pending messages |
get_session_id | Get this session’s ID |
set_session_name | Set the session display name |
update_todo | Update the session’s todo list |
subagent | Delegate tasks to specialized subagents with isolated context |
subagent
Section titled “subagent”Delegate tasks to specialized subagent processes. Each subagent runs in its own isolated context window (separate pi process), keeping the parent session’s token budget lean.
Modes:
- Single:
{ agent: "name", task: "..." }— invoke one agent - Parallel:
{ tasks: [...] }— run multiple agents concurrently (up to 4) - Chain:
{ chain: [...] }— sequential execution with{previous}output substitution
Agent definitions are loaded from ~/.pizzapi/agents/*.md (user scope) and .pizzapi/agents/*.md (project scope).
See the Subagents guide for full documentation.
Global Flags
Section titled “Global Flags”| Flag | Description |
|---|---|
--help, -h | Show help and exit |
--version, -v | Print version and exit |
--cwd <path> | Override working directory (applies to the default session command) |
Internal Commands
Section titled “Internal Commands”These commands are used internally by the daemon and should not be called directly:
| Command | Description |
|---|---|
pizzapi _daemon | Internal daemon entrypoint (spawned by the supervisor) |
pizzapi _worker | Internal worker entrypoint (spawned by the daemon for each session) |
pizzapi _terminal-worker | Internal terminal PTY worker (spawned by the daemon for terminal sessions) |