An interactive command-line interface for collaborating with multiple AI systems (Claude and GPT-5) simultaneously.
- 🎨 Color-coded output - Claude (Blue) and GPT-5 (Green)
- 🔄 Real-time streaming - Live responses from both AIs
- 📊 Side-by-side comparison - Compare AI responses
- 📜 Conversation history - Track all interactions
- 🤖 Idle swarm control - Manage background AI workers
- 💾 Session management - Export/import sessions
- 🎯 Targeted commands - Ask specific AIs
- 🤝 Collaboration mode - Explicit multi-AI cooperation
cd multi-ai-collab
npm install
npm run buildnpm start
# or
multi-ai# Send to both AIs
multi-ai instruct "Create a REST API for user authentication"
# Ask specific AI
multi-ai ask claude "What are SOLID principles?"
multi-ai ask gpt5 "Optimize this algorithm"
# Collaboration mode
multi-ai collaborate "Build a real-time chat application"
# Control swarm
multi-ai swarm start
multi-ai swarm stop
# View status
multi-ai status
# View history
multi-ai history --limit 10
# Compare responses
multi-ai compare
# Export session
multi-ai export --file session.json| Command | Description |
|---|---|
instruct <message> |
Send instruction to both AIs |
ask claude <message> |
Target Claude specifically |
ask gpt5 <message> |
Target GPT-5 specifically |
collaborate <task> |
Explicit collaboration mode |
swarm start/stop |
Control idle swarm |
status |
Show system status |
history [limit] |
View conversation history |
compare |
Compare AI responses side-by-side |
clear |
Clear screen |
export [filename] |
Export session data |
help |
Show help message |
exit |
Exit the CLI |
multi-ai> instruct Create a user authentication API
🔵 CLAUDE [14:30:25]
## Claude's Response
I understand you want: "Create a user authentication API"
...
🟢 GPT5 [14:30:26]
## GPT-5's Response
Regarding: "Create a user authentication API"
...multi-ai> collaborate Build a real-time chat application
╭──────────────────────────────────────────────────────╮
│ │
│ 🔄 COLLABORATION MODE │
│ │
│ Task: Build a real-time chat application │
│ Both AIs working in parallel... │
│ │
╰──────────────────────────────────────────────────────╯multi-ai> status
┌────────────────────┬────────────────────┐
│ Component │ Status │
├────────────────────┼────────────────────┤
│ Claude AI │ Active │
│ GPT-5 AI │ Active │
│ Idle Swarm │ Stopped │
│ Session ID │ session-abc123 │
│ Messages │ 15 │
└────────────────────┴────────────────────┘The CLI automatically integrates with Claude Flow hooks:
# Pre-task hook
npx claude-flow@alpha hooks pre-task --description "Starting CLI session"
# Post-edit hook (automatic)
npx claude-flow@alpha hooks post-edit --memory-key "multi-ai/cli/last-command"
# Session-end hook
npx claude-flow@alpha hooks session-end --export-metrics truemulti-ai-collab/
├── src/
│ ├── cli/
│ │ ├── multi-ai-cli.ts # Main CLI interface
│ │ └── command-handlers.ts # Command implementations
│ └── utils/
│ ├── display-formatter.ts # Color-coded output
│ ├── diff-viewer.ts # Code comparison
│ └── session-manager.ts # Session management
├── tests/
├── package.json
├── tsconfig.json
└── README.md
- commander - CLI framework
- inquirer - Interactive prompts
- chalk - Terminal colors
- ora - Loading spinners
- marked - Markdown rendering
- diff - Code comparison
- cli-table3 - Table formatting
- boxen - Styled boxes
# Development mode with auto-reload
npm run dev
# Build TypeScript
npm run build
# Type checking
npm run typecheck
# Linting
npm run lint
# Run tests
npm test# Debug mode (shows hook calls)
DEBUG=true multi-ai
# Custom session ID
CLAUDE_FLOW_SESSION_ID=my-session multi-aiSessions are automatically tracked and can be exported:
# Export current session
multi-ai export --file my-session.json
# Session data includes:
# - All messages (with timestamps)
# - AI responses
# - Commands executed
# - Session metadata- Fork the repository
- Create feature branch:
git checkout -b feature-name - Commit changes:
git commit -am 'Add feature' - Push to branch:
git push origin feature-name - Submit pull request
MIT License - see LICENSE file for details
For issues and questions:
- GitHub Issues: [repository-url]/issues
- Documentation: [repository-url]/docs
Note: This CLI is designed to work with the Claude Flow orchestration system. Ensure Claude Flow is installed and configured before use.