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
Installing the released binary

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:
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.
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/
— getting started, keyboard shortcuts, slash commands, configuration, theming,
MCP servers, skills, plugins, hooks, headless mode, sandboxing, and more.
crates/codegen/xai-grok-pager/docs/user-guide/
Repository layout
Important
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
Contributing
Note
External contributions are not accepted. See CONTRIBUTING.md.
License
First-party code in this repository is licensed under the Apache License,
Version 2.0 — see LICENSE.
Third-party and vendored code remains under its original licenses. See:
THIRD-PARTY-NOTICES — crates.io / git dependencies,
bundled UI themes, and in-tree source ports (including openai/codex and
sst/opencode tool implementations)
crates/codegen/xai-grok-tools/THIRD_PARTY_NOTICES.md
— crate-local notice for the codex and opencode ports (license texts +
Apache §4(b) change notice)
crates/codegen/xai-grok-tools/THIRD_PARTY_NOTICES.md
third_party/NOTICE — vendored Mermaid-stack index