xAI open-sourced Grok Build, its terminal-native AI coding agent, on July 15, 2026, publishing the full Rust codebase on GitHub under an Apache 2.0 license. The release lets any developer compile the tool locally, point it at any model, and run it with no server-side usage caps. It also arrives days after security researchers found that Grok Build had been syncing entire code repositories to xAI's cloud, and the open-source move is xAI's direct answer to that trust problem. Here is exactly what shipped, how it compares to Claude Code, OpenAI Codex CLI, and Gemini CLI, and how to install and run it yourself.

What xAI Actually Shipped

Grok Build is a full-screen terminal user interface that reads your codebase, edits files, runs shell commands, searches the web, and manages long-running tasks. It first launched in beta in May 2026 as a cloud-tethered product aimed at professional engineers working in large repositories. The July 15 release changes the distribution model rather than the feature set: the code is now public, written almost entirely in Rust, and runs on Grok 4.5, the model xAI shipped on July 8, 2026.

Three concrete things changed with the open-source release. First, server-side usage limits were reset for all users, and the tool can now run without cloud-imposed caps when pointed at local or third-party inference. Second, xAI committed to deleting previously uploaded user data and disabling data retention going forward, with Elon Musk stating that "zero anything whatsoever will remain." Third, because the binary can now be compiled from source, teams can audit exactly what the agent sends over the network before they trust it with a private repository. External contributions are not yet accepted, and the public repo is described as synced periodically from xAI's internal monorepo.

Grok Build terminal coding agent interface
Grok Build runs as a full-screen terminal UI that edits files and runs commands.

Grok Build vs Claude Code, Codex CLI, and Gemini CLI

Open-sourcing puts Grok Build in the same category as the other terminal coding agents that developers already run. The practical differences come down to whether the tool is open source, what language it is built in, which model it defaults to, and whether you can retarget it at local inference. Here is how the four line up as of July 2026.

ToolOpen sourceLanguageDefault modelLocal inferenceLicense
Grok BuildYes (Jul 15, 2026)RustGrok 4.5Yes, via config.toml custom modelApache 2.0
Claude CodeNoTypeScript / NodeClaude Opus and SonnetNo, cloud API onlyProprietary
OpenAI Codex CLIYesRustGPT-5 classYes, via custom providerApache 2.0
Gemini CLIYesTypeScriptGeminiYes, via custom endpointApache 2.0

The takeaway: Grok Build now matches Codex CLI and Gemini CLI on openness and local-model flexibility, and it shares Codex CLI's Rust foundation, which tends to mean faster startup and a single self-contained binary. Claude Code remains the outlier as a proprietary, cloud-only agent, which is a deliberate trade of auditability for a tightly managed experience. If you have already read our Grok 4.5 vs Opus 4.8 vs GPT-5.6 coding comparison, this is the tooling layer that sits on top of those models.

Why Open-Sourcing Follows the Data-Upload Scandal

The timing is not a coincidence. Shortly before this release, a security researcher demonstrated that Grok Build had been syncing complete repositories to the cloud, not snippets and not metadata but entire repos, and that it did so even when users had privacy settings enabled. We covered that finding in detail in Grok Build CLI uploaded full repos and secrets to xAI. For a tool aimed at professional engineers, uploading a private codebase, along with any API keys and secrets committed to it, is close to a worst-case behavior.

Open-sourcing is the strongest possible response because it moves the trust question from "take our word for it" to "read the code." When the client is compiled from source and configured to hit a local or self-hosted endpoint, xAI is removed from the data pipeline entirely. Combined with the data-deletion commitment and disabled retention, the release reframes Grok Build from a liability into an agent teams can actually run against sensitive repositories. It is a useful reminder that with any AI coding agent, the network boundary matters as much as the model quality.

Local inference config for an open-source coding agent
Running the agent against local inference removes the vendor from the data path.

How to Install and Run Grok Build Locally

Getting a private, cap-free setup running takes about five steps. All commands below come from xAI's Grok Build documentation.

  1. Install the CLI. On macOS or Linux run curl -fsSL https://x.ai/cli/install.sh | bash. On Windows run irm https://x.ai/cli/install.ps1 | iex. Prebuilt binaries exist for all three platforms.
  2. Start it in a project. Run cd your-project then grok to open the full-screen terminal UI, or use headless mode with grok -p "Explain this codebase" for scripts and CI.
  3. Point it at your own model. Edit ~/.grok/config.toml and add a model block with a base_url for a local inference server, a self-hosted endpoint, or another provider, then set it as the default under [models].
  4. Verify and select. Run grok inspect to confirm the config resolves, then grok -p "Hello" -m my-model, or switch inside the TUI with /model my-model.
  5. Wire it into your editor. Grok Build speaks the Agent Client Protocol (ACP), so it can drive edits from a compatible editor as well as from the terminal.

Because the config lives in a plain TOML file and the model endpoint is a single field, the same install can talk to Grok 4.5 in the cloud for heavy tasks and to a local model for private ones, without reinstalling anything.

What This Enables for Builders

The open-source release turns Grok Build from a hosted convenience into infrastructure you control. For a solo developer, that means an agentic coding workflow with no monthly cap and no repo leaving your machine. For a team on regulated or proprietary code, it means you can audit the client, self-host the model, and give an AI agent access to the codebase without a vendor sitting in the middle. And for anyone comparing agents, it lowers the switching cost: the same TOML config that points Grok Build at Grok 4.5 can point it at a local model or a competitor's API, so you can benchmark tools and models independently. If you have been holding back on terminal coding agents over data-handling worries, this is the release that removes the excuse to at least test one.

Developer comparing open-source terminal coding agents
Open source lowers the cost of switching between coding agents and models.

Frequently Asked Questions

Is Grok Build free now that it is open source?

The source code is free under Apache 2.0, and you can compile and run the client at no cost. What you pay for is inference: using Grok 4.5 through xAI's API still costs money, but pointing the tool at a local or self-hosted model can bring your usage cost to zero beyond your own hardware.

What license does Grok Build use?

Apache License 2.0, which permits commercial use, modification, and redistribution. External contributions are not currently accepted, and the public repository is synced periodically from xAI's internal monorepo.

Can I run Grok Build without sending my code to xAI?

Yes. Because the client is now open source, you can compile it yourself and configure ~/.grok/config.toml to hit a local inference server or a self-hosted endpoint. Doing so keeps your repository off xAI's cloud entirely.

What happened to the data Grok Build already uploaded?

xAI committed to permanently deleting all previously uploaded user data and disabling data retention going forward, following the security finding that the tool had been syncing entire repositories to the cloud even with privacy settings enabled.

How is Grok Build different from OpenAI Codex CLI?

Both are open-source, Rust-based terminal coding agents under Apache 2.0 with support for custom model endpoints. The main difference is the default model: Grok Build runs on Grok 4.5, while Codex CLI targets OpenAI's GPT-5 class models. Both can be retargeted at other providers through config.

Which model does Grok Build run on?

By default it runs on Grok 4.5, released July 8, 2026. Through the config file you can swap in a local model or another provider's endpoint and select it with the -m flag or the in-app /model command.