Skip to main content
AI Choice Engine
← All setup guides

SpaceXAI · Setup guide

How to set up Grok Build

Install Grok Build, authenticate through the documented account or key path, and explicitly select permissions and a sandbox before a bounded first task. It currently advertises Grok 4.7; custom model endpoints and ACP integrations are also documented.

Grok Build

terminal · checked October 2, 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 Git repository if you want worktree isolation. Parallel child sessions do not all receive worktrees automatically; request isolation for writing workers.

Authentication

Browser authentication or XAI_API_KEY

Account: xAI account with Grok Build access

Browser sign-in is the default interactive path. grok login --device-auth supports hosts without a browser; XAI_API_KEY supports scripts. Per-model configured credentials can take precedence over session tokens and the environment key. Keep keys out of prompts, repositories and logs; enterprise policy can restrict login methods.

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

    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 and explicitly enable a sandbox: Ask permissions are the default, but the sandbox is off by default. The workspace profile limits writes and leaves child network access enabled. Review custom deny paths before exposing credentials.

    bash
    grok --sandbox workspace

    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. 02Enter /plan and keep Ask permissions. Plan mode gates edit tools except the session plan file; shell commands can still write and full-capability children do not inherit its edit gate. Use explore/plan child types for read-only delegation and inspect actual tool calls.
  3. 03Review the diff and run the repository test command before trying parallel agents.

Why this is safe: A bounded task lets you inspect permissions, tool calls and the diff. A written plan is a review step; the permission rules and sandbox establish separate execution limits.

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

Consumer, API and enterprise routes have separate terms. The enterprise FAQ excludes business-data training unless agreed in exchange for credits. Grok Build's enterprise ZDR is team-configured and skips inference-layer content persistence; local history in ~/.grok and remote session sharing are separate.

Training on code: tier dependent

Confirm the actual team ZDR setting, region and endpoint. Consumer privacy terms explicitly exclude business API processing, so they cannot establish an API retention guarantee.

Sensitive repos: Use a disposable repository and explicit permission rules. Built-in sandbox profiles do not permanently protect ~/.ssh; custom deny paths are needed. Child-network restrictions apply on Linux but are no-ops on macOS for read-only/strict, and in-process API/web traffic is separate.

Pricing

Grok Build is free to try. October 2 x.ai pricing lists SuperGrok $30/month and Plus $100/month, with Plus advertising higher Build usage. Exact Build allowances and the extracted feature-table eligibility are unresolved; API keys and custom providers have separate billing.

Model: hybrid

Watch out: Do not assume unlimited free usage or transfer a consumer subscription allowance to API calls. Parallel child sessions can add inference usage. The client changelog lists 1.0.46 dated September 30; this is separate from the Grok 4.7 model release.

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 grok login --device-auth when browser login is unavailable, or the documented API-key path for CI. Confirm enterprise login policy and never commit or paste a key.

  • A parallel task produces conflicting changes.

    Request separate worktrees for writing workers and assign non-overlapping files. Ending a Grok session does not remove its worktree: review pending changes, then use grok worktree list/rm to clean up only disposable owned worktrees.

  • 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 October 2, 2026; use the official source below before installing in a managed or production environment.