Grok Build is SpaceXAI's terminal-based AI coding agent that runs as a full-screen TUI, understands codebases, edits files, executes commands, searches the web, and manages tasks interactively or headlessly.

Stars

7,522

7-day growth

No data

Forks

1,184

Open issues

0

License

Apache-2.0

Last updated

2026-07-16

Why it is worth attention

It is an open-source, Rust-based AI agent from x.ai with a rich TUI, multiple interaction modes (interactive, headless, editor-embedded via ACP), and comprehensive documentation, representing a practical tool for AI-assisted development.

Who it is for

  • Developers seeking an AI pair programmer in the terminal
  • CI/CD engineers wanting headless AI code automation
  • Editor users who want to integrate AI via the Agent Client Protocol
  • Rust enthusiasts interested in a large-scale Rust CLI/TUI project

Use cases

  • Editing code and files with natural language instructions
  • Executing shell commands and managing long-running tasks
  • Searching the web for information during development
  • Automating workflows in headless mode for scripting or CI pipelines

Strengths

  • Full-screen TUI with scrollback, prompt, modals, and theming
  • Multiple interaction modes: interactive TUI, headless, and embedded via ACP
  • Open-source under Apache 2.0 with a well-structured Rust codebase
  • Extensive documentation including user guide, changelog, and sandboxing details

Considerations

  • Windows builds are best-effort and not currently tested from this tree
  • External contributions are not accepted per CONTRIBUTING.md
  • Initial authentication requires opening a browser, which may not suit all headless setups

README quick start

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).

Installing the released binary · Building from source · Documentation · Repository layout · Development · Contributing · License

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.


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.
  • protoc — proto codegen resolves bin/protoc (a dotslash launcher) 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 — see the authentication guide.

Documentation

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

The user guide ships with the pager crate: [crates/codegen/xai-grok-pager/docs/user-guide/](crates/codegen/xai-grok

Description

SpaceXAI's coding agent harness and TUI. Fullscreen, mouse interactive, extensible.

Related repositories

Similar projects matched by category, topics, and programming language.

m-novotny
Featured
m-novotny GitHub avatar

memguard-rs

A Rust crate providing secure memory handling primitives with compiler-resistant zeroization, memory locking, and constant-time comparison.

Embedded & IoTSecurity
131
SuperJJ007
Featured
SuperJJ007 GitHub avatar

CSswitch

Use any third-party OpenAI-compatible API to run Claude Science's AI agent research platform without a Claude subscription.

AI & Machine LearningDesktop Apps
131
lucid-softworks
Featured
lucid-softworks GitHub avatar

lumen

A from-scratch Rust JavaScript engine and runtime with zero dependencies, passing 100% of the official test262 conformance suite.

Rust
100