MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / Install

Function Install

internal/tools/installer.go:66–75  ·  view source on GitHub ↗

Install installs the tool by executing its install_cmd through the shell.

(tool Tool, runner CommandRunner, stdout, stderr io.Writer)

Source from the content-addressed store, hash-verified

64
65// Install installs the tool by executing its install_cmd through the shell.
66func Install(tool Tool, runner CommandRunner, stdout, stderr io.Writer) (int, error) {
67 if runner == nil {
68 runner = ShellRunner{}
69 }
70 if strings.TrimSpace(tool.InstallCmd) == "" {
71 return 0, ErrNoInstallCommand
72 }
73 name, args := shellCommand(tool.InstallCmd)
74 return runner.Run(name, args, stdout, stderr)
75}
76
77// Uninstall best-effort removes the tool. npm-installed tools are removed via
78// `npm uninstall -g <pkg>`; for other install styles we fall back to deleting

Callers 4

InstallMethod · 0.92
lifecycleCommandMethod · 0.92

Calls 2

shellCommandFunction · 0.85
RunMethod · 0.65