A simple tool for switching between multiple OhMyOpenAgent configurations.
- 🔄 Quick switch between multiple OMO configurations
- 📁 Profile-based configuration management
- 🔧 Easy to create and manage custom profiles
- 🌍 Cross-platform support (macOS, Linux, Windows WSL)
- 📦 One-click installation
curl -fsSL https://raw.githubusercontent.com/wycto/omo-switch/main/install.sh | bash# Clone the repository
git clone https://github.com/wycto/omo-switch.git
cd omo-switch
# Run the installer
chmod +x install.sh
./install.sh- Install WSL or Git for Windows
- Open WSL/Git Bash terminal
- Run the installation command above
# Initialize profiles (first time only)
omo-switch init
# List available profiles
omo-switch list
# Switch to a profile
omo-switch use work
# Check current status
omo-switch statusEach project can have its own OMO configuration. Use the --local flag:
# Initialize project-level profiles
cd /path/to/your/project
omo-switch init --local
# Switch project-level profile
omo-switch use work --local
# List project-level profiles
omo-switch list --local
# View all profile status (user + project level)
omo-switch statusThe auto command detects your configured API keys and generates a profile with free models:
omo-switch autoSupported free model providers:
| Provider | Required Env Var | Free Models |
|---|---|---|
| Google Gemini | GEMINI_API_KEY |
gemini-2.5-flash |
| Groq | GROQ_API_KEY |
llama-4-maverick, qwq-32b |
| OpenRouter | OPENROUTER_API_KEY |
deepseek-chat:free, gemini-flash:free |
The auto mode re-detects on every run — the model list may change based on provider free-tier policies.
| Profile | Description | Models |
|---|---|---|
work |
Production code, important projects | Claude + GPT-5 |
personal |
Personal projects, learning | Free models |
experiment |
Testing new models | GPT-5 + o3 |
cost-saving |
Budget-friendly | All free models |
auto |
Auto-detect | Dynamically detects available free models |
| Command | Description |
|---|---|
omo-switch use <profile> |
Switch to user-level profile |
omo-switch use <profile> --local |
Switch to project-level profile |
omo-switch show <profile> |
View profile contents |
omo-switch auto |
Auto-detect free models and generate profile |
omo-switch list |
List user-level profiles |
omo-switch list --local |
List project-level profiles |
omo-switch status |
Show all profile status |
omo-switch init |
Initialize user-level profiles directory |
omo-switch init --local |
Initialize project-level profiles directory |
omo-switch default |
Restore default configuration |
omo-switch help |
Show help message |
Use -l as shorthand for --local.
Add a .jsonc file to ~/.config/opencode/profiles/:
cat > ~/.config/opencode/profiles/my-profile.jsonc << 'EOF'
{
"agents": {
"sisyphus": {
"model": "your-preferred-model"
}
}
}
EOF
omo-switch my-profileAdd a .jsonc file to <project>/.opencode/profiles/:
# Interactive creation
omo-switch add --local
# Or manually
mkdir -p .opencode/profiles
cat > .opencode/profiles/my-project.jsonc << 'EOF'
{
"agents": {
"sisyphus": {
"model": "your-preferred-model"
}
}
}
EOF
omo-switch my-project --local| Variable | Description | Default |
|---|---|---|
OPENCODE_CONFIG_DIR |
Custom OpenCode config directory | ~/.config/opencode |
- Profile files are stored in
~/.config/opencode/profiles/ - Switching writes to
~/.config/opencode/oh-my-openagent.jsonc - Original configuration is backed up before switching
- Profile files are stored in
<project>/.opencode/profiles/ - Switching writes to
<project>/.opencode/oh-my-openagent.jsonc - Project-level profiles take priority over user-level profiles
The active profile is applied when you restart OpenCode.
omo-switch init will NOT overwrite existing configurations:
- If
~/.config/opencode/profiles/already contains config files, it will show "Profile directory already exists" - To reinitialize, manually delete the directory first:
# Reinitialize
rm -rf ~/.config/opencode/profiles/
omo-switch initomo-switch can be used without OpenCode/OhMyOpenAgent installed:
- ✅ Can create profile files
- ✅ Can switch between profiles
⚠️ Profiles won't take effect until OMO is installed and enabled
During initialization, it will detect your environment:
- OpenCode not found → Shows installation instructions
- OhMyOpenAgent not found → Shows installation instructions
- User can choose to continue creating profiles (will take effect after installing OMO)
| Platform | Status | Notes |
|---|---|---|
| macOS (Intel/Apple Silicon) | ✅ Full support | |
| Linux (x86_64/ARM) | ✅ Full support | |
| Windows (WSL) | ✅ Full support | Recommended for Windows |
| Windows (Git Bash) | Some features may differ | |
| Windows (native) | ❌ Not supported | Use WSL instead |
omo-switch --uninstallOr manually:
rm ~/.config/opencode/omo-switch
rm ~/.local/bin/omo-switchContributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details.
- OhMyOpenAgent - The amazing multi-agent system for OpenCode
- OpenCode - The AI coding agent that started it all