MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getPluginsDirectoryName

Function getPluginsDirectoryName

src/utils/plugins/pluginDirectories.ts:34–44  ·  view source on GitHub ↗

* Get the plugins directory name based on current mode. * Uses session state (from --cowork flag) or env var. * * Priority: * 1. Session state (set by CLI flag --cowork) * 2. Environment variable CLAUDE_CODE_USE_COWORK_PLUGINS * 3. Default: 'plugins'

()

Source from the content-addressed store, hash-verified

32 * 3. Default: 'plugins'
33 */
34function getPluginsDirectoryName(): string {
35 // Session state takes precedence (set by CLI flag)
36 if (getUseCoworkPlugins()) {
37 return COWORK_PLUGINS_DIR
38 }
39 // Fall back to env var
40 if (isEnvTruthy(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS)) {
41 return COWORK_PLUGINS_DIR
42 }
43 return PLUGINS_DIR
44}
45
46/**
47 * Get the full path to the plugins directory.

Callers 1

getPluginsDirectoryFunction · 0.85

Calls 2

getUseCoworkPluginsFunction · 0.85
isEnvTruthyFunction · 0.85

Tested by

no test coverage detected