$ErrorActionPreference = "Stop" function Test-CommandExists { param([string]$CommandName) return $null -ne (Get-Command $CommandName -ErrorAction SilentlyContinue) } Write-Host "" Write-Host "Fathym AI" -ForegroundColor Cyan Write-Host "------------------------------------------" -ForegroundColor Cyan Write-Host "" Write-Host " Checking for Deno..." -NoNewline if (-not (Test-CommandExists "deno")) { Write-Host " not found." Write-Host " Installing Deno..." Invoke-WebRequest https://deno.land/x/install/install.ps1 -UseBasicParsing | Invoke-Expression $denoBin = Join-Path $env:USERPROFILE ".deno\bin" if (Test-Path $denoBin) { $env:Path = "$denoBin;$env:Path" } } else { Write-Host " found." } if (-not (Test-CommandExists "deno")) { throw " Deno installation failed. Please install from https://deno.com and re-run." } $env:FAI_HP_VARIANT = "F" $env:FAI_AI_ANON_ID = "X1ir143XJIwMnh2FB5ASP0" Write-Host "" Write-Host " Installing fai..." deno run -A jsr:@fathym/fai/install