Repository navigation
v1.0.0
First release.
A DDEV add-on that runs a small HTTP relay on the host, so code inside the DDEV web container (for example the Drupal ai_provider_cli module) can run AI CLI tools installed on the host: claude, codex, gemini, opencode, ollama, lms, llm.
Security
- Listens on
127.0.0.1on macOS, or on the local address containers use to reach the host elsewhere. Never0.0.0.0by default. - Every request needs
Authorization: Bearer <token>. Each project gets a random token at.ddev/cli-relay/token(mode 600, git-ignored), created onddev start. - Requests from browsers (an
Originheader, or a non-JSON content type) are refused. - Only allowlisted tools run, resolved once at startup. Extend the list with
AI_RELAY_ALLOWED_BINARIESor.ddev/cli-relay/allowed-binaries.txt. - Treat the token as equivalent to a shell on the host: allowed tools accept arguments that can run commands. See the README's Security section and ADR 0001.
Requirements
- DDEV v1.24.0 or newer.
- Python 3.12 or newer as
python3on the hostPATH. macOS's/usr/bin/python3(3.9) is too old:brew install python. - Tested on macOS (OrbStack). Linux and WSL2 bind detection is untested.
Install
ddev add-on get Performant-Labs/ddev-cli-relay && ddev restartClients must send the token: use ai_provider_cli 1.0.0-alpha1 or newer.