@ganglia/cli 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +38 -0
  2. package/bin/gl.js +54 -0
  3. package/package.json +32 -0
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # Ganglia CLI
2
+
3
+ > 63 MCP tools + Code Mode for AI coding assistants — Claude Code, Cursor, Windsurf.
4
+
5
+ https://ganglia.dev
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @ganglia/cli
11
+ ```
12
+
13
+ or use via `npx`:
14
+
15
+ ```bash
16
+ npx @ganglia/cli --version
17
+ ```
18
+
19
+ ## Use
20
+
21
+ ```bash
22
+ cd /your/project
23
+ gl init . # embedded Cozo, no Docker
24
+ gl --help
25
+ ```
26
+
27
+ Claude Code / Cursor / Windsurf pick up the MCP server automatically after install. The binary exposes 63 tools (call graph, semantic search, cross-session memory, `gl_run` Code Mode) over the Model Context Protocol.
28
+
29
+ ## Docs
30
+
31
+ - Landing — https://ganglia.dev
32
+ - Tools reference — https://ganglia.dev/tools
33
+ - Code Mode (`gl_run`) — https://ganglia.dev/docs/code-mode
34
+ - Changelog — https://ganglia.dev/changelog
35
+
36
+ ## License
37
+
38
+ Proprietary. Free during public beta.
package/bin/gl.js ADDED
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ // Ganglia CLI launcher.
3
+ //
4
+ // On install, npm's `optionalDependencies` only resolves the single platform
5
+ // package that matches the user's OS + CPU — the other four fail to install
6
+ // silently. At runtime we locate that package and spawn its binary.
7
+
8
+ const { spawnSync } = require('child_process');
9
+ const path = require('path');
10
+
11
+ const PLATFORM = `${process.platform}-${process.arch}`;
12
+
13
+ const PKG = {
14
+ 'linux-x64': '@ganglia/cli-linux-x64',
15
+ 'linux-arm64': '@ganglia/cli-linux-arm64',
16
+ 'darwin-x64': '@ganglia/cli-darwin-x64',
17
+ 'darwin-arm64': '@ganglia/cli-darwin-arm64',
18
+ 'win32-x64': '@ganglia/cli-win32-x64',
19
+ }[PLATFORM];
20
+
21
+ if (!PKG) {
22
+ console.error(
23
+ `[ganglia] Unsupported platform: ${PLATFORM}\n` +
24
+ `Supported: linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64\n` +
25
+ `Or install manually: curl -fsSL https://ganglia.dev/install.sh | bash`,
26
+ );
27
+ process.exit(1);
28
+ }
29
+
30
+ let binary;
31
+ try {
32
+ const ext = process.platform === 'win32' ? '.exe' : '';
33
+ binary = require.resolve(`${PKG}/bin/gl${ext}`);
34
+ } catch (e) {
35
+ console.error(
36
+ `[ganglia] Platform package ${PKG} not installed.\n` +
37
+ `This usually means the platform binary wasn't published for your OS/arch yet.\n` +
38
+ `Fallback: curl -fsSL https://ganglia.dev/install.sh | bash\n\n` +
39
+ `Details: ${e.message}`,
40
+ );
41
+ process.exit(1);
42
+ }
43
+
44
+ const result = spawnSync(binary, process.argv.slice(2), {
45
+ stdio: 'inherit',
46
+ env: process.env,
47
+ windowsHide: false,
48
+ });
49
+
50
+ if (result.error) {
51
+ console.error(`[ganglia] Failed to spawn binary: ${result.error.message}`);
52
+ process.exit(1);
53
+ }
54
+ process.exit(result.status ?? 1);
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@ganglia/cli",
3
+ "version": "0.5.7",
4
+ "description": "Ganglia — 63 MCP tools + Code Mode for AI coding assistants (Claude Code, Cursor, Windsurf)",
5
+ "keywords": ["mcp", "ai", "claude", "cursor", "code-graph", "ganglia", "llm"],
6
+ "homepage": "https://ganglia.dev",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Mostafa-M-Hussein/ganglia.git"
10
+ },
11
+ "bugs": "https://github.com/Mostafa-M-Hussein/ganglia/issues",
12
+ "license": "UNLICENSED",
13
+ "author": "Moado",
14
+ "bin": {
15
+ "gl": "bin/gl.js"
16
+ },
17
+ "files": [
18
+ "bin"
19
+ ],
20
+ "os": ["linux", "darwin", "win32"],
21
+ "cpu": ["x64", "arm64"],
22
+ "optionalDependencies": {
23
+ "@ganglia/cli-linux-x64": "0.5.7",
24
+ "@ganglia/cli-linux-arm64": "0.5.7",
25
+ "@ganglia/cli-darwin-x64": "0.5.7",
26
+ "@ganglia/cli-darwin-arm64": "0.5.7",
27
+ "@ganglia/cli-win32-x64": "0.5.7"
28
+ },
29
+ "engines": {
30
+ "node": ">=18"
31
+ }
32
+ }