Skip to main content

opencode_config_dir

Function opencode_config_dir 

Source
pub fn opencode_config_dir() -> Option<PathBuf>
Expand description

Resolve the OpenCode global config directory.

OpenCode follows XDG conventions on all platforms: it reads $XDG_CONFIG_HOME/opencode when the env var is set, and falls back to ~/.config/opencode otherwise — including on macOS where dirs::config_dir() would incorrectly return ~/Library/Application Support/.