$ErrorActionPreference = 'Stop' $BinaryName = "outpost67-windows.exe" $InstallDir = "$env:LOCALAPPDATA\outpost67\bin" $ExeName = "outpost67.exe" Write-Host "Fetching latest release for outpost67..." $DownloadUrl = "https://cli.outpost67.xyz/latest/windows.exe" $DestPath = Join-Path -Path $InstallDir -ChildPath $ExeName if (-not (Test-Path -Path $InstallDir)) { New-Item -ItemType Directory -Path $InstallDir | Out-Null } Write-Host "Downloading $DownloadUrl..." Invoke-WebRequest -Uri $DownloadUrl -OutFile $DestPath # Add to PATH if not present $UserPath = [Environment]::GetEnvironmentVariable("Path", "User") if ($UserPath -notlike "*$InstallDir*") { Write-Host "Adding $InstallDir to user PATH..." [Environment]::SetEnvironmentVariable("Path", "$UserPath;$InstallDir", "User") $env:Path += ";$InstallDir" Write-Host "Path updated. You may need to restart your terminal." } Write-Host "Installation complete! Try running 'outpost67 --help'"