|
| 1 | +# Setup Guide - Installing AI CLI Tools |
| 2 | + |
| 3 | +**IMPORTANT**: Before using the AI Orchestrator, you need to install and authenticate with the CLI tools you want to use. |
| 4 | + |
| 5 | +## 📋 Prerequisites |
| 6 | + |
| 7 | +The AI Orchestrator coordinates these CLI tools: |
| 8 | +- **Claude Code** (command: `claude`) |
| 9 | +- **Codex** (command: `codex`) |
| 10 | +- **Gemini** (command: `gemini`) |
| 11 | +- **GitHub Copilot CLI** (command: `copilot`) |
| 12 | + |
| 13 | +You need **at least one** of these installed to use the orchestrator. |
| 14 | + |
| 15 | +## 🔧 Installing Each CLI Tool |
| 16 | + |
| 17 | +### 1. Claude Code CLI |
| 18 | + |
| 19 | +**Install:** |
| 20 | +```bash |
| 21 | +# Follow Claude Code installation instructions from Anthropic |
| 22 | +# Visit: https://docs.claude.com/claude-code |
| 23 | +``` |
| 24 | + |
| 25 | +**Authenticate:** |
| 26 | +```bash |
| 27 | +claude auth login |
| 28 | +``` |
| 29 | + |
| 30 | +**Verify:** |
| 31 | +```bash |
| 32 | +claude --version |
| 33 | +# Should show version info |
| 34 | + |
| 35 | +# Test it works |
| 36 | +claude --message "Hello, Claude!" |
| 37 | +``` |
| 38 | + |
| 39 | +### 2. Codex CLI |
| 40 | + |
| 41 | +**Install:** |
| 42 | +```bash |
| 43 | +# Install via pip (if available publicly) |
| 44 | +pip install openai-codex |
| 45 | + |
| 46 | +# Or follow OpenAI's installation instructions |
| 47 | +``` |
| 48 | + |
| 49 | +**Authenticate:** |
| 50 | +```bash |
| 51 | +# Set your OpenAI API key |
| 52 | +export OPENAI_API_KEY="your-api-key-here" |
| 53 | + |
| 54 | +# Or configure via their auth command |
| 55 | +codex auth login |
| 56 | +``` |
| 57 | + |
| 58 | +**Verify:** |
| 59 | +```bash |
| 60 | +codex --version |
| 61 | + |
| 62 | +# Test it works |
| 63 | +echo "Write a hello world function" | codex |
| 64 | +``` |
| 65 | + |
| 66 | +### 3. Gemini CLI |
| 67 | + |
| 68 | +**Install:** |
| 69 | +```bash |
| 70 | +# Install Google's Gemini CLI |
| 71 | +# Follow Google's installation instructions |
| 72 | +pip install google-generativeai |
| 73 | + |
| 74 | +# Or use their CLI tool |
| 75 | +``` |
| 76 | + |
| 77 | +**Authenticate:** |
| 78 | +```bash |
| 79 | +# Authenticate with your Google account |
| 80 | +gemini auth login |
| 81 | + |
| 82 | +# Or set API key |
| 83 | +export GOOGLE_API_KEY="your-api-key" |
| 84 | +``` |
| 85 | + |
| 86 | +**Verify:** |
| 87 | +```bash |
| 88 | +gemini --version |
| 89 | + |
| 90 | +# Test it works |
| 91 | +gemini --prompt "Hello, Gemini!" |
| 92 | +``` |
| 93 | + |
| 94 | +### 4. GitHub Copilot CLI |
| 95 | + |
| 96 | +**Install:** |
| 97 | +```bash |
| 98 | +# Install Copilot CLI |
| 99 | +# Follow GitHub's installation instructions |
| 100 | +npm install -g @githubnext/github-copilot-cli |
| 101 | + |
| 102 | +# Or via other methods provided by GitHub |
| 103 | +``` |
| 104 | + |
| 105 | +**Authenticate:** |
| 106 | +```bash |
| 107 | +copilot auth login |
| 108 | +# Follow the prompts to authenticate |
| 109 | +``` |
| 110 | + |
| 111 | +**Verify:** |
| 112 | +```bash |
| 113 | +copilot --version |
| 114 | + |
| 115 | +# Test it works |
| 116 | +copilot "write a function" |
| 117 | +``` |
| 118 | + |
| 119 | +## ✅ Verify All Installations |
| 120 | + |
| 121 | +Run this script to check which tools are available: |
| 122 | + |
| 123 | +```bash |
| 124 | +#!/bin/bash |
| 125 | + |
| 126 | +echo "Checking AI CLI Tools..." |
| 127 | +echo "" |
| 128 | + |
| 129 | +# Claude |
| 130 | +if command -v claude &> /dev/null; then |
| 131 | + echo "✓ Claude Code CLI: INSTALLED" |
| 132 | + claude --version 2>&1 | head -1 |
| 133 | +else |
| 134 | + echo "✗ Claude Code CLI: NOT FOUND" |
| 135 | +fi |
| 136 | +echo "" |
| 137 | + |
| 138 | +# Codex |
| 139 | +if command -v codex &> /dev/null; then |
| 140 | + echo "✓ Codex CLI: INSTALLED" |
| 141 | + codex --version 2>&1 | head -1 |
| 142 | +else |
| 143 | + echo "✗ Codex CLI: NOT FOUND" |
| 144 | +fi |
| 145 | +echo "" |
| 146 | + |
| 147 | +# Gemini |
| 148 | +if command -v gemini &> /dev/null; then |
| 149 | + echo "✓ Gemini CLI: INSTALLED" |
| 150 | + gemini --version 2>&1 | head -1 |
| 151 | +else |
| 152 | + echo "✗ Gemini CLI: NOT FOUND" |
| 153 | +fi |
| 154 | +echo "" |
| 155 | + |
| 156 | +# GitHub Copilot |
| 157 | +if command -v copilot &> /dev/null; then |
| 158 | + echo "✓ Copilot CLI: INSTALLED" |
| 159 | + copilot --version 2>&1 | head -1 |
| 160 | +else |
| 161 | + echo "✗ Copilot CLI: NOT FOUND" |
| 162 | +fi |
| 163 | +echo "" |
| 164 | + |
| 165 | +echo "Checking AI Orchestrator..." |
| 166 | +if [ -x "./ai-orchestrator" ]; then |
| 167 | + echo "✓ AI Orchestrator: READY" |
| 168 | + ./ai-orchestrator agents |
| 169 | +else |
| 170 | + echo "✗ AI Orchestrator: Not executable. Run: chmod +x ai-orchestrator" |
| 171 | +fi |
| 172 | +``` |
| 173 | + |
| 174 | +Save this as `check-tools.sh`, make it executable, and run it: |
| 175 | + |
| 176 | +```bash |
| 177 | +chmod +x check-tools.sh |
| 178 | +./check-tools.sh |
| 179 | +``` |
| 180 | + |
| 181 | +## 🎯 Quick Start After Installation |
| 182 | + |
| 183 | +Once you have at least one tool installed: |
| 184 | + |
| 185 | +### 1. Verify AI Orchestrator sees your tools |
| 186 | + |
| 187 | +```bash |
| 188 | +./ai-orchestrator agents |
| 189 | +``` |
| 190 | + |
| 191 | +You should see: |
| 192 | +``` |
| 193 | + AI Agents |
| 194 | +┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓ |
| 195 | +┃ Agent ┃ Status ┃ Command ┃ Role ┃ |
| 196 | +┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩ |
| 197 | +│ claude │ ✓ Available │ claude │ refinement │ |
| 198 | +│ codex │ ✓ Available │ codex │ implementation │ |
| 199 | +│ gemini │ ✓ Available │ gemini │ review │ |
| 200 | +└─────────┴─────────────────┴────────────┴────────────────┘ |
| 201 | +``` |
| 202 | + |
| 203 | +### 2. Test with a simple task |
| 204 | + |
| 205 | +```bash |
| 206 | +# One-shot mode |
| 207 | +./ai-orchestrator run "Create a hello world function" --workflow quick |
| 208 | + |
| 209 | +# Interactive mode |
| 210 | +./ai-orchestrator shell |
| 211 | +> Create a hello world function |
| 212 | +``` |
| 213 | + |
| 214 | +## 🔍 Troubleshooting |
| 215 | + |
| 216 | +### "Agent not available" error |
| 217 | + |
| 218 | +**Problem:** `Agent 'claude' not available. Command 'claude' not found.` |
| 219 | + |
| 220 | +**Solution:** |
| 221 | +1. Check if the tool is installed: `which claude` |
| 222 | +2. If not installed, install it following the instructions above |
| 223 | +3. Make sure it's in your PATH |
| 224 | +4. Verify authentication: Try running the command directly |
| 225 | + |
| 226 | +### Authentication errors |
| 227 | + |
| 228 | +**Problem:** Tool is installed but fails with auth errors |
| 229 | + |
| 230 | +**Solution:** |
| 231 | +```bash |
| 232 | +# Claude |
| 233 | +claude auth login |
| 234 | + |
| 235 | +# Codex |
| 236 | +export OPENAI_API_KEY="your-key" |
| 237 | + |
| 238 | +# Gemini |
| 239 | +gemini auth login |
| 240 | + |
| 241 | +# Copilot |
| 242 | +gh auth login |
| 243 | +``` |
| 244 | + |
| 245 | +### Command not found |
| 246 | + |
| 247 | +**Problem:** `bash: claude: command not found` |
| 248 | + |
| 249 | +**Solution:** |
| 250 | +1. Install the tool (see installation instructions above) |
| 251 | +2. Add to PATH if installed in custom location: |
| 252 | + ```bash |
| 253 | + export PATH=$PATH:/path/to/tool |
| 254 | + ``` |
| 255 | +3. Restart your terminal |
| 256 | + |
| 257 | +### Tool installed but orchestrator doesn't see it |
| 258 | + |
| 259 | +**Problem:** `which claude` works but orchestrator says not available |
| 260 | + |
| 261 | +**Solution:** |
| 262 | +1. Check config: `cat config/agents.yaml` |
| 263 | +2. Make sure `enabled: true` |
| 264 | +3. Verify command name matches: `command: "claude"` |
| 265 | +4. Run validation: `./ai-orchestrator validate` |
| 266 | + |
| 267 | +## 📝 Configuration |
| 268 | + |
| 269 | +If a tool uses a different command name on your system, update `config/agents.yaml`: |
| 270 | + |
| 271 | +```yaml |
| 272 | +agents: |
| 273 | + claude: |
| 274 | + enabled: true |
| 275 | + command: "claude" # ← Change this to match your command |
| 276 | + role: "refinement" |
| 277 | +``` |
| 278 | +
|
| 279 | +## 🎓 Next Steps |
| 280 | +
|
| 281 | +After installation: |
| 282 | +
|
| 283 | +1. **Test individual tools:** |
| 284 | + ```bash |
| 285 | + claude --message "Test" |
| 286 | + echo "Test" | codex |
| 287 | + gemini --prompt "Test" |
| 288 | + copilot "Test" |
| 289 | + ``` |
| 290 | + |
| 291 | +2. **Validate configuration:** |
| 292 | + ```bash |
| 293 | + ./ai-orchestrator validate |
| 294 | + ``` |
| 295 | + |
| 296 | +3. **Check available agents:** |
| 297 | + ```bash |
| 298 | + ./ai-orchestrator agents |
| 299 | + ``` |
| 300 | + |
| 301 | +4. **Try the interactive shell:** |
| 302 | + ```bash |
| 303 | + ./ai-orchestrator shell |
| 304 | + ``` |
| 305 | + |
| 306 | +5. **Read the documentation:** |
| 307 | + - [Interactive Shell Guide](docs/interactive-shell.md) |
| 308 | + - [Architecture](docs/architecture.md) |
| 309 | + - [Adding Agents](docs/adding-agents.md) |
| 310 | + |
| 311 | +## ⚠️ Important Notes |
| 312 | + |
| 313 | +1. **You don't need all tools** - The orchestrator works with whatever you have installed |
| 314 | +2. **Authentication required** - Each tool needs to be logged in |
| 315 | +3. **API costs** - Some tools (Codex, Gemini) may incur API costs |
| 316 | +4. **Internet required** - All tools need internet connection |
| 317 | +5. **Test individually first** - Make sure each tool works on its own before using the orchestrator |
| 318 | + |
| 319 | +## 💡 Recommended Setup |
| 320 | + |
| 321 | +For the **best experience**, install all tools: |
| 322 | + |
| 323 | +```bash |
| 324 | +# Install all tools |
| 325 | +claude auth login # Claude Code |
| 326 | +# Set up Codex |
| 327 | +gemini auth login # Gemini |
| 328 | +copilot auth login # Copilot |
| 329 | + |
| 330 | +# Verify all are working |
| 331 | +./ai-orchestrator agents |
| 332 | + |
| 333 | +# Start using! |
| 334 | +./ai-orchestrator shell |
| 335 | +``` |
| 336 | + |
| 337 | +But you can start with **just Claude** if that's what you have: |
| 338 | + |
| 339 | +```bash |
| 340 | +# Only Claude installed |
| 341 | +./ai-orchestrator agents |
| 342 | +# Shows: claude ✓ Available |
| 343 | + |
| 344 | +# Use Claude-only workflow |
| 345 | +./ai-orchestrator shell |
| 346 | +> Create a REST API |
| 347 | +# Works with just Claude! |
| 348 | +``` |
| 349 | + |
| 350 | +## 🆘 Getting Help |
| 351 | + |
| 352 | +If you run into issues: |
| 353 | + |
| 354 | +1. Check tool installation: `which <tool-name>` |
| 355 | +2. Test tool directly: `<tool-name> --version` |
| 356 | +3. Verify authentication: Run auth command |
| 357 | +4. Check logs: `cat ai-orchestrator.log` |
| 358 | +5. Validate config: `./ai-orchestrator validate` |
| 359 | +6. Run in verbose mode: `./ai-orchestrator run "task" --verbose` |
0 commit comments