Real-time communication between Claude Code instances across machines and workspaces.
src/channel.js- MCP server with swarm_send/receive/status/register tools + Redis pub/subsrc/listener.js- One-shot Redis listener for background task notificationssrc/check-inbox-http.js- Hook script for inbox check on each promptsrc/init.js- CLI to initialize any workspace in one commandsrc/server.js- CLI entry point (routes to init/channel/listen)
- Redis pub/sub for real-time cross-machine messaging
- Per-workspace channels:
swarmcode:ws:<workspace-id> - Broadcast channel:
swarmcode:ws:broadcast - Background task pattern: listener exits on message → task-notification → auto-process
- Messages stored in per-workspace inbox lists with 24h TTL
npx swarmcode init <workspace-id> --redis redis://host:portSWARMCODE_REDIS_URL- Redis URL (default: redis://localhost:6379)SWARMCODE_WORKSPACE_ID- Workspace identifier