Skip to content

Latest commit

 

History

History
306 lines (230 loc) · 4.15 KB

File metadata and controls

306 lines (230 loc) · 4.15 KB

Configuration Guide

OpenCode Configuration

opencode.json

The main configuration file is opencode.json in the repository root. This is a sanitized template - you should copy it to your OpenCode config directory:

cp opencode.json ~/.config/opencode/opencode.json

Key Configuration Sections

Providers

{
  "provider": {
    "fireworks-ai": {
      "options": {
        "baseURL": "https://sinatorpool-router.delqhi.com/inference/v1",
        "apiKey": "your-api-key"
      }
    }
  }
}

Models

{
  "model": {
    "default": "accounts/fireworks/models/deepseek-v4-flash",
    "vision": "accounts/fireworks/routers/kimi-k2p6-turbo"
  }
}

Skills

{
  "skills": {
    "enabled": true,
    "directory": "~/.config/opencode/skills"
  }
}

Plugins

{
  "plugins": {
    "enabled": true,
    "directory": "~/.config/opencode/plugins"
  }
}

Agent Configuration

SIN-Zeus Agent

{
  "agents": {
    "sin-zeus": {
      "enabled": true,
      "role": "orchestrator",
      "max_agents": 10
    }
  }
}

OMOC Swarm

{
  "agents": {
    "omoc-swarm": {
      "enabled": true,
      "mode": "parallel",
      "max_workers": 5
    }
  }
}

Environment Variables

Required

# Fireworks AI API Key
export FIREWORKS_AI_API_KEY="fw_..."

# GitHub Token
export GITHUB_TOKEN="ghp_..."

# OpenCode API Key
export OPENCODE_API_KEY="oc_..."

Optional

# Antigravity API Key
export ANTIGRAVITY_API_KEY="ag_..."

# Qwen API Key
export QWEN_API_KEY="qwen_..."

# OpenRouter API Key
export OPENROUTER_API_KEY="or_..."

Plugin Configuration

Antigravity Plugin

# Install
npm install -g @opencode/plugin-antigravity

# Configure
opencode plugin config antigravity
# Enter your API key when prompted

Qwen Plugin

# Install
npm install -g @opencode/plugin-qwen

# Configure
opencode plugin config qwen
# Enter your API key when prompted

OpenRouter Plugin

# Install
npm install -g @opencode/plugin-openrouter

# Configure
opencode plugin config openrouter
# Enter your API key when prompted

Skill Configuration

Browser Automation

{
  "skills": {
    "browser-automation": {
      "cdp_port": 9222,
      "headless": false,
      "user_data_dir": "~/Library/Application Support/Google Chrome"
    }
  }
}

GitHub Management

{
  "skills": {
    "github-mgmt": {
      "token": "${GITHUB_TOKEN}",
      "org": "SIN-Hermes-Bundles"
    }
  }
}

Command Configuration

Swarm Orchestration

{
  "commands": {
    "swarm": {
      "max_agents": 10,
      "timeout": 300,
      "retry_count": 3
    }
  }
}

Terminal Management

{
  "commands": {
    "terminal": {
      "default_shell": "zsh",
      "max_sessions": 5
    }
  }
}

Advanced Configuration

Custom Skills

To create a custom skill:

# Create skill directory
mkdir -p ~/.config/opencode/skills/my-skill

# Create SKILL.md
cat > ~/.config/opencode/skills/my-skill/SKILL.md << 'EOF'
# My Custom Skill

## Description
Describe what this skill does.

## Usage
```bash
opencode skill run my-skill

Parameters

  • param1: Description
  • param2: Description EOF

### Custom Commands

To create a custom command:

```bash
# Create command file
mkdir -p ~/.config/opencode/commands

cat > ~/.config/opencode/commands/my-command << 'EOF'
#!/bin/bash
# My Custom Command

echo "Running my command..."
# Your logic here
EOF

chmod +x ~/.config/opencode/commands/my-command

Troubleshooting

Config not loading

# Check config syntax
opencode config validate

# Reset config
opencode config reset

# Reload config
opencode config reload

Plugin not working

# Check plugin status
opencode plugin list

# Reinstall plugin
opencode plugin install <plugin-name>

# Check plugin logs
opencode plugin logs <plugin-name>

Migration

From v1 to v2

# Backup old config
cp ~/.config/opencode/opencode.json ~/.config/opencode/opencode.json.bak

# Run migration
./install.sh --migrate

# Verify
opencode config validate

Last updated: 2026-05-30 Version: 2025.1