#!/usr/bin/env bash #ddev-generated ## Description: Run Codex CLI inside the web container ## Usage: codex ## Example: "ddev codex --version" set -euo pipefail INSTALL_SCRIPT="${DDEV_APPROOT}/.ddev/codex-cli/install.sh" PERSIST_BASE="${DDEV_APPROOT}/.ddev/codex-cli" PERSIST_BIN="${PERSIST_BASE}/bin/codex" "${INSTALL_SCRIPT}" export HOME="${PERSIST_BASE}/home" export CODEX_HOME="${PERSIST_BASE}/home/.codex" export XDG_CONFIG_HOME="${PERSIST_BASE}/config" export XDG_DATA_HOME="${PERSIST_BASE}/data" export XDG_STATE_HOME="${PERSIST_BASE}/state" export PATH="${PERSIST_BASE}/bin:${HOME}/.local/bin:${PATH}" unset SSH_AUTH_SOCK cd "${DDEV_APPROOT}" exec "${PERSIST_BIN}" --sandbox danger-full-access --ask-for-approval on-request "$@"