Skip to content

Open Code Config

A reference configuration for a project that uses the toolbox. Adjust paths, MCP servers, and permissions to the project.

{
  "$schema": "https://opencode.ai/config.json",
  "default_agent": "Orchestrator",
  "model": "github-copilot/claude-sonnet-5.5",
  "instructions": ["AGENTS.md"],
  // Agents and commands: .opencode/{agents,commands} symlink into .agents/. Skills: .agents/skills is auto-discovered.
  "plugins": ["open-codebase-index"],
  "watcher": {
    "ignore": [
      "reference/**",
      "site/**",
      ".venv/**",
      ".turbo/**",
      ".cache/**",
      "**/dist/**",
      "**/coverage/**",
    ],
  },
  "mcp": {
    "servers": {
      "dev-tools": {
        "type": "local",
        "command": ["node", "tools/mcp/src/dev-tools/index.ts"],
      },
      "git": {
        "type": "local",
        "command": ["node", "tools/mcp/src/git/index.ts"],
      },
    },
  },
  "permissions": [
    { "action": "edit", "resource": "reference/**", "effect": "deny" },
    { "action": "edit", "resource": "pnpm-lock.yaml", "effect": "deny" },
    { "action": "shell", "resource": "git push *", "effect": "deny" },
    { "action": "shell", "resource": "git reset --hard*", "effect": "deny" },
    { "action": "shell", "resource": "git clean*", "effect": "deny" },
    { "action": "shell", "resource": "*--no-verify*", "effect": "deny" },
    { "action": "shell", "resource": "rm -r*", "effect": "deny" },
  ],
  "update": "notify",
  "experimental": {
    "todo": true,
    "subagent_depth": 2,
    //"background_compaction": true,
    //"image_generate": { "model": "openai/gpt-image-2" },
    //"location_idle_timeout": "4 hours",
  },
}