Skip to content

Instantly share code, notes, and snippets.

@pythoninthegrass
Last active December 30, 2025 18:17
Show Gist options
  • Select an option

  • Save pythoninthegrass/d25e8293b9e0e3b70cc1e91a273d0c1b to your computer and use it in GitHub Desktop.

Select an option

Save pythoninthegrass/d25e8293b9e0e3b70cc1e91a273d0c1b to your computer and use it in GitHub Desktop.
opencode config
CONTEXT7_API_KEY=
opencode.jsonc
{
"$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
"google_auth": false,
"sisyphus_agent": {
"disabled": false,
"default_builder_enabled": false,
"planner_enabled": true,
"replace_plan": true
},
"agents": {
"Sisyphus": {
"model": "anthropic/claude-opus-4-5",
"temperature": 0.3
},
"Builder-Sisyphus": {
"model": "anthropic/claude-sonnet-4"
},
"Planner-Sisyphus": {
"model": "opencode/gpt-5.2",
"permission": {
"edit": "ask",
"bash": "ask",
"webfetch": "allow",
"external_directory": "allow"
}
},
"oracle": {
"model": "opencode/gpt-5.2"
},
"librarian": {
"model": "opencode/gemini-3-flash"
},
"explore": {
"model": "opencode/grok-code",
"permission": {
"edit": "deny",
"bash": "ask",
"webfetch": "allow"
}
},
"frontend-ui-ux-engineer": {
"model": "opencode/gemini-3-pro"
},
"document-writer": {
"model": "opencode/gemini-3-flash"
},
"multimodal-looker": {
"model": "opencode/gemini-3-flash"
}
},
"disabled_agents": [ "frontend-ui-ux-engineer" ]
}
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["oh-my-opencode"],
"theme": "tokyonight",
"autoupdate": true,
"keybinds": {
"input_newline": "shift+return,ctrl+j"
},
"provider": {
"ollama": {
"npm": "@ai-sdk/openai-compatible",
"name": "Ollama (local)",
"options": {
"baseURL": "http://localhost:11434/v1"
},
"models": {
"gpt-oss:20b": {
"name": "gpt-oss 20B"
},
"gpt-oss:120b": {
"name": "gpt-oss 120B"
},
"qwen3-coder:30b": {
"name": "Qwen 3 Coder 30B"
}
}
}
},
"mcp": {
"backlog": {
"type": "local",
"command": [ "backlog", "mcp", "start" ],
"enabled": true
},
"context7": {
"type": "local",
"command": [
"npx",
"-y",
"@upstash/context7-mcp",
"--api-key",
"$CONTEXT7_API_KEY"
],
"enabled": true
},
"playwright": {
"type": "local",
"command": [ "npx", "@playwright/mcp@latest" ],
"enabled": false
},
"serena": {
"type": "local",
"command": [
"uvx",
"--from",
"git+https://github.com/oraios/serena",
"serena",
"start-mcp-server"
],
"enabled": true
},
"screencap": {
"type": "local",
"command": [
"uv",
"--directory",
"$HOME/git/screencap",
"run",
"server.py"
],
"environment": {
"UV_PROJECT_ENVIRONMENT": "$HOME/git/screencap/.venv"
},
"enabled": false
}
}
}
@pythoninthegrass
Copy link
Author

pythoninthegrass commented Sep 15, 2025

Clone gist and symlink to config dir

# install
curl -fsSL https://opencode.ai/install | bash
bunx oh-my-opencode install

# setup
git clone git@gist.github.com:d25e8293b9e0e3b70cc1e91a273d0c1b.git opencode_config && cd $_
mkdir -p ~/.config/opencode
ln -s $(pwd)/opencode.jsonc ~/.config/opencode/opencode.jsonc
ln -s $(pwd)/oh-my-opencode.jsonc ~/.config/opencode/oh-my-opencode.jsonc
cp .env.example .env
# fill out env vars

Add this snippet to ~/.bash_aliases

# opencode
if [[ -f "$HOME/git/opencode_config/.env" ]]; then
  export $(grep -v '^#' "$HOME/git/opencode_config/.env" | xargs)
  envsubst '$CONTEXT7_API_KEY $HOME $UV_PROJECT_ENVIRONMENT' \
    <"$HOME/git/opencode_config/opencode.jsonc.tpl" \
    >"$HOME/git/opencode_config/opencode.jsonc"
    alias oc='opencode "$@"'
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment