# Ribbon Cable harness installer for Windows. Read it first: irm https://comp4020-final-da-w1nn3r.fly.dev/harness/install.ps1 $ErrorActionPreference = 'Stop' $Url = 'https://comp4020-final-da-w1nn3r.fly.dev/harness/ribbon-cable-harness.tar.gz' $Dir = 'ribbon-cable-harness' if (-not (Get-Command node -ErrorAction SilentlyContinue)) { Write-Error 'Node 24+ is required: https://nodejs.org'; return } $major = [int](node -p 'parseInt(process.versions.node)') if ($major -lt 24) { Write-Warning "Node 24+ is needed to run the harness (you have $(node -v))." } if (-not (Get-Command tar -ErrorAction SilentlyContinue)) { Write-Error 'tar is required (Windows 10 1803 or newer has it)'; return } if (Test-Path $Dir) { Write-Error "$Dir already exists here; move or remove it first (it holds your settings)."; return } $tmp = Join-Path ([IO.Path]::GetTempPath()) ([IO.Path]::GetRandomFileName() + '.tar.gz') try { Invoke-WebRequest -Uri $Url -OutFile $tmp -UseBasicParsing tar -xzf $tmp if ($LASTEXITCODE -ne 0) { Write-Error "tar could not unpack $Url"; return } } finally { Remove-Item $tmp -ErrorAction SilentlyContinue } Write-Host "Installed in .\$Dir" Write-Host "Next: cd $Dir; node src/main.ts (it finds a local model or API key by itself; node src/main.ts --check tests it; see QUICKSTART.md)"