MCPcopy Create free account
hub / github.com/agenticsorg/edge-agents / findCliScript

Function findCliScript

scripts/sparc2/sparc2-cli-wrapper.js:103–119  ·  view source on GitHub ↗

* Find the CLI script (JS) * @returns {string|null} Path to the CLI script if found, null otherwise

()

Source from the content-addressed store, hash-verified

101 * @returns {string|null} Path to the CLI script if found, null otherwise
102 */
103function findCliScript() {
104 // Possible locations for the CLI script
105 const possiblePaths = [
106 // Local build directory
107 path.join(__dirname, 'build', 'cli', 'cli.js'),
108 // Global installation
109 path.join(__dirname, 'build', 'cli', 'cli.js')
110 ];
111
112 for (const p of possiblePaths) {
113 if (fs.existsSync(p)) {
114 return p;
115 }
116 }
117
118 return null;
119}
120
121/**
122 * Run the CLI using Deno directly with the TypeScript source

Callers 2

runCliFallbackFunction · 0.85
showDiagnosticsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected