If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.
This DDEV add-on provides a fully containerized, isolated environment for the Pi Coding Agent.
~/.pi directory is explicitly not mounted, so agent state is scoped strictly to the project and avoids cross-contamination with your host environment./var/www/html with read/write permissions, allowing Pi to interact with your codebase.~/.ssh) are mounted.PI_OFFLINE=1, PI_SKIP_VERSION_CHECK=1, PI_TELEMETRY=0) are disabled by default to keep the container self-contained and avoid unexpected outbound traffic.trebormc/ddev-ai-ssh add-on (installed automatically as a dependency)ddev addon get mxr576/ddev-pi
ddev restart
The Pi agent runs as a DDEV service under the pi profile. You must start DDEV with that profile active.
ddev start --profiles=pi
ddev pi wrapper:
ddev pi [command]
Example:
ddev pi status
Note: The
ddev picommand is a thin wrapper that runsddev exec --service=pi pi "$@"inside the sidecar container. The container’s working directory is/var/www/html(your project root).
Pi supports two types of extensions:
ddev pi install <addon-ref>. These are stored in .ddev/pi/global/ and are local to your environment. Do not commit this directory to VCS.ddev pi install -l <addon-ref>. These are stored in the project’s .pi/ directory. Commit this directory to VCS so that extensions are shared across your team.To remove extensions, use ddev pi remove (global) or ddev pi remove -l (project).
Default configurations are initialized in your project’s .pi/ directory during installation (settings.json is copied from the add-on defaults). Modify settings.json there to configure providers and agent preferences.
Note: Re-running
ddev addon getwill not overwrite an existing.pi/directory. Defaults are only copied when.pi/is empty.
ddev addon remove pi
The .pi/ folder in your project root and the pi-agent Docker volume are not removed automatically. Clean them up manually if needed:
# Remove the project Pi configuration
rm -rf .pi/
# Remove the named Docker volume
docker volume rm ddev-<your-project-name>-pi-agent
Contributed and maintained by @mxr576. The initial proof of concept and early development were sponsored by Pronovix.
If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.