Skip to main content

Module paths

Module paths 

Source
Expand description

Platform-aware config path resolution for OpenCode.

Follows OpenCode’s documented path precedence:

  1. Remote config (.well-known/opencode) — not managed by this tool
  2. Global config (~/.config/opencode/opencode.json)
  3. Custom config (OPENCODE_CONFIG env var)
  4. Project config (./opencode.json, traversing up to git root)
  5. .opencode directories — not managed by this tool
  6. Inline config (OPENCODE_CONFIG_CONTENT env var) — not managed by this tool
  7. 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§

ConfigPaths
Resolved paths for all config layers.

Enums§

ConfigLayer
Which configuration layer to operate on.