MCPcopy
hub / github.com/claude-code-best/claude-code / getPluginsDirectory

Function getPluginsDirectory

src/utils/plugins/pluginDirectories.ts:53–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51 * 2. Default: ~/.claude/plugins or ~/.claude/cowork_plugins
52 */
53export function getPluginsDirectory(): string {
54 // expandTilde: when CLAUDE_CODE_PLUGIN_CACHE_DIR is set via settings.json
55 // `env` (not shell), ~ is not expanded by the shell. Without this, a value
56 // like "~/.claude/plugins" becomes a literal `~` directory created in the
57 // cwd of every project (gh-30794 / CC-212).
58 const envOverride = process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR
59 if (envOverride) {
60 return expandTilde(envOverride)
61 }
62 return join(getClaudeConfigHomeDir(), getPluginsDirectoryName())
63}
64
65/**
66 * Get the read-only plugin seed directories, if configured.

Callers 14

getPluginCachePathFunction · 0.85
getVersionedCachePathFunction · 0.85
installFromNpmFunction · 0.85
saveInstalledPluginsV2Function · 0.85
getKnownMarketplacesFileFunction · 0.85
getMarketplacesCacheDirFunction · 0.85
getFlaggedPluginsPathFunction · 0.85
writeToDiskFunction · 0.85

Calls 2

getPluginsDirectoryNameFunction · 0.85
expandTildeFunction · 0.50

Tested by

no test coverage detected