# Grok Build Remote — free gbr-agent installer (Windows PowerShell) # Hosted at: https://grokbuildremote.com/install.ps1 # # Usage (PowerShell 5.1+): # irm https://grokbuildremote.com/install.ps1 | iex # # or download then: # .\install.ps1 # .\install.ps1 -Version v0.3.0 # param( [string]$Version = $(if ($env:GBR_VERSION) { $env:GBR_VERSION } else { "v0.3.0" }), [string]$InstallDir = $(if ($env:GBR_INSTALL_DIR) { $env:GBR_INSTALL_DIR } else { Join-Path $env:LOCALAPPDATA "GrokBuildRemote" }), [string]$Site = $(if ($env:GBR_SITE) { $env:GBR_SITE } else { "https://grokbuildremote.com" }) ) $ErrorActionPreference = "Stop" $Product = "Grok Build Remote" $Asset = "gbr-agent-windows-amd64.exe" $BinName = "gbr-agent.exe" $Base = if ($env:GBR_DOWNLOAD_BASE) { $env:GBR_DOWNLOAD_BASE } else { "$Site/downloads/$Version" } $Url = "$Base/$Asset" Write-Host "==> $Product agent installer (Windows)" -ForegroundColor Green Write-Host " version=$Version arch=amd64" Write-Host " download $Url" New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null $tmp = Join-Path $env:TEMP $Asset $dest = Join-Path $InstallDir $BinName try { Invoke-WebRequest -Uri $Url -OutFile $tmp -UseBasicParsing } catch { throw "Download failed: $Url — open $Site/#download" } Copy-Item -Force $tmp $dest Write-Host " installed: $dest" -ForegroundColor Green # User PATH $userPath = [Environment]::GetEnvironmentVariable("Path", "User") if ($userPath -notlike "*$InstallDir*") { [Environment]::SetEnvironmentVariable("Path", "$userPath;$InstallDir", "User") $env:Path = "$env:Path;$InstallDir" Write-Host " added $InstallDir to User PATH (open a new terminal for other shells)" } Write-Host "" Write-Host "==> Next commands" -ForegroundColor Cyan Write-Host @" # 1) Pair with the code shown in the mobile app gbr-agent pair -code YOURCODE # 2) Run the agent (keep this running) gbr-agent run # Useful gbr-agent sessions gbr-agent status gbr-agent version Docs: $Site/#download Support: $Site/support.html "@