if [ -n "$BASH_VERSION" ]; then AGENT_CONTAINER_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" elif [ -n "$ZSH_VERSION" ]; then AGENT_CONTAINER_DIR="${0:A:h}" fi opencode() { python3 "$AGENT_CONTAINER_DIR/agent-container.py" opencode "$@" } claude() { python3 "$AGENT_CONTAINER_DIR/agent-container.py" claude "$@" } pi() { python3 "$AGENT_CONTAINER_DIR/agent-container.py" pi "$@" } agent-container() { python3 "$AGENT_CONTAINER_DIR/agent-container.py" "$@" } # Local variants: run the tools directly on the host, bypassing the container. # `command` skips the shell functions above so the real binaries are used. opencode-local() { command opencode "$@" } claude-local() { command claude "$@" } pi-local() { command pi "$@" }