Skip to content

v1.0.0

Choose a tag to compare

@aangelinsf aangelinsf released this 14 Nov 15:56
· 2 commits to main since this release
a842943

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.1 on macOS, or on the local address containers use to reach the host elsewhere. Never 0.0.0.0 by default.
  • Every request needs Authorization: Bearer <token>. Each project gets a random token at .ddev/cli-relay/token (mode 600, git-ignored), created on ddev start.
  • Requests from browsers (an Origin header, or a non-JSON content type) are refused.
  • Only allowlisted tools run, resolved once at startup. Extend the list with AI_RELAY_ALLOWED_BINARIES or .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 python3 on the host PATH. 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 restart

Clients must send the token: use ai_provider_cli 1.0.0-alpha1 or newer.