From be9479ef751afef973f9623a613b1ca74e4a7a3f Mon Sep 17 00:00:00 2001 From: DevContainer User Date: Sun, 22 Feb 2026 16:24:19 +0000 Subject: [PATCH] feat: add OpenCode and Crush AI coding agents to Docker image Install both terminal-based AI coding agents alongside Happy Coder: - OpenCode (opencode-ai/opencode) - open-source AI coding agent - Crush (charmbracelet/crush) - OpenCode's active successor by Charm Both are installed as Go binaries to /usr/local/bin from latest GitHub releases and available to users via `opencode` and `crush` commands. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- CLAUDE.md | 3 ++- Dockerfile | 12 ++++++++++++ README.md | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index f1a14d4..90cdecd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,6 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co The Dev Container is a Docker-based cloud development environment that provides: - Web-based GUI IDE (VSCode/Antigravity) via VNC on port 5800 - Happy Coder AI assistant integration (manual startup) +- OpenCode and Crush AI coding agents (terminal-based) - Automatic GitHub repository cloning on startup - Kubernetes-native deployment with persistent home storage - MCP (Model Context Protocol) sidecars for AI assistant integrations @@ -68,7 +69,7 @@ Container start | File | Purpose | |------|---------| -| `Dockerfile` | Image definition — installs Chrome, Node.js, VSCode, Happy Coder; creates non-root user (UID 1000) | +| `Dockerfile` | Image definition — installs Chrome, Node.js, VSCode, Happy Coder, OpenCode, Crush; creates non-root user (UID 1000) | | `scripts/init-repo.sh` | Configures git credentials, clones GitHub repo | | `scripts/startapp.sh` | Calls init-repo.sh then opens VSCode in the workspace | | `chart/` | Helm chart for Kubernetes deployment | diff --git a/Dockerfile b/Dockerfile index aadb346..e800194 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,6 +64,18 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \ # Install Happy Coder and Claude Code globally RUN npm install -g happy-coder @anthropic-ai/claude-code +# Install OpenCode AI coding agent +RUN OPENCODE_VERSION=$(curl -sL https://api.github.com/repos/opencode-ai/opencode/releases/latest | jq -r '.tag_name') && \ + curl -fsSL "https://github.com/opencode-ai/opencode/releases/download/${OPENCODE_VERSION}/opencode-linux-x86_64.tar.gz" | \ + tar -xz -C /usr/local/bin opencode && \ + chmod +x /usr/local/bin/opencode + +# Install Crush AI coding agent (OpenCode successor by Charm) +RUN CRUSH_VERSION=$(curl -sL https://api.github.com/repos/charmbracelet/crush/releases/latest | jq -r '.tag_name' | sed 's/^v//') && \ + curl -fsSL "https://github.com/charmbracelet/crush/releases/download/v${CRUSH_VERSION}/crush_${CRUSH_VERSION}_Linux_x86_64.tar.gz" | \ + tar -xz --strip-components=1 -C /usr/local/bin "crush_${CRUSH_VERSION}_Linux_x86_64/crush" && \ + chmod +x /usr/local/bin/crush + # Install VSCode RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/packages.microsoft.gpg && \ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list && \ diff --git a/README.md b/README.md index dbd5dfd..848ab56 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ A containerized cloud development environment with web-based GUI access, featuri - **VSCode or Google Antigravity** via browser-based VNC (port 5800) - **SSH access** option (OpenSSH on port 22, additive with any IDE) - **Happy Coder** AI assistant backed by Claude +- **OpenCode** and **Crush** open-source AI coding agents (terminal-based) - **Automatic GitHub repo cloning** on startup - **Persistent home directory** via ReadWriteMany PVC - **Kubernetes-native** Helm chart deployment