Skip to main content
← All setup guides

SpaceXAI · Setup guide

How to set up Grok Build

Install Grok Build (powered by Grok 4.6), authenticate in the browser or with a deliberately scoped API key, and begin with a plan-and-diff task before trying parallel subagents.

Grok Build

terminal · checked August 14, 2026

~12 minIntermediate

The “Open Grok Build” link goes to the vendor site. It is not an affiliate-tracked link on this page — no commission is claimed for that click. Affiliate disclosure.

Critical: finish install before closing the window

Keep the installer terminal open until you see a success message. If you used an admin window, do not close it until verification works. Then open a new Terminal or PowerShell window and run the verify step — PATH updates rarely apply to shells that were already open, especially on Windows.

Before you begin

  • macOS, Linux, Windows, or Git Bash according to the official installer path.
  • An xAI account or API access.
  • A repository with Git worktrees available if you plan to test parallel agents.

Authentication

Browser authentication or XAI_API_KEY

Account: xAI account with Grok Build access

Browser sign-in is the primary interactive path; API keys should be scoped and kept out of prompts, repositories, and logs.

Install or open it

1. Get the harness ready

These steps are written for beginners. On Mac, Terminal is the black/white text window where you type commands. On Windows, use PowerShell or Terminal. Use the OS tabs to hide steps that are not for your computer, then copy one command at a time.

  1. 01

    Open Terminal on a Mac

    Mac

    Click the Spotlight search icon (magnifying glass) at the top-right of the menu bar, or press Command (⌘) + Space. Type Terminal and press Return. A text window opens — that is where you paste the install commands below. Leave it open.

  2. 02

    Open Terminal or PowerShell on Windows

    Windows

    Press the Windows key, type Terminal or PowerShell, then press Enter. Use that window for the commands below. If Windows asks for permission to run a script or install software, read the prompt before approving.

  3. 03

    How to paste a command

    Copy one command at a time from this page. Click inside the terminal window, paste (Mac: ⌘+V, Windows: Ctrl+V or right-click → Paste), then press Return / Enter. Wait until the prompt comes back before running the next command. You do not need to type the leading $ if you see one in other docs.

  4. 04

    Do not close the installer until verified

    Keep the installer terminal (or admin PowerShell) open until the install finishes without errors. Closing early can leave a half-written binary or an incomplete PATH update — especially on Windows.

  5. 05

    Open a new terminal after installers

    PATH updates often only apply to new shells — especially on Windows. Do not close the install session until the installer finishes, then open a fresh Terminal/PowerShell before running --version checks.

  6. 06

    Inspect before you pipe an installer

    Commands like curl … | bash download and run a script immediately. Prefer the official package manager when offered. If you use a curl installer, you can download the script first, open it in a text editor, then run it — never paste installers from random blogs.

  7. 07

    Install on Mac / Linux

    Mac

    Paste the official installer into Terminal. When it finishes, open a new Terminal window before verifying.

    bash
    curl -fsSL https://x.ai/cli/install.sh | bash

    You should see: The installer finishes without an error. Open a new terminal before the verify step so PATH updates apply.

    If this fails
    • The install command errors, or the next verify step says “command not found”. Re-run the official install command with network access, then open a brand-new terminal window before verifying.
    xAI Grok Build overview
  8. 08

    Install on Windows (PowerShell)

    Windows

    Paste the official PowerShell installer. When it finishes, open a new terminal window before verifying. Prefer this over random third-party scripts.

    powershell
    irm https://x.ai/cli/install.ps1 | iex

    You should see: The installer finishes without an error. Open a new terminal before the verify step so PATH updates apply.

    If this fails
    • The install command errors, or the next verify step says “command not found”. Re-run the official install command with network access, then open a brand-new terminal window before verifying.
    xAI Grok Build overview
  9. 09

    Verify the command

    Confirm the binary before allowing a task to inspect or change a repository.

    bash
    grok --version

    You should see: A version string. Open a new terminal after install if the command is missing.

    If this fails
    • The grok command is not found after installation. Open a new terminal so PATH refreshes, then run grok --version. If it is still missing, reinstall from x.ai/cli rather than a community Grok CLI.
    Grok Build repository

Repository or project

2. Start in the right place

Keep the first repository small, clean, and easy to roll back while you learn the harness’s permissions and context model.

  1. 01

    Open the repository

    Start in a clean worktree and confirm the current branch before opening the TUI.

    bash
    cd path/to/your-repository && git status --short

    You should see: The prompt shows you are inside the intended folder (check with `pwd`).

    If this fails
    • “No such file or directory” or you are still in your home folder. Create or clone the practice folder first, then `cd` into it before starting the tool.
  2. 02

    Start interactively

    Use the TUI for the first task so you can see the plan, commands, and diff.

    bash
    grok

    You should see: The tool starts in this folder and waits for your first prompt (or shows a short first-run / sign-in screen).

    If this fails
    • Nothing happens, or you land in the wrong folder. Confirm you are inside the practice repo (`pwd`), that you signed in, and that you opened a new terminal after install.
    xAI Grok Build overview

First run

Plan one isolated change

Use this task to test the workflow before handing over a larger repository or production responsibility.

  1. 01Ask Grok Build to explain the repository and propose a small test-only change.
  2. 02Require plan mode or an explicit plan before execution.
  3. 03Review the diff and run the repository test command before trying parallel agents.

Why this is safe: It tests the plan-then-diff workflow without making parallel workers responsible for a broad change.

Stop and review if

  • The agent attempts to use a global credential or production endpoint.
  • Parallel workers write to the same worktree.
  • The final diff includes generated files or dependency changes that were not planned.

The operating boundary

Privacy, data, and cost

The setup is incomplete until you know what the harness can see, what account pays for it, and who approves a risky action.

Privacy

Grok Build can run interactively or headlessly; API-key and subscription paths have different operational boundaries.

Training on code: tier dependent

Verify current xAI account and API terms for private code and organisation use.

Sensitive repos: Prefer a disposable worktree, use scoped credentials, and inspect headless output before wiring the agent into automation.

Pricing

x.ai currently advertises Grok Build as available to try for Free; fuller parallel capacity may depend on SuperGrok or X Premium+ tiers, while API-key usage follows xAI billing.

Model: hybrid

Watch out: Included usage is 2× for the first week from 2026-08-12 (still running as of 2026-08-14; no published cutoff) — do not size seats on that promo. Parallel subagents increase both spend and review surface; measure successful tasks, not just completion speed.

Estimate a seat stack

When setup goes wrong

  • The grok command is not found after installation.

    Open a new terminal so PATH refreshes, then run grok --version. If it is still missing, reinstall from x.ai/cli rather than a community Grok CLI.

  • Browser authentication cannot complete on a remote machine.

    Use the documented API-key path only in a secure shell environment and never commit or paste the key.

  • A parallel task produces conflicting changes.

    Use separate Git worktrees, assign non-overlapping files, and merge only after each worker passes its own checks.

  • Headless output is hard to audit.

    Start interactively, add structured output only after the local workflow is understood, and store logs outside the repository.

Next steps

After the first successful run

Keep the pilot small, then compare surfaces and budget before a team rollout.

Setup details change quickly. The page was checked August 14, 2026; use the official source below before installing in a managed or production environment.