Grok Build: How to Install and Run xAI's New Coding Agent (2026)
Quick answer. Install xAI's Grok Build with curl -fsSL https://x.ai/cli/install.sh | bash, then run grok inside a repo. First launch opens a browser to sign in with a SuperGrok Heavy account; for headless use set GROK_CODE_XAI_API_KEY="xai-...". It is an early beta, SuperGrok Heavy only (~$300/mo, $99/mo intro).
On 14 May 2026 xAI shipped Grok Build, an agentic command-line coding tool that runs in your terminal, edits files, runs shell commands, and builds applications from natural-language prompts. It lands squarely against Anthropic's Claude Code and OpenAI's Codex CLI. This guide is the practical version: the real install command, how authentication works, the agentic loop and Plan Mode, what models and pricing you are signing up for, the known rough edges of an early beta, and a short, honest comparison so you can decide whether to switch.
Everything below is grounded in xAI's launch post and the official docs at docs.x.ai/build. Where a number is vendor-reported or not yet confirmed in the docs, it is labelled as such — Grok Build is days old and parts of the SERP are already running ahead of what xAI has actually documented.
What is Grok Build and why does it matter?
Grok Build is xAI's first agentic CLI. The distinction matters: it does not just answer questions about code, it takes actions in your working tree. Per xAI's launch announcement, it can plan a change, write and edit files, execute shell commands, and iterate against build and test output until the task is done.
Three things make it worth a serious developer's attention:
- It is a real terminal agent, not a chat box. Same category as Claude Code and Codex CLI — it owns the edit-run-test loop, not just the suggestion.
- It reuses the ecosystem you already built. xAI states that
AGENTS.md, plugins, hooks, skills, and MCP servers work out of the box. If you have tooling built around the Claude Code / Codex conventions, most of it carries over instead of being rewritten. - It leans on a multi-agent architecture. For larger jobs Grok Build delegates work to subagents that run in parallel, with each able to operate in an isolated Git worktree so concurrent edits do not collide.
The headline trade-off: it is gated behind xAI's top subscription tier and it is an explicit early beta. You are getting an aggressive, capable tool with acknowledged rough edges, not a hardened release.
How do you install Grok Build?
The official install is a single command from the docs:
curl -fsSL https://x.ai/cli/install.sh | bashAs with any curl | bash installer, inspect the script before piping it to a shell if you are on a managed or production machine:
curl -fsSL https://x.ai/cli/install.sh -o grok-install.sh
less grok-install.sh # read it
bash grok-install.sh # then run itThat places a grok binary on your PATH. Confirm it landed:
grok --version
which grokNote that an unrelated open-source project (superagent-ai/grok-cli) also installs a grok-style command against the public Grok API. That is a community wrapper, not xAI's Grok Build. If you previously installed a community Grok CLI, check which binary which grok resolves to before assuming you are running xAI's agent.
How do you run Grok Build the first time?
Change into a repository and launch the interactive TUI:
cd ~/code/your-project
grokOn first launch Grok Build opens a browser window for authentication. Sign in with the account that holds your SuperGrok Heavy subscription — beta access is tied to that subscription, not to a plain API key.
Good first prompts to sanity-check it picked up your repo, taken from xAI's getting-started docs:
Explain this repo@src/main.rs Walk me through this file(the@pathsyntax pins a file into context)
To see exactly what Grok Build detected in the working directory — config sources, instructions, skills, plugins, hooks, and MCP servers — run:
grok inspectThis is the fastest way to confirm your AGENTS.md and MCP servers were actually loaded before you trust the agent with a real change.
How do you authenticate without a browser?
Browser sign-in is fine on a workstation, but breaks on a headless server, a CI runner, or a remote container. For those environments the docs specify an API-key path: set an environment variable to an xAI key.
export GROK_CODE_XAI_API_KEY="xai-..."You get the xai-... key from the xAI developer console (console.x.ai): sign in, go to API Keys → Create API Key, and copy the string immediately — it is shown once. Persist the export in your shell profile or, better, inject it from your CI secret store rather than committing it.
For non-interactive use, Grok Build also supports a headless mode so you can drive it from scripts:
# one-shot, print the answer and exit
grok -p "Explain the architecture of this service"
# machine-readable streaming output for pipelines
grok -p "List every TODO and the file it is in" --output-format streaming-jsonCaveat: the relationship between the SuperGrok Heavy beta entitlement and a standalone xai- API key during the early beta is not fully spelled out in the public docs. Treat headless API-key auth as the documented mechanism, but expect the exact entitlement rules to firm up as the beta matures.
What does the core workflow and Plan Mode look like?
Grok Build's safety story is Plan Mode: plan, review, approve. Rather than touching files immediately, the agent first writes a structured plan describing the change file by file and step by step. You can read it, comment on individual steps, rewrite the plan, or reject it. Only after you approve does the agent execute, and every change surfaces as a clean diff you review before it lands.
The practical loop looks like this:
- Prompt. Describe the change in natural language, optionally pinning files with
@path. - Plan. Grok Build proposes a step-by-step plan. Nothing has been written yet.
- Review. You approve, edit, or reject the plan. This is the gate that prevents an agent from charging off on a misread task.
- Execute. The agent edits files and runs shell commands, delegating to parallel subagents for larger jobs.
- Diff. Changes come back as reviewable diffs before they are committed.
For bigger tasks, xAI describes a multi-agent architecture where work is split across subagents running in parallel, optionally in isolated Git worktrees so simultaneous edits to different parts of the codebase do not conflict. Multiple secondary writeups put the parallel subagent count at "up to 8"; xAI's own framing emphasises the Heavy multi-agent architecture rather than committing to a fixed public number, so treat the exact concurrency as reported, not confirmed.
Model selection works in both modes:
# headless
grok -p "Refactor the auth module" -m <model-name>
# inside the TUI
/model <model-name>Which models and pricing does Grok Build use?
Grok Build runs on xAI's current Grok 4-generation frontier models. The exact public version label is where the SERP disagrees with itself: xAI's materials describe a "Grok 4 Heavy"-class multi-agent setup, while several secondary outlets cite a "Grok 4.3 beta" with a very large context window. Because the precise version string and context size are not nailed down in xAI's own published docs at time of writing, treat specific numbers (for example a "2M-token context") as vendor-/press-reported and unverified rather than guaranteed.
What is consistently reported on pricing:
| Item | Detail | Confidence |
|---|---|---|
| Access tier | SuperGrok Heavy subscribers only (early beta) | Confirmed by xAI |
| Standard price | ~$300/month for SuperGrok Heavy | Widely reported |
| Intro offer | ~$99/month for the first 6 months (early adopters) | Widely reported, vendor promo |
| Headless API key | xai- key from console.x.ai for non-browser auth | Documented |
| Context window | Reported as very large (some sources: ~2M tokens) | Unverified — not in xAI docs |
The honest read: if you are not already a SuperGrok Heavy subscriber, the cost of entry is the subscription, not a metered API bill. At $300/month list (or $99/month intro), it is priced as professional team tooling, comparable in spirit to a heavy Claude Code or Codex CLI seat.
How does Grok Build compare to Claude Code and Codex CLI?
All three are terminal-native agentic coders that own the edit-run-test loop. At a high level:
| Grok Build | Claude Code | Codex CLI | |
|---|---|---|---|
| Vendor | xAI | Anthropic | OpenAI |
| Maturity | Early beta (May 2026) | Mature, GA | Mature, GA |
| Plan-then-execute gate | Yes (Plan Mode) | Yes (plan mode) | Yes |
| Parallel subagents | Yes (Heavy multi-agent) | Yes (subagents) | Yes |
| Ecosystem reuse | AGENTS.md, MCP, skills, hooks | AGENTS.md/CLAUDE.md, MCP | AGENTS.md, MCP |
| Access model | Top subscription tier (beta) | API / subscription | API / subscription |
Where Grok Build is interesting: it deliberately copied the conventions that already won (AGENTS.md, MCP, skills, hooks), so the switching cost from a Claude Code or Codex setup is low — your existing config largely carries over. Its differentiator pitch is the Heavy multi-agent architecture plus a very large context window for codebases that routinely exceed a couple hundred thousand tokens.
Where it is behind: it is days-old beta software from a vendor known for shipping fast and patching in public. For anything in a production CI/CD path today, the mature options remain the safer default until Grok Build reaches GA.
Companion guide
For where Grok Build fits alongside Claude Code, Codex CLI, Cursor, and the rest of the agentic tooling landscape, see our complete guide to AI coding agents in 2026.
What are the known issues in the first release?
xAI is unusually direct that this is rough. From the launch framing and the docs, expect:
- Commands that do not work yet. Surface area is incomplete; some documented behaviours are still landing.
- Incomplete error handling. Failure modes are not all graceful — an agent run can stop or misbehave without a clean explanation.
- Subagent coordination regressions. The multi-agent parallelism is the newest part and the most likely to misfire on complex jobs.
- Beta gating. SuperGrok Heavy only — no free or lower-tier path during early beta.
- Docs lag the press. Several specs circulating online (exact model version, context size, subagent count) are not yet pinned down in xAI's own docs. Verify against
docs.x.ai/buildbefore you depend on a number.
The pragmatic posture: use Grok Build for exploratory and local work where Plan Mode keeps you in control, send bugs via /feedback inside the CLI, and keep Claude Code or Codex CLI on the critical path until Grok Build hits GA.
Who should adopt Grok Build now?
Reasonable to try it today if at least one of these is true:
- Your codebase regularly blows past 200K tokens of relevant context and you want the large-context, multi-agent angle.
- You have been burned by agents that start executing before they have actually understood the task — Plan Mode is the direct answer to that.
- You are evaluating tooling for a team that already has budget for ~$300/month-class developer tools and you want a real third option next to Anthropic and OpenAI.
Hold off if you need it in production CI/CD now, you are cost-sensitive, or you cannot tolerate beta breakage in your core workflow.
Hiring for agentic coding tooling?
Standing up agentic coders like Grok Build, Claude Code, or Codex CLI across a team — harnesses, guardrails, MCP servers, evals, cost controls — is real engineering, not a config tweak. If you are hiring vetted remote developers experienced with agentic coding tooling and AI dev infrastructure, codersera.com/hire matches you with engineers who have shipped this in production, with a risk-free trial so you can validate technical fit before you commit.
FAQ
What is the Grok Build install command?
Per xAI's docs, install with curl -fsSL https://x.ai/cli/install.sh | bash. That puts a grok binary on your PATH. Verify with grok --version. On a managed machine, download the script and read it before running it rather than piping straight to bash.
Do I need a paid subscription to use Grok Build?
Yes. During the early beta, Grok Build is limited to SuperGrok Heavy subscribers. That tier is widely reported at roughly $300/month, with an introductory offer around $99/month for the first six months. There is no free tier for the beta.
How do I authenticate Grok Build on a headless server?
Browser sign-in is the default, but for headless or CI use the docs specify setting GROK_CODE_XAI_API_KEY="xai-..." with a key from console.x.ai (API Keys → Create API Key). Inject it from a secrets store; never commit it.
What model does Grok Build run on?
It runs on xAI's current Grok 4-generation frontier models in a Heavy multi-agent configuration. The exact public version label and context window are reported inconsistently across press coverage and are not pinned in xAI's published docs yet, so treat specific figures as vendor-/press-reported and verify at docs.x.ai/build.
How is Grok Build different from Claude Code?
Functionally they are the same category: terminal agents with a plan-then-execute gate and parallel subagents. Grok Build deliberately reuses Claude/Codex-era conventions (AGENTS.md, MCP, skills, hooks), so switching cost is low. The main practical difference today is maturity — Claude Code is GA, Grok Build is early beta with acknowledged rough edges.
Is Grok Build safe to use in production pipelines?
Not yet recommended. xAI explicitly frames this as early beta with incomplete error handling and subagent-coordination issues. Use it for local and exploratory work behind Plan Mode, and keep a mature agent (Claude Code or Codex CLI) on production CI/CD paths until Grok Build reaches GA.
How do I report a bug in Grok Build?
Type /feedback inside the Grok Build CLI to send bugs, requests, and reactions directly to the xAI team. xAI states beta feedback is the fastest route to fixes, which is consistent with their ship-fast, patch-in-public cadence.