How to Run Grok Build on Windows
By CodeAgentSwarm · Updated October 31, 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. xAI also publishes a WinGet package, xAI.GrokBuild. If you install that way, update with winget upgrade --id xAI.GrokBuild -e rather than grok update, and expect new releases to reach WinGet a few days later (see the official getting started guide).
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
Does Grok Build support Windows?
Yes. Use the PowerShell installer, the WinGet package xAI.GrokBuild, or Git Bash / WSL with the bash script.
Where is config stored on Windows?
Typically %USERPROFILE%\.grok unless GROK_HOME is set.