# Check Node.js version (requires >= 18.0.0)
node --version
# If not installed or version is too old, visit https://nodejs.org/ to download# Method 1: Using npm (recommended)
npm install -g @github/copilot-cli
# Method 2: Using GitHub CLI extension
gh extension install github/gh-copilot
# Login authentication
copilot auth login
# Verify installation
copilot --versionImportant: Make sure you have a valid GitHub Copilot subscription!
# Navigate to project directory
cd cyber-chess-roast
# Install dependencies
npm install# Copy example configuration
cp .env.example .env
# Edit .env file if needed
# In most cases, default configuration will work# Start development server (frontend + backend)
npm run devWait a few seconds until you see:
✅ Copilot commentator ready!
🚀 Server running at http://localhost:3000
⚡ Vite dev server running at http://localhost:5173
Visit: http://localhost:5173
You should see the chess board and commentary panel!
- Click a piece (such as a white pawn)
- Click the target square to move
- AI commentator will analyze and comment on every move in real-time!
Solution:
# Check if copilot CLI is in PATH
which copilot # macOS/Linux
where copilot # Windows
# If not found, reinstall
npm install -g @github/copilot-cliSolution:
# Re-login
copilot auth logout
copilot auth login
# Check status
copilot auth statusSolution:
# Edit .env file to change port
echo "PORT=3001" >> .env
# Or kill the process using the port
# Windows PowerShell:
Stop-Process -Id (Get-NetTCPConnection -LocalPort 3000).OwningProcess -Force
# macOS/Linux:
lsof -ti:3000 | xargs kill -9Checklist:
- Is backend server running?
- Is firewall blocking the connection?
- Are there any errors in browser console?
Solution:
# Restart development server
Ctrl+C # Stop
npm run dev # RestartSolution:
# Clear npm cache
npm cache clean --force
# Delete node_modules and package-lock.json
rm -rf node_modules package-lock.json
# Reinstall
npm install# Enable verbose logging
LOG_LEVEL=debug npm run dev:server
# Start frontend in another terminal
npm run dev:clientnpm run dev:clientnpm run dev:serverBackend logs will show:
- Copilot SDK initialization status
- Processing of each move
- AI commentary generation process
- WebSocket connection status
# 1. Build project
npm run build
# 2. Start production server
npm start
# 3. Visit http://localhost:3000- At least 5 moves: Required to generate game summary
- Observe phases: AI automatically recognizes opening/middlegame/endgame
- Streaming commentary: Wait for AI to complete commentary on one move before making the next
- Reset game: Can restart at any time
R- Reset gameU- Undo last moveS- Generate summary?- Show help
Enjoy the fun of AI commentary! ♟️🤖
For questions, please see the complete README.md or submit an Issue.