Installation
Requirements
Section titled “Requirements”| Requirement | Minimum |
|---|---|
| Node.js or Bun | Node 18+ or Bun 1.x |
| OS | Linux, macOS, Windows |
| For self-hosting | Docker + Docker Compose |
Install the CLI
Section titled “Install the CLI”npm install -g @pizzapi/pizzapizzapi --versionbun install -g @pizzapi/pizzapizzapi --version# Run without installing — always uses the latest versionnpx @pizzapi/pizzaDownload a binary for your platform from the GitHub Releases page and put it on your PATH.
| Platform | Architectures |
|---|---|
| Linux | x64, arm64 |
| macOS | x64, arm64 (Apple Silicon) |
| Windows | x64 |
# Linux / macOS examplecurl -L https://github.com/Pizzaface/PizzaPi/releases/latest/download/pizzapi-linux-x64 \ -o pizzapichmod +x pizzapisudo mv pizzapi /usr/local/bin/pizzapi --versionFirst-Run Setup
Section titled “First-Run Setup”Connect the CLI to your relay server:
pizzapi setupYou’ll be prompted for:
| Prompt | Default | Description |
|---|---|---|
| Relay server URL | http://localhost:7492 | HTTP(S) address of the relay server |
| Your name | — | Optional; only used when creating a new account |
| — | Account email | |
| Password | — | Account password |
On success the CLI saves your API key to ~/.pizzapi/config.json and prints the derived WebSocket URL used for streaming.
Verify the Installation
Section titled “Verify the Installation”# Show the installed versionpizzapi --version
# List available AI modelspizzapi models
# Show API usagepizzapi usageUpdating
Section titled “Updating”npm update -g @pizzapi/pizza# — or —bun update -g @pizzapi/pizzaFiles & Directories Created by PizzaPi
Section titled “Files & Directories Created by PizzaPi”PizzaPi stores all its data under ~/.pizzapi/. Here’s what each file is for:
| Path | Created by | Purpose |
|---|---|---|
~/.pizzapi/config.json | pizzapi setup / manual | CLI config: API key, relay URL, skills, hooks |
~/.pizzapi/auth.json | /login inside a session | AI provider credentials (OAuth tokens, API keys) |
~/.pizzapi/models.json | first session start | Cached model registry |
~/.pizzapi/runner.json | pizzapi runner (first start) | Runner identity, name, and PID tracking (auto-generated) |
~/.pizzapi/usage-cache.json | pizzapi runner | Shared provider quota cache (written by daemon, read by workers) |
~/.pizzapi/logs/ | macOS LaunchAgent setup | Log files for runner stdout/stderr |
~/.pizzapi/web/config.json | pizzapi web | Web hub settings (port, VAPID keys, origins) |
~/.pizzapi/web/compose.yml | pizzapi web | Auto-generated Docker Compose file (regenerated each run) |
~/.pizzapi/web/data/ | pizzapi web | Persistent SQLite database for user accounts |
~/.pizzapi/web/repo/ | pizzapi web | Cloned PizzaPi source repo |
~/.pizzapi/skills/ | manual | Global personal skills |
~/.pizzapi/usage.db | first session | SQLite database tracking token consumption, costs, and session analytics. Safe to delete (loses analytics history). |
~/.pizzapi/session-list-cache.json | pizzapi runner | Cache of session metadata with mtime-based invalidation. Safe to delete (rebuilds automatically on next session list). |
Project-local config (.pizzapi/config.json) is stored in each project’s directory and is not part of the global ~/.pizzapi/ tree.
Upgrading from pi
Section titled “Upgrading from pi”If you previously used the raw pi coding agent, PizzaPi automatically migrates your existing data on first startup. No manual steps are required.
The migration runs in two phases:
- Phase 1 —
~/.pi/agent/→~/.pizzapi/: Copies sessions, auth, and other data from a legacypiinstall into the PizzaPi config directory. - Phase 2 —
~/.pizzapi/agent/→~/.pizzapi/: Flattens an older PizzaPi layout where data was nested under~/.pizzapi/agent/(caused by an earlier upstreamgetAgentDir()path). Files are merged into the flat~/.pizzapi/structure.
Both phases are idempotent — they skip files that already exist at the destination and write a .migrated marker so they don’t re-scan on subsequent startups. It’s safe to re-run (e.g., if you reinstall).
Resetting Configuration
Section titled “Resetting Configuration”Re-run setup (switch relay or update credentials)
Section titled “Re-run setup (switch relay or update credentials)”To switch to a different relay server or update your credentials at any time:
pizzapi setupThis overwrites the apiKey in ~/.pizzapi/config.json and prints the WebSocket URL to add to your config. After setup, manually add the relay URL if it’s not the default:
{ "apiKey": "pk_live_...", "relayUrl": "wss://your-relay.example.com"}Disconnect from the relay (relay-free mode)
Section titled “Disconnect from the relay (relay-free mode)”To stop connecting to a relay without uninstalling:
# Add to ~/.pizzapi/config.json:# "relayUrl": "off"
# — or — use an environment variable:PIZZAPI_RELAY_URL=off pizzapiSee the Standalone Mode guide for details.
Reset AI provider credentials
Section titled “Reset AI provider credentials”To log out of all AI providers and start fresh with /login:
rm ~/.pizzapi/auth.jsonrm ~/.pizzapi/models.jsonNext time you start pizzapi, you’ll see “No models available” and can run /login to re-authenticate.
Reset runner identity
Section titled “Reset runner identity”The runner identity is auto-generated on first start. To assign a new identity (useful if you’ve cloned a machine or want a fresh runner registration):
# Stop the runner firstpizzapi runner stop
# Remove the identity filerm ~/.pizzapi/runner.json
# Restart — a new ID is generated automaticallypizzapi runnerReset the web hub
Section titled “Reset the web hub”To wipe the relay server’s database and start fresh (all user accounts and session metadata will be lost):
# Stop the web hub firstpizzapi web stop
# Remove only the database (preserves config, VAPID keys, etc.)rm -rf ~/.pizzapi/web/data/
# Restart — a fresh database is created on next startpizzapi webTo also reset the web hub configuration (port, VAPID keys, origins):
pizzapi web stoprm -rf ~/.pizzapi/web/pizzapi web # all defaults restored; new VAPID keys generatedUninstalling
Section titled “Uninstalling”1. Stop any running processes
Section titled “1. Stop any running processes”# Stop the runner daemon (if running)pizzapi runner stop
# Stop the web hub (if running)pizzapi web stop2. Remove the CLI
Section titled “2. Remove the CLI”npm uninstall -g @pizzapi/pizzabun remove -g @pizzapi/pizza# Remove the binary from wherever you placed itwhich pizzapi # find itsudo rm $(which pizzapi)3. Remove all PizzaPi data
Section titled “3. Remove all PizzaPi data”# Removes config, credentials, sessions, web hub data — everythingrm -rf ~/.pizzapiOr remove selectively:
rm ~/.pizzapi/config.json # relay credentials onlyrm ~/.pizzapi/auth.json # AI provider credentials onlyrm -rf ~/.pizzapi/web/ # web hub only4. Remove macOS LaunchAgent (if installed)
Section titled “4. Remove macOS LaunchAgent (if installed)”If you set up the runner as a macOS LaunchAgent:
launchctl unload ~/Library/LaunchAgents/com.pizzapi.runner.plistrm ~/Library/LaunchAgents/com.pizzapi.runner.plist5. Remove systemd service (Linux, if installed)
Section titled “5. Remove systemd service (Linux, if installed)”sudo systemctl stop pizzapi-runnersudo systemctl disable pizzapi-runnersudo rm /etc/systemd/system/pizzapi-runner.servicesudo systemctl daemon-reload