Skip to main content

config_dir

Function config_dir 

Source
pub fn config_dir(home: &Path) -> PathBuf
Expand description

Resolve OpenCode’s global config directory.

~/.config/opencode on every platform — OpenCode uses the XDG layout on Windows too, and so does the rest of lean-ctx: the rules file, skills, detection and uninstall all address home/.config/opencode. Special-casing %APPDATA% here would point the MCP writer and doctor at a directory the uninstaller never visits and the rules writer never fills — and would make every caller that passes a test home write to the real user profile.