# Installs the Toupas command line on Windows: # irm https://app.toupas.com/install.ps1 | iex $ErrorActionPreference = 'Stop' $base = if ($env:TOUPAS_DOWNLOAD_URL) { $env:TOUPAS_DOWNLOAD_URL } else { 'https://app.toupas.com/download' } $dir = Join-Path $env:USERPROFILE '.toupas\bin' $latest = Invoke-RestMethod "$base/latest" $version = $latest.version $file = 'toupas-win-x64.exe' New-Item -ItemType Directory -Force -Path $dir | Out-Null $tmp = Join-Path ([IO.Path]::GetTempPath()) "toupas-$version.exe" Write-Host "Downloading Toupas $version..." Invoke-WebRequest "$base/$version/$file" -OutFile $tmp -UseBasicParsing $sums = (Invoke-WebRequest "$base/$version/SHA256SUMS" -UseBasicParsing).Content $expected = ($sums -split "`n" | Where-Object { $_ -match " $file$" }) -replace ' .*$', '' $actual = (Get-FileHash $tmp -Algorithm SHA256).Hash.ToLower() if (-not $expected -or $expected.Trim() -ne $actual) { Remove-Item $tmp; throw 'The download did not match its checksum; nothing was installed.' } Move-Item -Force $tmp (Join-Path $dir 'toupas.exe') $path = [Environment]::GetEnvironmentVariable('Path', 'User') if (($path -split ';') -notcontains $dir) { [Environment]::SetEnvironmentVariable('Path', "$dir;$path", 'User') } Write-Host "Toupas $version is installed. Open a new terminal, then in your app's folder run: toupas live" Write-Host "To let your coding agent (Claude Code, Codex, Cursor) use Toupas, run: toupas init"