The OpenCode Agents installer is designed to work across multiple platforms and bash versions.
# Standard installation
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash
# Profile-based installation
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s core
Dependencies:
# Install via Homebrew
brew install curl jq
# Standard installation
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash
# Profile-based installation
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s developer
Dependencies:
Ubuntu / Debian
sudo apt-get update
sudo apt-get install curl jq
Fedora / RHEL / CentOS
sudo dnf install curl jq
Arch Linux
sudo pacman -S curl jq
Alpine Linux
apk add curl jq bash
Install Git for Windows:
Run Installer:
# Standard installation
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash
# Profile-based installation
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s full
Setup WSL:
# In PowerShell (Admin)
wsl --install
Run Installer:
# In WSL terminal
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash
Dependencies:
# Ubuntu/Debian on WSL
sudo apt-get update
sudo apt-get install curl jq
# Download the script
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh" -OutFile "install.sh"
# Run with Git Bash
& "C:\Program Files\Git\bin\bash.exe" install.sh core
# Or with WSL
wsl bash install.sh core
| Platform | Bash Version | Status | Notes |
|---|---|---|---|
| macOS 13+ | 3.2.57 | ✅ Pass | Default system bash |
| macOS 13+ | 5.2 (Homebrew) | ✅ Pass | Upgraded bash |
| Ubuntu 22.04 | 5.1.16 | ✅ Pass | Default |
| Ubuntu 20.04 | 5.0.17 | ✅ Pass | Default |
| Debian 11 | 5.1.4 | ✅ Pass | Default |
| Fedora 38 | 5.2.15 | ✅ Pass | Default |
| Arch Linux | 5.2.21 | ✅ Pass | Default |
| Alpine 3.18 | 5.2.15 | ✅ Pass | Requires bash package |
| Git Bash (Windows) | 4.4.23 | ✅ Pass | Git for Windows |
| WSL2 Ubuntu | 5.1.16 | ✅ Pass | Default |
The installer is specifically designed to work with bash 3.2 (macOS default):
✅ No mapfile usage - Uses while-read loops instead
✅ No process substitution issues - Uses temp files for compatibility
✅ POSIX-compliant - Avoids bash 4+ specific features
✅ Array operations - Uses bash 3.2 compatible syntax
✅ Platform detection - Automatically detects macOS/Linux/Windows
✅ Color support detection - Disables colors on unsupported terminals
✅ Path handling - Works with Unix and Windows paths
✅ Line endings - Handles both LF and CRLF
Run the compatibility test to verify your system:
# Download and run the test
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/scripts/tests/test-compatibility.sh | bash
Or manually:
# Clone the repo
git clone https://github.com/darrenhinde/opencode-agents.git
cd opencode-agents
# Run the test
bash scripts/tests/test-compatibility.sh
The test checks:
Cause: Using bash version < 4.0
Solution: This should be fixed in the latest version. Update the installer:
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh > install.sh
bash install.sh core
Cause: curl is not installed
Solution:
# macOS
brew install curl
# Ubuntu/Debian
sudo apt-get install curl
# Fedora/RHEL
sudo dnf install curl
# Windows: Install Git for Windows (includes curl)
Cause: jq is not installed
Solution:
# macOS
brew install jq
# Ubuntu/Debian
sudo apt-get install jq
# Fedora/RHEL
sudo dnf install jq
# Windows Git Bash
curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
Cause: Terminal doesn't support ANSI colors
Solution: Use Windows Terminal, Git Bash, or WSL instead of cmd.exe
Cause: Insufficient permissions
Solution:
# Don't use sudo with the installer
# It installs to .opencode/ in current directory
# If you need to install globally:
sudo bash install.sh core
Cause: PowerShell can't run bash scripts directly
Solution: Use Git Bash or WSL:
# Download first
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh" -OutFile "install.sh"
# Run with Git Bash
& "C:\Program Files\Git\bin\bash.exe" install.sh
❌ Not Supported - Use Git Bash or WSL instead
❌ Not Supported - Upgrade bash or use a different system
❌ Not Supported - Installer requires internet to download components
Workaround: Use manual installation (clone repo and copy files)
If you can't use the installer:
# 1. Clone or download the repository
git clone https://github.com/darrenhinde/opencode-agents.git
cd opencode-agents
# 2. Copy to OpenCode directory
mkdir -p ~/.opencode
cp -r .opencode/agent ~/.opencode/
cp -r .opencode/command ~/.opencode/
cp -r .opencode/context ~/.opencode/
cp -r .opencode/tool ~/.opencode/
cp -r .opencode/plugin ~/.opencode/
# 3. Configure environment
cp env.example .env
# Edit .env with your settings
If you encounter issues:
Run the compatibility test:
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/scripts/tests/test-compatibility.sh | bash
Check your bash version:
bash --version
Verify dependencies:
curl --version
jq --version
Report issues:
✅ macOS - Works out of the box (bash 3.2+)
✅ Linux - Works on all major distributions
✅ Windows - Use Git Bash or WSL
✅ Bash 3.2+ - Fully compatible
✅ Cross-platform - Same commands everywhere
The installer is designed to "just work" on any modern system with bash 3.2+.