# Setup and Validation Scripts Automated scripts to help you set up and validate your Copilot SDK development environment. ## Available Scripts ### 📦 `setup-dev-env.sh` (Linux/macOS) Automated environment setup for Linux and macOS systems. **What it does:** - Checks for GitHub CLI and installs if needed - Installs Copilot CLI extension - Verifies authentication - Checks for language runtimes (Node.js, Python, Go, .NET) - Provides setup guidance for chosen SDKs **Usage:** ```bash bash scripts/setup-dev-env.sh ``` **Features:** - ✅ Interactive - Choose which SDKs to set up - ✅ Non-destructive - Won't overwrite existing installations - ✅ Helpful output - Clear success/error messages - ✅ Cross-platform - Works on macOS and Linux --- ### 📦 `setup-dev-env.ps1` (Windows) Automated environment setup for Windows systems using PowerShell. **What it does:** - Checks for winget package manager - Installs GitHub CLI if needed - Installs Copilot CLI extension - Verifies authentication - Checks for language runtimes (Node.js, Python, Go, .NET) - Installs missing tools via winget **Usage:** ```powershell .\scripts\setup-dev-env.ps1 ``` **Requirements:** - Windows 10 1809+ or Windows 11 - PowerShell 5.1+ - winget (Windows Package Manager) **Note:** Run PowerShell as Administrator if installing system-wide packages. --- ### ✅ `validate-env.sh` (Linux/macOS) Validates your development environment setup. **What it checks:** - GitHub CLI installation and authentication - Copilot CLI installation - Language runtime installations (Node.js, Python, Go, .NET) - Tool versions and compatibility - Additional development tools (Git, VS Code, just) **Usage:** ```bash bash scripts/validate-env.sh ``` **Exit codes:** - `0` - All required checks passed - `1` - Some checks failed **Example output:** ``` ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔍 Validating Copilot SDK Development Environment ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ GitHub CLI ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✓ GitHub CLI installed: gh version 2.85.0 ✓ GitHub CLI is authenticated ... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✓ All required checks passed! ``` --- ## Quick Start Workflow ### For New Users 1. **Run setup script:** ```bash # Linux/macOS bash scripts/setup-dev-env.sh # Windows .\scripts\setup-dev-env.ps1 ``` 2. **Validate installation:** ```bash bash scripts/validate-env.sh ``` 3. **Start building:** ```bash cd templates/typescript-quickstart # or python-quickstart # Follow template README ``` ### For Existing Installations If you already have tools installed, just validate: ```bash bash scripts/validate-env.sh ``` --- ## Script Details ### Setup Script Options The setup scripts are interactive and will ask which SDKs you want to set up: ``` Which SDKs would you like to set up? (You can select multiple) Set up Node.js/TypeScript SDK? (y/n): y Set up Python SDK? (y/n): y Set up Go SDK? (y/n): n Set up .NET SDK? (y/n): n ``` ### Validation Script Checks **Required:** - ✅ GitHub CLI (gh) - ✅ Copilot CLI extension - ✅ GitHub authentication - ✅ Git **Optional (at least one SDK):** - ⚪ Node.js 18+ (for TypeScript SDK) - ⚪ Python 3.8+ (for Python SDK) - ⚪ Go 1.21+ (for Go SDK) - ⚪ .NET 8.0+ (for .NET SDK) **Recommended:** - ⚪ VS Code - ⚪ uv (Python package manager) - ⚪ just (command runner) --- ## Troubleshooting ### Script won't run **Linux/macOS:** ```bash # Make executable chmod +x scripts/setup-dev-env.sh chmod +x scripts/validate-env.sh # Then run bash scripts/setup-dev-env.sh ``` **Windows:** ```powershell # Enable script execution Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser # Then run .\scripts\setup-dev-env.ps1 ``` ### Permission denied during installation **Linux:** - Script will use `sudo` for system installations - You'll be prompted for your password **macOS:** - Ensure Homebrew is installed - Run with appropriate permissions **Windows:** - Run PowerShell as Administrator for system-wide installs - Or install tools for current user only ### Script hangs or freezes 1. Check your internet connection 2. Try running individual commands manually 3. Check for antivirus interference --- ## Manual Installation If scripts don't work for your system, see: - [Environment Setup Guide](../docs/environment-setup.md) - [Quick Reference](../docs/quick-reference.md) --- ## Contributing Found a bug or want to improve these scripts? 1. Test your changes on multiple platforms 2. Maintain backward compatibility 3. Keep output clear and helpful 4. Update this README --- ## Platform Support | Platform | Setup Script | Validation Script | Status | |----------|-------------|-------------------|---------| | macOS (Intel) | ✅ | ✅ | Tested | | macOS (Apple Silicon) | ✅ | ✅ | Tested | | Ubuntu/Debian | ✅ | ✅ | Tested | | Other Linux | ✅ | ✅ | Should work | | Windows 10/11 | ✅ | ❌ | PowerShell only | --- ## Related Resources - [Environment Setup Guide](../docs/environment-setup.md) - Detailed setup instructions - [Quick Reference](../docs/quick-reference.md) - Command cheatsheet - [Troubleshooting Guide](../docs/troubleshooting.md) - Common issues and solutions - [Project Templates](../templates/README.md) - Ready-to-use starter templates --- ## License MIT - Same as the Copilot SDK