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

Function installFromLocal

src/utils/plugins/pluginLoader.ts:856–868  ·  view source on GitHub ↗

* Install a plugin from a local path

(
  sourcePath: string,
  targetPath: string,
)

Source from the content-addressed store, hash-verified

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