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

Function installFromLocal

src/utils/plugins/pluginLoader.ts:857–869  ·  view source on GitHub ↗

* Install a plugin from a local path

(
  sourcePath: string,
  targetPath: string,
)

Source from the content-addressed store, hash-verified

855 * Install a plugin from a local path
856 */
857async function installFromLocal(
858 sourcePath: string,
859 targetPath: string,
860): Promise<void> {
861 if (!(await pathExists(sourcePath))) {
862 throw new Error(`Source path does not exist: ${sourcePath}`)
863 }
864
865 await copyDir(sourcePath, targetPath)
866
867 const gitPath = join(targetPath, '.git')
868 await rm(gitPath, { recursive: true, force: true })
869}
870
871/**
872 * Generate a temporary cache name for a plugin

Callers 1

cachePluginFunction · 0.85

Calls 3

pathExistsFunction · 0.85
copyDirFunction · 0.85
rmFunction · 0.85

Tested by

no test coverage detected