grok-build README

The project's README from github.com/xai-org/grok-build. As one markdown file: README.md.

SpaceXAI logo
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

Grok Build TUI

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:

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/ — getting started, keyboard shortcuts, slash commands, configuration, theming, MCP servers, skills, plugins, hooks, headless mode, sandboxing, and more.

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) — see below

[!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

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

[!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:

grok-build (xai-org/grok-build)

Searching Database…

Что это?Grok Build — это терминальный ИИ-агент для написания кода от SpaceXAI. Он работает в полноэкранном TUI, понимает вашу кодовую базу, редактирует файлы, выполняет команды оболочки, ищет информацию в интернете и управляет длительными задачами. Работать с ним можно интерактивно, в режиме без интерфейса для скриптов и CI или встроить его в редакторы через Agent Client Protocol (ACP).
Это инструмент командной строки или то, что я встраиваю в редактор?Это и то, и другое: отдельный CLI/TUI-файл 'grok', который вы запускаете в терминале, и среда выполнения агента, которую редакторы могут встроить через Agent Client Protocol (ACP), а также режим без интерфейса для скриптов и CI.
Как это запустить?Скачайте один из готовых бинарных файлов для macOS, Linux или Windows либо соберите его из исходного кода с помощью закреплённой версии Rust. При первом запуске откроется браузер для аутентификации.
Полностью ли готовы сборки для Windows?Готовые бинарные файлы для Windows опубликованы, но сборка из исходного кода в Windows выполняется по принципу «по возможности» и пока не тестировалась на основе текущей версии исходного кода; официально поддерживаются для сборки только macOS и Linux.
Для чего нужен Agent Client Protocol (ACP)?ACP позволяет встраивать Grok Build прямо в редакторы кода в качестве серверной части агента, а не только запускать его как отдельное терминальное приложение.
Можно ли запускать его в CI-конвейерах вместо интерактивного режима?Да, помимо интерактивного TUI есть режим без интерфейса, созданный для использования в скриптах и CI.
Поддерживает ли он серверы MCP, навыки и плагины?Да, в поставляемом руководстве пользователя описаны настройка серверов MCP, навыков, плагинов, хуков, тем оформления и изоляции в песочнице.
Creator
xai-org
Size
60.8 MB
Stars
27.4K
Updated
CommitSep 29
Age
3mo
Commits · 90 Days