MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _opencode_dir

Function _opencode_dir

graphify/install.py:1929–1938  ·  view source on GitHub ↗

OpenCode's config dir: /.opencode, or ~/.config/opencode globally. OpenCode loads plugins from /plugins/ in both. The global dir has no .opencode/ segment, so it cannot be built by joining _OPENCODE_PLUGIN_PATH onto a base the way the project one is (#3398).

(*, project: bool, project_dir: Path | None = None)

Source from the content-addressed store, hash-verified

1927
1928
1929def _opencode_dir(*, project: bool, project_dir: Path | None = None) -> Path:
1930 """OpenCode&#x27;s config dir: <project>/.opencode, or ~/.config/opencode globally.
1931
1932 OpenCode loads plugins from <dir>/plugins/ in both. The global dir has no
1933 .opencode/ segment, so it cannot be built by joining _OPENCODE_PLUGIN_PATH
1934 onto a base the way the project one is (#3398).
1935 """
1936 if project:
1937 return (project_dir or Path(".")) / ".opencode"
1938 return Path.home() / ".config" / "opencode"
1939# First line of every plugin graphify has written, back to the first one (#71).
1940_OPENCODE_PLUGIN_HEADER = "// graphify OpenCode plugin"
1941def _opencode_plugin_is_v1_only(body: str) -> bool:

Callers 5

installFunction · 0.85
_agents_installFunction · 0.85
_agents_uninstallFunction · 0.85
uninstall_allFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected