File size: 982 Bytes
aba936d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Config (OpenCode V2)

Create opencode.jsonc in your project. Add schema for validation.

Locations:
- System: /etc/opencode (Linux), /Library/Application Support/opencode (macOS), %ProgramData%\opencode (Windows)
- Global: ~/.config/opencode/opencode.jsonc
- Project: ./opencode.jsonc or ./.opencode/opencode.jsonc

Key fields:
- model: default model in provider/model format.
- default_agent: primary agent.
- update: disable/notify/auto.
- permissions: ordered allow/deny/ask rules.
- policies: allow/deny provider.use, tool.use, etc.
- agents: override/define agents.
- snapshots, watcher, formatter, media, tool_output, websearch, mcp, compaction, warming, skills, commands, instructions, references, worktree, plugins, providers.
- experimental: todo, subagent_depth, background_compaction, image_generate, location_idle_timeout.

Variables: {env:VAR}, {file:path}.

MCP config: mcp.servers (not top-level server names). disabled: true to keep configured without connecting.