xAI has published the full source code of Grok Build, its official terminal coding agent, on GitHub under the Apache 2.0 license. The repository, xai-org/grok-build, went live within the last two hours and climbed straight onto the Hacker News front page, giving developers their first open look at the Rust harness behind xAI's answer to Claude Code and Codex. The catch: the client is open, but the Grok model that makes it useful is not.

  • What dropped: the source for the grok CLI and TUI, released as Apache 2.0 and described as "SpaceXAI's coding agent harness and TUI: fullscreen, mouse interactive, extensible."
  • Client open, model closed: you can read, build and fork the Rust harness, but Grok 4.5 still runs behind xAI's paid API, so a fork without a key is a shell without a brain.
  • Built partly on rivals: the tree vendors code ported from openai/codex and sst/opencode, a rare public admission that these agents share plumbing.
  • Not open development: one squashed commit, no releases, and a README that says external contributions are not accepted. This is a read-only mirror of an internal monorepo, not a community project.
Terminal coding-agent CLIs and whether their client is open source Among the major terminal coding agents, Codex CLI, opencode and Gemini CLI already ship open-source clients while Claude Code stays closed. Grok Build has now published its client under Apache 2.0, but every underlying model except opencode's bring-your-own stays proprietary. The terminal coding-agent field CLIENT LICENSE / UNDERLYING MODEL Claude Code Codex CLI opencode Gemini CLI Grok Build client: closed client: MIT client: MIT client: Apache-2 client: Apache-2 Claude GPT models bring-your-own Gemini Grok 4.5 Open client, closed model: you can read and fork the harness, but the intelligence still runs behind a paid API. genztech.blog
Fig 1 Where Grok Build lands: its client is now Apache 2.0, but the model stays proprietary, like every rival except opencode.

What did xAI actually release?

The repository contains the Rust source for grok, the command-line agent xAI first shipped on May 14, 2026. It is a full-screen terminal UI that reads your codebase, edits files, runs shell commands, searches the web and manages long-running tasks. It runs three ways: interactively, headlessly for CI and scripting, or embedded in an editor through the Agent Client Protocol. The code is roughly 99.6% Rust, the toolchain is pinned by a rust-toolchain.toml, and the build produces a binary called xai-grok-pager that official installs ship as grok. Inside the first two hours it had already collected about 1.2k stars and 145 forks. The install path is unchanged: curl -fsSL https://x.ai/cli/install.sh | bash on macOS and Linux, or an irm https://x.ai/cli/install.ps1 | iex one-liner on Windows.

RelatedKAT-Coder-Pro V2.5 Lands Second on SWE-Bench Pro

Why open-source the client but not the model?

Because the client is the cheap part to give away and the expensive part to rebuild. Publishing the harness costs xAI little: rivals already ship open clients, so there is no secret left to protect in a file editor and a terminal renderer. What it buys is trust and distribution. Developers can audit exactly what the agent does to their machine, security teams can vet the sandboxing, and companies wary of piping their code through an opaque binary get a readable answer. Meanwhile the actual moat, Grok 4.5 and the grok-code-fast-1 model, stays locked behind an API key and a SuperGrok subscription. It is the same trade Google made with Gemini CLI: open the shell, meter the intelligence.

AgentGrok BuildClaude CodeCodex CLIopencode
Client licenseApache 2.0 (new)ClosedMITMIT
LanguageRustTypeScriptRustTypeScript
Default modelGrok 4.5ClaudeGPT modelsBring-your-own
Model open?NoNoNoN/A
Parallel subagentsYes (up to 8)LimitedNoYes
MCP supportYesYesYesYes
SWE-bench Verified*~70.8%~87.6%~85%Model-dependent

*SWE-bench Verified figures are vendor and third-party reported and shift with model versions; treat them as directional, not head-to-head lab results.

What is actually inside grok-build?

More than a thin wrapper. The README lists MCP server support, a skills system, plugins, hooks, theming, slash commands, a sandbox, and browser-based authentication on first launch. The Agent Client Protocol hook is the interesting one: it lets the same engine live inside an editor instead of only a terminal, which is how xAI plans to reach developers who never leave their IDE. The honest surprise is the vendored code. The license file credits ports from openai/codex and sst/opencode, plus a bundled Mermaid diagram stack. That is unusually candid. It confirms what many suspected: the current generation of terminal coding agents is converging on shared patterns, and even a well-funded lab reaches for a competitor's open code rather than reinventing a file-diff renderer.

RelatedCursor Builds 'Sand' Agent to Rival Claude Cowork

How does it stack up against Claude Code and Codex?

On raw coding scores, Grok Build still trails. Third-party reviews put it around 70.8% on SWE-bench Verified, below the roughly 87.6% and 85% that Claude Code and Codex CLI report. xAI's counter is architecture, not benchmark bragging: Grok Build runs up to eight parallel subagents and defaults to a Plan Mode that blocks edits until you approve them, and it reads the cross-vendor AGENTS.md convention so it slots into projects already set up for Codex. The signal for investors: xAI is private, so there is no ticker to trade here, but the move pressures the paid CLIs from Anthropic, OpenAI and Microsoft's GitHub Copilot on the one axis they had kept closed. When four of five major agents ship a readable client, "trust us, it is safe" stops being a differentiator and starts being table stakes.

  1. May 14, 2026Grok Build ships as a v0.1 terminal coding agent initially powered by grok-code-fast-1
  2. Mid 2026Upgraded to Grok 4.5 with native subagents, Plan Mode and mouse support fullscreen Rust TUI
  3. July 16, 2026Client source published on GitHub under Apache 2.0 xai-org/grok-build, a mirror of the internal monorepo

Our take

This is a smart, low-cost move dressed as generosity. Open-sourcing the client answers the loudest enterprise objection to letting an AI agent run shell commands, without giving up a cent of model revenue. But call it what it is. A single squashed commit, no releases, and a no-contributions policy make grok-build a source-available mirror, not an open project you can shape. The real tell will be whether xAI keeps syncing it. If the next update lands and the door to forks that swap in local models stays open, this is a genuine shift in how coding agents earn trust. If the repo freezes at one commit, it was a launch-day headline. Either way, the era of the closed coding-agent client is ending, and xAI just made Anthropic's silence on Claude Code's source a little louder.

What to watch · 2026
  • Forks that swap the model. Apache 2.0 lets anyone repoint the harness at a local or rival model. If that happens fast, xAI loses the lock-in the open client was meant to build.
  • Whether the mirror goes stale. A single squashed commit with no releases is easy to abandon. Real signal is a second sync landing weeks from now, not the launch-day star count.
  • Codex and opencode lineage. The vendored ports invite a closer read of how much of each agent is genuinely original versus shared plumbing.
Primary sources

Original analysis by GenZTech. Source: github.com/xai-org/grok-build.