How to Run Grok Build on Windows

Updated July 28, 2026

Grok Build runs on Windows. The official path is the PowerShell installer (or the bash installer under Git Bash / WSL). Data lands under %USERPROFILE%\.grok\ unless you set GROK_HOME. Grok Build is xAI's coding CLI (grok), not the consumer Grok chat app.

Install on Windows

powershell
# PowerShell
irm https://x.ai/cli/install.ps1 | iex
grok --version

The PowerShell installer adds %USERPROFILE%\.grok\bin to your user PATH. Open a new terminal after install. Alternatively use Git Bash with the curl installer, or WSL for a Linux-like environment.

If grok is not found, close and reopen the terminal, or check that %USERPROFILE%\.grok\bin is on PATH.

WSL vs native

WSL installs the Linux binary and uses the Linux home for ~/.grok. Native Windows keeps config under your Windows user profile. Pick one home for a given project to avoid split session history.

CodeAgentSwarm on Windows

CodeAgentSwarm for Windows can launch Grok Build once the CLI is on PATH. Use the same agent picker as on macOS. For path quirks with conversation history, keep project paths consistent (avoid mixing WSL and native paths for the same repo).

FAQ

Yes. Use the PowerShell installer or Git Bash / WSL with the bash script.

Typically %USERPROFILE%\.grok unless GROK_HOME is set.

CodeAgentSwarm supports Windows 10/11: install Grok Build, pick it in the agent launcher, supervise it next to your other CLIs.

Download it freemacOS & Windows