Complete guide to installing OpenAgents Control components using the automated installer script.
# Interactive mode - choose components
bash <(curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh)
# Quick install with profile
bash <(curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh) developer
Installs to .opencode/ in your current directory.
Run the installer without arguments to get an interactive experience:
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh | bash
Interactive Flow:
Choose Installation Location
.opencode/ in current directory)~/.config/opencode/)Choose Installation Mode
Select Components (if custom mode)
Review & Confirm
Install a pre-configured set of components:
# Essential - Minimal setup with core agents
bash <(curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh) essential
# Developer - Code-focused development tools
bash <(curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh) developer
# Business - Content and business-focused tools
bash <(curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh) business
# Full - Everything except system-builder
bash <(curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh) full
# Advanced - Complete system with all components
bash <(curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh) advanced
# Download the installer
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh -o install.sh
# Make it executable
chmod +x install.sh
# Run interactively
./install.sh
# Or with a profile
./install.sh developer
Installs to .opencode/ in your current directory.
Best for:
# Default behavior
./install.sh developer
# Explicit local installation
./install.sh developer --install-dir .opencode
Result:
your-project/
├── .opencode/
│ ├── agent/
│ ├── command/
│ ├── context/
│ └── tool/
└── your-project-files...
Installs to ~/.config/opencode/ for user-wide access.
Best for:
# Using CLI argument
./install.sh developer --install-dir ~/.config/opencode
# Using environment variable
export OPENCODE_INSTALL_DIR=~/.config/opencode
./install.sh developer
Result:
~/.config/
└── opencode/
├── agent/
├── command/
├── context/
└── tool/
Install to any directory you choose.
Best for:
# Custom path
./install.sh developer --install-dir ~/my-agents
# Path with spaces (use quotes)
./install.sh developer --install-dir "~/My Agents/opencode"
# Absolute path
./install.sh developer --install-dir /opt/opencode
Use --install-dir to specify installation directory:
# Format 1: --install-dir=PATH
./install.sh developer --install-dir=~/.config/opencode
# Format 2: --install-dir PATH
./install.sh developer --install-dir ~/.config/opencode
Set OPENCODE_INSTALL_DIR for persistent configuration:
# Set once, use multiple times
export OPENCODE_INSTALL_DIR=~/.config/opencode
# Now all installations use this directory
./install.sh developer
./install.sh --list
Add to your shell profile for persistence:
# ~/.bashrc or ~/.zshrc
export OPENCODE_INSTALL_DIR=~/.config/opencode
When running in interactive mode, you'll be prompted to choose:
Choose installation location:
1) Local - Install to .opencode/ in current directory
(Best for project-specific agents)
2) Global - Install to ~/.config/opencode/
(Best for user-wide agents available everywhere)
3) Custom - Enter exact path
Examples:
Linux/Mac: /home/user/my-agents or ~/my-agents
Windows: C:/Users/user/my-agents or ~/my-agents
Enter your choice [1-3]:
Installation directory is determined by (highest to lowest priority):
--install-dir CLI argumentOPENCODE_INSTALL_DIR environment variable.opencode# Standard installation
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh | bash -s developer
# Global installation
./install.sh developer --install-dir ~/.config/opencode
# System-wide (requires sudo)
sudo ./install.sh developer --install-dir /opt/opencode
# Standard installation
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh | bash -s developer
# Global installation (XDG standard)
./install.sh developer --install-dir ~/.config/opencode
# macOS native location
./install.sh developer --install-dir ~/Library/Application\ Support/opencode
# Standard installation
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh | bash -s developer
# Global installation
./install.sh developer --install-dir ~/.config/opencode
# Windows-style path
./install.sh developer --install-dir C:/Users/username/opencode
# Same as Linux
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh | bash -s developer
# Global installation
./install.sh developer --install-dir ~/.config/opencode
Minimal setup with core agents
Components:
./install.sh essential
Code-focused development tools
Components:
./install.sh developer
Content and business-focused tools
Components:
./install.sh business
Everything except system-builder
Components:
./install.sh full
Complete system with all components
Components:
./install.sh advanced
# Check installed files
ls -la .opencode/
# Or for global installation
ls -la ~/.config/opencode/
# Copy example environment file
cp env.example .env
# Edit with your settings
nano .env
# Run OpenCode CLI
opencode
# Or use specific agents/commands
# (depends on your OpenCode CLI setup)
When installing into an existing directory, the installer detects file collisions and offers 4 options:
.opencode.backup.{timestamp}/See Collision Handling Guide for detailed information.
# Run installer again with "Skip existing" option
./install.sh developer
# When prompted for collision handling, choose:
# Option 1: Skip existing
Only new components will be installed, existing files remain unchanged.
# Run installer with "Backup & overwrite" option
./install.sh developer
# When prompted for collision handling, choose:
# Option 3: Backup & overwrite
All components updated, backup created for safety.
# Option 1: Move existing installation
mv .opencode ~/.config/opencode
# Option 2: Fresh install to new location
./install.sh developer --install-dir ~/.config/opencode
Error: curl: command not found or jq: command not found
Solution:
# macOS
brew install curl jq
# Ubuntu/Debian
sudo apt-get install curl jq
# Fedora/RHEL
sudo dnf install curl jq
# Arch Linux
sudo pacman -S curl jq
Error: Permission denied when creating directories
Solution:
# Install to a directory you own
./install.sh developer --install-dir ~/opencode
# Or create parent directory first
mkdir -p ~/.config
./install.sh developer --install-dir ~/.config/opencode
Error: Installation fails with paths containing spaces
Solution:
# Quote the path
./install.sh developer --install-dir "~/My Agents/opencode"
Error: Parent directory does not exist
Solution:
# Create parent directory first
mkdir -p ~/.config
# Then install
./install.sh developer --install-dir ~/.config/opencode
Error: This script requires Bash 3.2 or higher
Solution:
# Check your bash version
bash --version
# macOS: Install newer bash via Homebrew
brew install bash
# Linux: Update bash via package manager
sudo apt-get update && sudo apt-get upgrade bash
# List all components without installing
./install.sh --list
# Show all options and examples
./install.sh --help
# Install from a different branch
export OPENCODE_BRANCH=develop
./install.sh developer
# Set environment variables for automation
export OPENCODE_INSTALL_DIR=/opt/opencode
export OPENCODE_BRANCH=main
# Run with profile (no prompts)
./install.sh developer
| Variable | Description | Default | Example |
|---|---|---|---|
OPENCODE_INSTALL_DIR |
Installation directory | .opencode |
~/.config/opencode |
OPENCODE_BRANCH |
Git branch to install from | main |
develop |
# Download and run installer
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh | bash -s developer
# Result: Installs to .opencode/ in current directory
# Install to global config directory
./install.sh developer --install-dir ~/.config/opencode
# Now available to all projects
# Install to shared directory
sudo ./install.sh full --install-dir /opt/opencode
# Team members can access from /opt/opencode
# Project A - local installation
cd ~/projects/project-a
./install.sh developer
# Project B - different local installation
cd ~/projects/project-b
./install.sh business
# Each project has its own .opencode/ directory
# Run installer again
./install.sh developer
# Choose "Skip existing" to add only new components
# Or "Backup & overwrite" to update everything
After installation:
Review Components
ls -la .opencode/
Configure Environment
cp env.example .env
nano .env
Read Documentation
Start Using OpenCode
opencode
./install.sh --help./install.sh --listThe OpenAgents Control installer provides:
✅ Flexible installation locations - Local, global, or custom
✅ Multiple installation methods - Interactive, profile-based, or custom
✅ Cross-platform support - Linux, macOS, Windows
✅ Safe updates - Collision detection and backup options
✅ Easy to use - Simple commands, clear prompts
Choose the installation method that fits your needs and get started with OpenAgents Control!