Set Up a Windows PC for AI Development in One Command
A single PowerShell command that installs everything you need for AI-assisted development — Node.js, Python, Git, VS Code, Google Antigravity, and OpenCode — silently, in about 10–15 minutes.
What This Installs
Node.js (LTS)JavaScript runtime — React, npm, APIsPython 3.12Scripting, calling LLM APIsGitVersion control, GitHubVS CodeCode editorGoogle AntigravityAI-first IDE (agentic coding)Windows TerminalModern terminal7-ZipFile extractionOpenCodeTerminal-native AI agent (via npm)
How to Run It
Step 1 — Press Start, type powershell, right-click → Run as administrator
Step 2 — Paste this entire command and press Enter:
PowerShell
Set-ExecutionPolicy -Scope Process Bypass -Force -ErrorAction SilentlyContinue; Set-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force -ErrorAction SilentlyContinue; $ErrorActionPreference='Continue'; $log="$env:USERPROFILE\workshop_setup.log"; "=== SETUP $(Get-Date) ==="|Out-File $log; function S($m){Write-Host "`n>>> $m" -ForegroundColor Cyan; ">>> $m"|Out-File $log -Append}; function OK($m){Write-Host " [OK] $m" -ForegroundColor Green; "[OK] $m"|Out-File $log -Append}; function NO($m){Write-Host " [FAIL] $m" -ForegroundColor Red; "[FAIL] $m"|Out-File $log -Append}; S "Checking winget..."; $w=Get-Command winget -ErrorAction SilentlyContinue; if(-not $w){try{Add-AppxPackage -Path 'https://aka.ms/getwinget' -ErrorAction SilentlyContinue;Start-Sleep 6;$w=Get-Command winget -ErrorAction SilentlyContinue}catch{}}; if($w){OK "winget ready"}else{NO "winget missing - install App Installer from Store"}; $apps=@('OpenJS.NodeJS.LTS','Python.Python.3.12','Git.Git','Microsoft.VisualStudioCode','Google.Antigravity','Google.AntigravityIDE','7zip.7zip'); foreach($a in $apps){; S "Installing $a..."; if($w){winget install --id $a --source winget --silent --accept-package-agreements --accept-source-agreements --disable-interactivity 2>&1|Out-File $log -Append; if($LASTEXITCODE -eq 0){OK "$a installed"}else{NO "$a (code $LASTEXITCODE - may already exist)"}; }else{NO "skipped $a"}; }; S "Checking Windows Terminal..."; if(Get-Command wt -ErrorAction SilentlyContinue){OK "Windows Terminal already present"}; else{winget install --id Microsoft.WindowsTerminal --source winget --silent --accept-package-agreements --accept-source-agreements --disable-interactivity 2>&1|Out-File $log -Append; OK "Windows Terminal install attempted"}; S "Refreshing PATH..."; $env:Path=[Environment]::GetEnvironmentVariable('Path','Machine')+';'+[Environment]::GetEnvironmentVariable('Path','User'); $env:Path="$env:Path;$env:APPDATA\npm"; S "Installing OpenCode CLI..."; $npm=Get-Command npm.cmd -ErrorAction SilentlyContinue; if($npm){; & npm.cmd install -g opencode-ai 2>&1|Out-File $log -Append; Start-Sleep -Seconds 3; $env:Path="$env:Path;$env:APPDATA\npm"; if(Get-Command opencode -ErrorAction SilentlyContinue){OK "OpenCode ready"}; elseif(Test-Path "$env:APPDATA\npm\opencode.cmd"){OK "OpenCode installed (reopen terminal to use)"}; else{NO "OpenCode install failed - see log"}; }else{; S "npm not found - trying direct OpenCode download..."; try{; $ver=(Invoke-RestMethod https://api.github.com/repos/sst/opencode/releases/latest -Headers @{'User-Agent'='setup'}).tag_name; Invoke-WebRequest "https://github.com/sst/opencode/releases/download/$ver/opencode-windows-x86_64.zip" -OutFile "$env:TEMP\opencode.zip" -UseBasicParsing; Expand-Archive "$env:TEMP\opencode.zip" -DestinationPath "$env:USERPROFILE\opencode" -Force; [Environment]::SetEnvironmentVariable('Path',[Environment]::GetEnvironmentVariable('Path','User')+";$env:USERPROFILE\opencode",'User'); OK "OpenCode downloaded to ~\opencode"; }catch{NO "OpenCode download failed: $_"}; }; S "Creating workspace..."; $ws="$env:USERPROFILE\ai-workshop";New-Item -ItemType Directory -Force -Path $ws|Out-Null; if(Test-Path $ws){OK "Workspace: $ws"}; S "Verifying..."; $checks=@(@{n='Node';c='node --version'},@{n='npm';c='npm.cmd --version'},@{n='Python';c='python --version'},@{n='Git';c='git --version'},@{n='VS Code';c='code --version'},@{n='OpenCode';c='opencode --version'}); foreach($x in $checks){; $o = (& powershell -NoProfile -Command $x.c 2>&1 | Out-String).Trim(); if($o){OK "$($x.n): $($o.Split("`n")[0].Trim())"}else{NO "$($x.n) not on PATH (reopen terminal)"}; }; S "DONE. Log: $log"; Write-Host "`nAll installed! Close this window, open a NEW PowerShell, then: cd ~\ai-workshop && code . (or Antigravity)" -ForegroundColor Green; Write-Host "First launch of Antigravity/OpenCode asks you to sign in with Google." -ForegroundColor Yellow
Step 3 — Wait 10–15 minutes (progress shows as >>> markers; most time is Google Antigravity's download)
Step 4 — When you see DONE, close & reopen PowerShell
Step 5 — Verify:
PowerShell
node --version
npm --version
python --version
git --version
code --version
opencode --version
What the Command Does
#StepDetails1Check wingetInstalls Windows Package Manager if missing2Install core toolsNode, Python, Git, VS Code, Antigravity, Terminal, 7-Zip — all silent3Refresh PATHTools work without reboot4Install OpenCodenpm install -g opencode-ai5Create workspaceC:\Users\<you>\ai-workshop6VerifyPrints versions, marks [OK] / [FAIL]7LogEverything saved to workshop_setup.log
Notes
- Admin required — must run as Administrator or installs fail
- Re-run is safe — already-installed tools are skipped
- First launch — Antigravity & OpenCode ask for Google sign-in once (normal)
fix the Execution Policies
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force
$env:Path=[Environment]::GetEnvironmentVariable('Path','Machine')+';'+[Environment]::GetEnvironmentVariable('Path','User')
npm.cmd install -g opencode-ai
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force; $env:Path=[Environment]::GetEnvironmentVariable('Path','Machine')+';'+[Environment]::GetEnvironmentVariable('Path','User'); npm.cmd install -g opencode-ai
Team Stero Sonic Labs