Grok Build Open Source: Beginner Guide and Comparison
xAI open-sourced Grok Build on July 15, 2026, under Apache 2.0. The timing was not subtle — the announcement came roughly 24 hours after the developer community discovered that Grok Build was quietly uploading entire directories (SSH keys, .env files, password databases) to xAI’s Google Cloud buckets. The open-source release wasn’t a planned roadmap milestone. It was damage control. And honestly, it worked — at least for the people who care about reading source code.
This beginner guide walks through what Grok Build actually is, how to set it up after the open-source release, and how it compares to Claude Code, OpenAI Codex, and OpenCode. If you’re trying to figure out which coding agent to invest time in, the comparison section should help.
What Grok Build is (and what it’s not)
Grok Build is a terminal-based AI coding agent. It runs as a full-screen TUI (terminal user interface) that understands your codebase, edits files, runs shell commands, searches the web, and manages long-running tasks. Under the hood, it’s written in Rust and powered by Grok 4.5 — xAI’s current flagship model.
The agent connects to your project through the Agent Client Protocol (ACP), which lets it operate interactively (you watch and approve changes), headlessly (for CI/CD pipelines), or embedded in editors via plugins.
It is not a general-purpose AI assistant. It’s not a chatbot. It’s a tool that lives in your terminal and modifies your code. Think of it as an intern who knows your entire repo, works fast, and occasionally does something catastrophically wrong that you only notice three commits later.
The privacy controversy (and what changed)
Here’s what happened: developers noticed network traffic from Grok Build going to Google Cloud domains. Investigation revealed the tool was uploading directory contents — not just the files you explicitly asked it to work with, but everything in the directory tree. This included sensitive files that absolutely should not leave a developer’s machine.
The backlash was immediate and severe. Developers posted packet capture logs. People found their SSH keys in transit. The phrase “trust thermocline” started trending because this was exactly the kind of event that permanently damages trust in a tool — the point where users stop assuming good intent and start assuming malice.
xAI’s response came in three parts:
- Data deletion: All retained data from Grok Build users was deleted. xAI claims this is complete, though there’s no independent audit yet.
- Retention disabled: Default data retention was turned off for all Grok Build users starting July 12. Previously, data was retained by default; now it’s opt-in.
- Open source: The entire Grok Build harness was published on GitHub under Apache 2.0. You can read every line of code that handles your files.
The open-source release is the most meaningful of these, because it’s verifiable. You can audit the code, confirm it doesn’t exfiltrate data, and even run it fully locally with your own inference backend. xAI says you can run Grok Build “fully open-sourced and local-first with your own inference.” That’s a significant shift from the closed-source, cloud-dependent tool it was a week ago.
Beginner setup guide: installing Grok Build
The installation path depends on whether you want the managed version (uses xAI’s API, easier setup) or the fully local version (uses your own model, zero data leaves your machine).
Option 1: Managed install (simplest)
# Install via Homebrew (macOS)
brew install xai/tap/grok-build
# Or download the binary directly
curl -fsSL https://install.x.ai/grok-build | bash
# Start an interactive session
grok-build
# Or run headlessly with a prompt
grok-build --prompt "Add type hints to src/utils.py"
The managed install sends your prompts and file contents to xAI’s API. After the privacy changes, xAI says data is not retained by default. Whether you trust that is a personal decision — but the open-source code gives you the option to verify, which is more than you get from most SaaS coding tools.
Option 2: Local-first install (maximum privacy)
# Clone the repo
git clone https://github.com/xai-org/grok-build.git
cd grok-build
# Build from source (requires Rust toolchain)
cargo build --release
# Configure local inference
grok-build config set provider ollama
grok-build config set model grok-4.5-local
# Run locally — zero data leaves your machine
grok-build --local
The local setup requires a model that can handle coding tasks. If you don’t have a Grok 4.5-compatible model locally, you can point it at other providers that support the ACP protocol. Some users have reported success with Qwen- and DeepSeek-based models through Ollama, though performance varies.
Quick comparison: install difficulty
| Tool | Install time | Local option | Open source |
|---|---|---|---|
| Grok Build | ~2 min (brew) | Yes (Rust build) | Yes (Apache 2.0) |
| Claude Code | ~1 min (npm) | No | No |
| Codex | ~1 min (npm) | No | No |
| OpenCode | ~5 min (build) | Yes (BYO model) | Yes (MIT) |
Grok Build sits in an interesting spot: it’s open source (like OpenCode) but backed by a major AI lab’s model (like Claude Code and Codex). That combination is rare.
Feature comparison: Grok Build vs the field
Codebase understanding
All four tools index your codebase, but they do it differently. Claude Code uses a tree-sitter-based parser that builds a project graph. Codex uses embeddings to search your codebase semantically. Grok Build uses a hybrid approach — AST parsing for structure plus embeddings for semantic search. OpenCode is the simplest, relying on grep and file reading.
In practice, Claude Code has the best codebase understanding for large projects (100+ files). Grok Build is competitive for small to medium projects. Codex excels at finding similar patterns across a codebase. OpenCode is fine if your project fits in a single context window.
Editing capabilities
Grok Build edits files through its TUI, showing diffs before applying changes. Claude Code does the same. Codex operates through an editor plugin (primarily VS Code) and applies edits inline. OpenCode is a CLI tool that outputs patches.
The editing experience on Grok Build is polished — the TUI is responsive, diffs are clear, and the approval flow is intuitive. Claude Code’s TUI is slightly more mature (it’s been in development longer), but the gap is narrow.
Multi-agent support
This is where the tools diverge significantly. Claude Code has the most advanced multi-agent system, with sub-agents, Advisor/Orchestrator patterns, and YAML-based configuration. Codex supports parallel tool calls but not true sub-agent coordination. Grok Build’s multi-agent capabilities are in early stages — the open-source code shows infrastructure for sub-agents, but the documentation is sparse. OpenCode has no multi-agent support.
Pricing
| Tool | Free tier | Paid tier | Notes |
|---|---|---|---|
| Grok Build | Yes (local) | Grok API pricing ($15/1M input tokens) | Local is free if you run your own model |
| Claude Code | Limited free | $20/month (Pro) or API pricing | Pro includes Claude Code access |
| Codex | Free (OpenAI) | API pricing | Included with ChatGPT Plus |
| OpenCode | Free | Free | You pay for your own model inference |
Grok Build’s local-first option makes it the cheapest if you already have a capable local model. Claude Code has the best value-to-quality ratio at $20/month. Codex is free with Plus but limited to OpenAI models. OpenCode is free but you need your own inference.
Privacy posture
After the controversy, Grok Build now has the strongest privacy story — assuming you use the local setup. You can read every line of code, verify it doesn’t phone home, and run it fully air-gapped. No other coding agent from a major AI lab offers this.
Claude Code and Codex are closed source and cloud-dependent. You’re trusting Anthropic and OpenAI respectively with your codebase. Both have strong privacy policies (data not used for training, retention limits), but policies aren’t code — you can’t verify them.
Who should use Grok Build
You should try Grok Build if:
- You care about open-source verifiability and want to audit your coding agent’s behavior
- You work with sensitive code (fintech, healthcare, defense) and need air-gapped operation
- You want a polished TUI experience without vendor lock-in
- You’re already in the xAI/Grok ecosystem
- You’re willing to accept that the tool is newer and has fewer integrations than Claude Code
You should probably skip Grok Build if:
- You need battle-tested multi-agent orchestration for large codebases — Claude Code is further ahead
- You want deep editor integration — Codex’s VS Code plugin is more mature
- You need a coding agent that “just works” without configuration — Claude Code’s managed experience is smoother
- The privacy concerns, even after the fixes, make you uncomfortable — the trust damage is real and won’t heal overnight
The open-source reality: what’s actually in the repo
The GitHub repo (xai-org/grok-build) has gathered about 4,500 stars in its first few days. External pull requests are disabled. Issues are locked. This is “open source” in the source-available sense — you can read it, fork it, and run it, but you can’t contribute back. xAI is keeping control of the roadmap.
The codebase is well-structured Rust with clear module boundaries. The ACP protocol implementation is the most interesting part — it defines how agents communicate with editors, CI systems, and other tools. If ACP gains traction, it could become a standard that multiple coding agents implement, similar to how LSP standardized language server communication.
One thing I looked for immediately: data exfiltration paths. The open-source code confirms that the local-first mode does not initiate outbound network connections beyond what you explicitly configure. The managed mode sends data to xAI’s API, which is expected and documented. The code is clean — no hidden telemetry, no sneaky uploads. That doesn’t retroactively fix the trust breach, but it does mean the current version is verifiably clean.
What happens next
xAI is in an awkward position. They’ve done the right thing technically — open-sourced the code, deleted the data, turned off retention — but the thermocline is real. Developers who discovered their SSH keys in transit aren’t going to forget that. Trust takes years to build and seconds to break.
The smart play for xAI would be to commission an independent security audit and publish the results. Without third-party verification, “trust us, we deleted everything” is just words. With an audit, they can credibly claim the tool is safe to use. Until that happens, the safest path is the local-only setup.
For the broader coding agent landscape, Grok Build’s open-sourcing puts pressure on Anthropic and OpenAI. When a major competitor offers an Apache 2.0-licensed coding agent, the “trust our cloud” model starts looking fragile. I’d expect both companies to respond — either with open-source releases of their own, or with stronger privacy guarantees backed by technical measures, not just policy documents.
Sources
- Grok Build GitHub repository: github.com/xai-org/grok-build
- xAI Build documentation: docs.x.ai/build/overview
- Simon Willison, “xai-org/grok-build, now open source,” simonwillison.net, July 15, 2026
- TechRepublic, “SpaceXAI Open-Sources Grok Build After Privacy Backlash,” July 2026
- OpenSourceForU, “xAI Open Sources Grok Build After Repository Upload Controversy,” July 2026
- explainx.ai, “Grok Build Open Source: Install, License, Privacy,” July 2026