Back to Devoured - July 16, 2026
DEVOURED
Grok Build Coding Agent (GitHub Repo)

Grok Build Coding Agent (GitHub Repo)

AI GitHub
xAI has open-sourced Grok Build, a terminal-based coding agent built in Rust that supports headless CI workflows and editor integration via the Agent Client Protocol.
What: Grok Build functions as a full-screen TUI that inspects codebases, executes shell commands, and manages long-running tasks. It relies on the Agent Client Protocol (ACP) for integration with IDEs and supports headless operation for automation pipelines.
Why it matters: This release positions xAI to compete with existing coding assistants like Cursor and GitHub Copilot by providing a deeper, terminal-first integration that appeals to developers who prefer local agent control over cloud-based IDE plugins.
Deep dive
  • Terminal-First Design: Operates as a full-screen terminal interface (TUI) for local codebase management.
  • Cross-Environment Support: Functional as an interactive chat tool, a headless agent for CI/CD scripting, or as an editor backend via ACP.
  • Rust Architecture: Built with a modular crate structure (xai-grok-shell, xai-grok-workspace) for performance and sandboxing.
  • Agent Client Protocol: Adopts standard communication protocols to ensure interoperability with modern IDEs and agent clients.
  • Restriction: The repository explicitly states that external code contributions are not accepted.
Decoder
  • TUI (Terminal User Interface): A command-line program that uses text-based controls to provide a graphical interface experience in a terminal window.
  • ACP (Agent Client Protocol): A standardized JSON-RPC-based protocol that allows AI coding agents to communicate with different editors and IDEs.
  • Monorepo: A software development strategy where code for many projects is stored in the same repository.
Original article

Grok Build (grok)

Grok Build is SpaceXAI's terminal-based AI coding agent. It runs as a full-screen TUI that understands your codebase, edits files, executes shell commands, searches the web, and manages long-running tasks — interactively, headlessly for scripting/CI, or embedded in editors via the Agent Client Protocol (ACP).

Learn more about Grok Build at x.ai/cli

This repository contains the Rust source for the grok CLI/TUI and its agent runtime. It is synced periodically from the SpaceXAI monorepo.

A small SOURCE_REV file at the root records the full monorepo commit SHA for the version of the code present in this tree.

Installing the released binary

Prebuilt binaries are published for macOS, Linux, and Windows:

curl -fsSL https://x.ai/cli/install.sh | bash   # macOS / Linux / Git Bash
irm https://x.ai/cli/install.ps1 | iex          # Windows PowerShell
grok --version

See the changelog for the latest fixes, features, and improvements in each release.

Building from source

Requirements:

  • Rust — the toolchain is pinned by rust-toolchain.toml; rustup installs it automatically on first build.
  • DotSlash — required so hermetic tools under bin/ (notably bin/protoc) can download and run. Install it and ensure dotslash is on your PATH before building:
    cargo install dotslash
    /usr/bin/env dotslash --help   # sanity check
  • protoc — proto codegen resolves bin/protoc via DotSlash, or falls back to a protoc on PATH / $PROTOC.
  • macOS and Linux are supported build hosts; Windows builds are best-effort and not currently tested from this tree.
cargo run -p xai-grok-pager-bin              # build + launch the TUI
cargo build -p xai-grok-pager-bin --release  # release binary: target/release/xai-grok-pager
cargo check -p xai-grok-pager-bin            # fast validation

The binary artifact is named xai-grok-pager; official installs ship it as grok. On first launch it opens your browser to authenticate.

Documentation

Full online documentation is available at docs.x.ai/build/overview.

Repository layout

Path Contents
crates/codegen/xai-grok-pager-bin Composition-root package; builds the xai-grok-pager binary
crates/codegen/xai-grok-pager The TUI: scrollback, prompt, modals, rendering
crates/codegen/xai-grok-shell Agent runtime + leader/stdio/headless entry points
crates/codegen/xai-grok-tools Tool implementations (terminal, file edit, search, ...)
crates/codegen/xai-grok-workspace Host filesystem, VCS, execution, checkpoints
crates/codegen/... The rest of the CLI crate closure (config, MCP, markdown, sandbox, ...)
crates/common/, crates/build/, prod/mc/ Small shared leaf crates pulled in by the closure
third_party/ Vendored upstream source (Mermaid diagram stack)

The root Cargo.toml (workspace members, dependency versions, lints, profiles) is generated — treat it as read-only. Prefer editing per-crate Cargo.toml files.

Development

cargo check -p <crate>        # always target specific crates; full-workspace builds are slow
cargo test -p xai-grok-config # per-crate tests
cargo clippy -p <crate>       # lint config: clippy.toml at the repo root
cargo fmt --all               # rustfmt.toml at the repo root

Contributing

External contributions are not accepted.

License

First-party code in this repository is licensed under the Apache License, Version 2.0.

Third-party and vendored code remains under its original licenses.

Explore all 56 articles in today's digest

Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi