# Avalos AI Coder Engine - one-line installer. Usage: irm https://avalos.ai/install.ps1 | iex # Sovereign, private. Downloads the CLI, registers the `avalosai` command, points you at login. $ErrorActionPreference = "Stop" $ver = "1.4.1" Write-Host "" Write-Host " Avalos AI - Coder Engine $ver" -ForegroundColor Yellow Write-Host " Sovereign. Works in your own folders. Asks before every change." -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' (up/down 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 and its local tools to ~/.avalos $dir = Join-Path $HOME ".avalos" New-Item -ItemType Directory -Force -Path $dir | Out-Null $cli = Join-Path $dir "avalos.py" $tools = Join-Path $dir "avalos_agent.py" $esc = Join-Path $dir "avalos_escalation.py" $pb = Join-Path $dir "avalos_probatio.py" Invoke-WebRequest -Uri "https://avalos.ai/avalos.py?v=$ver" -OutFile $cli -UseBasicParsing Invoke-WebRequest -Uri "https://avalos.ai/downloads/avalos_agent.py?v=$ver" -OutFile $tools -UseBasicParsing Invoke-WebRequest -Uri "https://avalos.ai/downloads/avalos_escalation.py?v=$ver" -OutFile $esc -UseBasicParsing Invoke-WebRequest -Uri "https://avalos.ai/downloads/avalos_probatio.py?v=$ver" -OutFile $pb -UseBasicParsing if (-not (Select-String -Path $cli -Pattern "__version__ = `"$ver`"" -Quiet) -or ((Get-Item $tools).Length -lt 2000) -or ((Get-Item $esc).Length -lt 2000) -or ((Get-Item $pb).Length -lt 2000)) { Write-Host " ! download incomplete - please re-run the installer" -ForegroundColor Red return } Write-Host " + Coder Engine $ver installed -> $dir" -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. To start:" -ForegroundColor Yellow Write-Host " avalosai login avl_live_xxxxxxxx " -NoNewline; Write-Host "(paste your key; create one at avalos.ai -> Developer)" -ForegroundColor DarkGray Write-Host " cd C:\path\to\your\project" -ForegroundColor White Write-Host " avalosai " -NoNewline; Write-Host "(then just type what you want done)" -ForegroundColor DarkGray Write-Host "" Write-Host " It reads your files freely; every edit and command is shown to you and asked first." -ForegroundColor DarkGray Write-Host ""