# AI Agents Decks - installs Deck Host for the current user (Windows x64) into %LOCALAPPDATA%\AIAgentsDecks. # irm https://aiagentsdecks.com/install.ps1 | iex # Downloads one binary from aiagentsdecks.com/download, checks its SHA-256, adds the folder to your user PATH. $ErrorActionPreference = 'Stop' $base = 'https://aiagentsdecks.com/download' $f = 'deck-host-windows-x64.exe' $dir = Join-Path $env:LOCALAPPDATA 'AIAgentsDecks' New-Item -ItemType Directory -Force -Path $dir | Out-Null $tmp = Join-Path $env:TEMP ("deck-host-" + [guid]::NewGuid() + ".exe") Write-Host "Downloading $f..." Invoke-WebRequest -UseBasicParsing "$base/$f" -OutFile $tmp $sums = [string](Invoke-WebRequest -UseBasicParsing "$base/SHA256SUMS.txt").Content $want = ($sums -split "`n" | Where-Object { $_ -match (" " + [regex]::Escape($f) + "\s*$") } | ForEach-Object { ($_ -split '\s+')[0] }) | Select-Object -First 1 $got = (Get-FileHash -Algorithm SHA256 $tmp).Hash.ToLower() if (-not $want -or $want.Trim().ToLower() -ne $got) { Remove-Item $tmp; throw 'Checksum mismatch - not installing.' } Move-Item -Force $tmp (Join-Path $dir 'deck-host.exe') $userPath = [Environment]::GetEnvironmentVariable('Path', 'User') if (-not (($userPath -split ';') -contains $dir)) { [Environment]::SetEnvironmentVariable('Path', ($userPath.TrimEnd(';') + ';' + $dir), 'User') $env:Path += ";$dir" Write-Host "Added $dir to your PATH (new terminals pick it up)." } Write-Host ("Installed " + (Join-Path $dir 'deck-host.exe') + " (" + (& (Join-Path $dir 'deck-host.exe') --version) + ")") Write-Host 'Start it with: deck-host'