Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
fix ps1 giving errors with emojis
Dillon DuPont60b7f07c3ec2
diff --git a/scripts/install-cli.ps1 b/scripts/install-cli.ps1index d09ed461e7..cb4b0a8742 100644--- a/scripts/install-cli.ps1+++ b/scripts/install-cli.ps1@@ -2,11 +2,11 @@$ErrorActionPreference = "Stop"function Install-WithBun {- Write-Host "π¦ Installing CUA CLI using Bun..." -ForegroundColor Yellow+ Write-Host "Installing CUA CLI using Bun..." -ForegroundColor Yellow# Check if bun is already installedif (-not (Get-Command bun -ErrorAction SilentlyContinue)) {- Write-Host "π¦ Installing Bun..." -ForegroundColor Yellow+ Write-Host "Installing Bun..." -ForegroundColor Yellowtry {powershell -c "irm bun.sh/install.ps1|iex"@@ -19,14 +19,14 @@ function Install-WithBun {$env:Path = "$bunPath;$env:Path"}} catch {- Write-Host "β Failed to install Bun. Please install manually from https://bun.sh" -ForegroundColor Red+ Write-Host "Error: Failed to install Bun. Please install manually from https://bun.sh" -ForegroundColor Redreturn $false}}# Verify bun installationif (-not (Get-Command bun -ErrorAction SilentlyContinue)) {- Write-Host "β Bun installation failed. Please install manually from https://bun.sh" -ForegroundColor Red+ Write-Host "Error: Bun installation failed. Please install manually from https://bun.sh" -ForegroundColor Redreturn $false}@@ -34,27 +34,27 @@ function Install-WithBun {bun add -g @trycua/clireturn $true} catch {- Write-Host "β Failed to install with Bun, trying npm..." -ForegroundColor Yellow+ Write-Host "Warning: Failed to install with Bun, trying npm..." -ForegroundColor Yellowtry {npm install -g @trycua/clireturn $true} catch {- Write-Host "β Installation failed with npm as well." -ForegroundColor Red+ Write-Host "Error: Installation failed with npm as well." -ForegroundColor Redreturn $false}}}-Write-Host "π Installing CUA CLI..." -ForegroundColor Green+Write-Host "Installing CUA CLI..." -ForegroundColor Green# Determine if this is a 64-bit system$is64Bit = [Environment]::Is64BitOperatingSystemif (-not $is64Bit) {- Write-Host "β οΈ 32-bit Windows is not supported. Falling back to Bun installation..." -ForegroundColor Yellow+ Write-Host "Warning: 32-bit Windows is not supported. Falling back to Bun installation..." -ForegroundColor Yellowif (Install-WithBun) {exit 0} else {- Write-Host "β Installation failed. Please try installing manually:" -ForegroundColor Red+ Write-Host "Error: Installation failed. Please try installing manually:" -ForegroundColor RedWrite-Host " irm https://cua.ai/install.ps1 | iex"exit 1}@@ -66,11 +66,11 @@ try {$version = $release.tag_name -replace '^cua-v', ''$binaryUrl = "https://github.com/trycua/cua/releases/download/$($release.tag_name)/cua-windows-x64.exe"} catch {- Write-Host "β οΈ Could not fetch latest release, falling back to Bun installation" -ForegroundColor Yellow+ Write-Host "Warning: Could not fetch latest release, falling back to Bun installation" -ForegroundColor Yellowif (Install-WithBun) {exit 0} else {- Write-Host "β Installation failed. Please try installing manually:" -ForegroundColor Red+ Write-Host "Error: Installation failed. Please try installing manually:" -ForegroundColor RedWrite-Host " irm https://cua.ai/install.ps1 | iex"exit 1}@@ -85,15 +85,15 @@ if (-not (Test-Path $installDir)) {$binaryPath = Join-Path $installDir "cua.exe"# Download the binary-Write-Host "π₯ Downloading CUA CLI $version for Windows x64..." -ForegroundColor Cyan+Write-Host "Downloading CUA CLI $version for Windows x64..." -ForegroundColor Cyantry {Invoke-WebRequest -Uri $binaryUrl -OutFile $binaryPath -ErrorAction Stop} catch {- Write-Host "β οΈ Failed to download pre-built binary, falling back to Bun installation" -ForegroundColor Yellow+ Write-Host "Warning: Failed to download pre-built binary, falling back to Bun installation" -ForegroundColor Yellowif (Install-WithBun) {exit 0} else {- Write-Host "β Installation failed. Please try installing manually:" -ForegroundColor Red+ Write-Host "Error: Installation failed. Please try installing manually:" -ForegroundColor RedWrite-Host " irm https://cua.ai/install.ps1 | iex"exit 1}@@ -104,27 +104,27 @@ $currentPath = [Environment]::GetEnvironmentVariable("Path", "User")if ($currentPath -notlike "*$installDir*") {[Environment]::SetEnvironmentVariable("Path", "$currentPath;$installDir", "User")$env:Path = "$env:Path;$installDir"- Write-Host "β Added $installDir to your PATH" -ForegroundColor Green+ Write-Host "Success: Added $installDir to your PATH" -ForegroundColor Green}# Verify installationif (Test-Path $binaryPath) {- Write-Host "β CUA CLI $version installed successfully to $binaryPath" -ForegroundColor Green+ Write-Host "Success: CUA CLI $version installed successfully to $binaryPath" -ForegroundColor GreenWrite-Host ""- Write-Host "π Get started with:" -ForegroundColor Cyan+ Write-Host "Get started with:" -ForegroundColor CyanWrite-Host " cua auth login"Write-Host " cua vm create --os linux --configuration small --region north-america"Write-Host ""- Write-Host "π For more help, visit: https://docs.cua.ai/libraries/cua-cli" -ForegroundColor Cyan+ Write-Host "For more help, visit: https://docs.cua.ai/libraries/cua-cli" -ForegroundColor Cyan# Offer to add to PATH if not already thereif (-not ($env:Path -like "*$installDir*")) {Write-Host ""- Write-Host "β οΈ Please restart your terminal or run the following command to use CUA CLI:" -ForegroundColor Yellow+ Write-Host "Note: Please restart your terminal or run the following command to use CUA CLI:" -ForegroundColor YellowWrite-Host " `$env:Path += ';$installDir'"}} else {- Write-Host "β Installation failed. Please try installing manually:" -ForegroundColor Red+ Write-Host "Error: Installation failed. Please try installing manually:" -ForegroundColor RedWrite-Host " irm https://cua.ai/install.ps1 | iex"exit 1-}+}\ No newline at end of file