MCPcopy Create free account
hub / github.com/cortexkit/magic-context / getOpenCodeConfigDir

Function getOpenCodeConfigDir

packages/cli/src/lib/paths.ts:34–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 * match or it will create a config the plugin can't read.
33 */
34export function getOpenCodeConfigDir(): string {
35 const envDir = process.env.OPENCODE_CONFIG_DIR?.trim();
36 if (envDir) return envDir;
37 if (process.platform === "win32") {
38 return join(homedir(), ".config", "opencode");
39 }
40 const xdgConfig = process.env.XDG_CONFIG_HOME || join(homedir(), ".config");
41 return join(xdgConfig, "opencode");
42}
43
44function findOmoConfig(configDir: string): string | null {
45 const locations = [

Callers 1

detectConfigPathsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected