On July 15, 2026, xAI (branded SpaceXAI in the post) open-sourced Grok Build — the terminal coding agent and TUI that ships as the grok CLI. The code is on GitHub at xai-org/grok-build under Apache 2.0.
This is not a thin README dump. Independent counts put first-party Rust at roughly 845K lines (Simon Willison’s SLOCCount; ~3% vendored). The practical pitch: you can compile it yourself, point it at your own inference via ~/.grok/config.toml, and run fully local-first.
Key takeaways
- What shipped: agent loop (context → model → tool dispatch), file/shell/search tools, full-screen TUI (plan review + inline diffs), and an extension surface for skills, plugins, hooks, MCP servers, and subagents.
- Three run modes: interactive TUI, headless for CI/scripts, and editor embed via the Agent Client Protocol (ACP).
- License reality check: Apache 2.0 allows forks and internal forks — but the repo does not accept external PRs or issues. Treat it as source transparency, not a community-governed project like OpenCode.
- Timing matters: the release landed days after a serious repo-upload / data-retention controversy. xAI says default retention was turned off from July 12 and previously retained coding data will be deleted. Verify settings on your account; do not assume “open source” alone equals privacy.
What is in the tree
xAI’s announcement groups the published surface into four buckets that map cleanly onto the crate layout:
| Area | What you can audit |
|---|---|
| Agent loop | Context assembly, response parsing, tool-call dispatch |
| Tools | Read / edit / search code; run shell commands |
| Terminal UI | Rendering, input, plan review, inline diff viewer |
| Extensions | Skills, plugins, hooks, MCP servers, subagents |
Install options (per docs / MarkTechPost write-up): one-liner curl -fsSL https://x.ai/cli/install.sh | bash, or build with Cargo (xai-grok-pager-bin → binary named xai-grok-pager, shipped as grok).
Why it matters for builders
Coding agents are converging on the same fight: model quality × harness quality × trust. Open-sourcing the harness lets teams:
- Diff the agent loop against Codex CLI / OpenCode / proprietary tools instead of guessing from network traces.
- Air-gap a fork — compile locally, set
base_urlto an internal endpoint, skipapi.x.ai. - Wire CI with headless + machine-readable output (e.g. streaming JSON).
For model context, see Grok 4.5 (Build’s default flagship as of July 2026), the prior Grok 4.3, and the 2026 LLM landscape guide.
Caveats (read before you curl | bash)
- Privacy incident: community reports described full-directory / git-bundle uploads to cloud storage during the early beta. Remnants of upload paths still appear in the tree but are reported disabled. Audit
xai-grok-toolsand shell permissions before running in a regulated repo. - Not a contribution magnet: no upstream PR path means your fixes stay in your fork.
- Vendor claims vs independent verification: line counts and “beyond other major coding products on privacy” are useful framing — confirm retention UI and network behavior yourself.
As of July 16, 2026, the definitive primary sources remain the xAI announcement and the xai-org/grok-build repository.