# Avalos AI Coder Engine — one-line installer. Usage: irm https://avalos.ai/install.ps1 | iex # Sovereign, private. Downloads the CLI, registers the `avalos` command, points you at login. $ErrorActionPreference = "Stop" Write-Host "" Write-Host " Avalos AI — Coder Engine" -ForegroundColor Yellow Write-Host " Sovereign. Sandbox-verified. No big-3." -ForegroundColor DarkGray Write-Host "" # 1. python check if (-not (Get-Command python -ErrorAction SilentlyContinue)) { Write-Host " ! Python 3 is required (python.org). Install it, then re-run this." -ForegroundColor Red return } # 1b. ensure 'rich' (polished console) + 'prompt_toolkit' (↑/↓ history + line editing) try { python -m pip install -q --disable-pip-version-check rich prompt_toolkit 2>$null | Out-Null; Write-Host " + console UI ready (rich + prompt_toolkit)" -ForegroundColor Green } catch {} # 2. download the CLI to ~/.avalos $dir = Join-Path $HOME ".avalos" New-Item -ItemType Directory -Force -Path $dir | Out-Null $cli = Join-Path $dir "avalos.py" Invoke-WebRequest -Uri "https://avalos.ai/avalos.py" -OutFile $cli -UseBasicParsing Write-Host " + CLI installed → $cli" -ForegroundColor Green # 3. register the `avalosai` command (+ `avalos` alias) in the PowerShell profile if (-not (Test-Path $PROFILE)) { New-Item -ItemType File -Force -Path $PROFILE | Out-Null } $fn1 = "function avalosai { python `"$cli`" @args }" $fn2 = "Set-Alias avalos avalosai" if (-not (Select-String -Path $PROFILE -Pattern 'function avalosai ' -Quiet -ErrorAction SilentlyContinue)) { Add-Content -Path $PROFILE -Value "`n# Avalos AI Coder Engine`n$fn1`n$fn2" Write-Host " + 'avalosai' command registered in your PowerShell profile (alias: avalos)" -ForegroundColor Green } else { Write-Host " = 'avalosai' command already registered" -ForegroundColor DarkGray } # 4. load it into the current session so it works immediately Invoke-Expression $fn1 Invoke-Expression $fn2 Write-Host "" Write-Host " Done. Two steps to start:" -ForegroundColor Yellow Write-Host " avalosai login " -NoNewline; Write-Host "(create one at avalos.ai → Developer)" -ForegroundColor DarkGray Write-Host " avalosai myfile.py `"fix the bug`" " -NoNewline; Write-Host "(edits in place, verified, with a .bak)" -ForegroundColor DarkGray Write-Host "" Write-Host " New terminals have 'avalosai' automatically. Type avalosai for help." -ForegroundColor DarkGray Write-Host ""