Problem
The grok-swarm-mcp bin entry in package.json points directly to a Python file with a Unix shebang (#!/usr/bin/env python3). On Windows, shebangs aren't natively interpreted, so the installed CLI command won't work.
"bin": {
"grok-swarm": "dist/index.js",
"grok-swarm-mcp": "src/mcp/grok_server.py" // ← broken on Windows
}
Additionally, scripts/postinstall.js references ./scripts/setup.sh which is also a bash script that won't execute on Windows. The os field in package.json includes "win32", so this is a declared-but-unsupported platform.
Proposed Fix
- Create a Node.js wrapper (
bin/grok-swarm-mcp.js) that spawns the Python interpreter to run src/mcp/grok_server.py, trying python3 then python
- Update the
grok-swarm-mcp bin entry to point to the JS wrapper
- Update
postinstall.js to detect process.platform and use appropriate commands per OS
Context
Flagged by CodeRabbit on PR #32. The existing grok-swarm bin entry (dist/index.js) doesn't have this issue since it's already a Node script.
Labels
- enhancement
- compatibility
Problem
The
grok-swarm-mcpbin entry inpackage.jsonpoints directly to a Python file with a Unix shebang (#!/usr/bin/env python3). On Windows, shebangs aren't natively interpreted, so the installed CLI command won't work.Additionally,
scripts/postinstall.jsreferences./scripts/setup.shwhich is also a bash script that won't execute on Windows. Theosfield inpackage.jsonincludes"win32", so this is a declared-but-unsupported platform.Proposed Fix
bin/grok-swarm-mcp.js) that spawns the Python interpreter to runsrc/mcp/grok_server.py, tryingpython3thenpythongrok-swarm-mcpbin entry to point to the JS wrapperpostinstall.jsto detectprocess.platformand use appropriate commands per OSContext
Flagged by CodeRabbit on PR #32. The existing
grok-swarmbin entry (dist/index.js) doesn't have this issue since it's already a Node script.Labels