How to Run Grok Build on Windows
Updated July 28, 2026
%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
irm https://x.ai/cli/install.ps1 | iex
grok --versionThe 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.