Expand description
Platform-aware config path resolution for OpenCode.
Follows OpenCode’s documented path precedence:
- Remote config (.well-known/opencode) — not managed by this tool
- Global config (~/.config/opencode/opencode.json)
- Custom config (OPENCODE_CONFIG env var)
- Project config (./opencode.json, traversing up to git root)
- .opencode directories — not managed by this tool
- Inline config (OPENCODE_CONFIG_CONTENT env var) — not managed by this tool
- Managed config files — read-only awareness
Additional paths:
- $HOME/.opencode.json (fallback)
- $XDG_CONFIG_HOME/opencode/opencode.json (XDG fallback)
- Auth: ~/.local/share/opencode/auth.json
Structs§
- Config
Paths - Resolved paths for all config layers.
Enums§
- Config
Layer - Which configuration layer to operate on.