Grok Build is a free, open source ai assisted coding project written in Rust and released under Apache-2.0. It has 26,820 GitHub stars, 5,048 forks and 0 open issues, and was last pushed 5 hours ago. On this registry it ranks #10 of 24 tracked projects in AI Assisted Coding, with 5 head-to-head comparisons available. It gained 117 stars over the last 6 tracked days.

What is Grok Build?

What it is

Grok Build is a terminal-based AI coding agent developed by SpaceXAI, distributed as the grok CLI/TUI. It operates as a fullscreen, mouse-interactive interface that integrates with the user’s codebase to perform code editing, command execution, web search, and long-running task orchestration. The project lives in the Rust ecosystem and is licensed under Apache-2.0.

It solves the problem of fragmented developer workflows by unifying AI-assisted coding, shell automation, and interactive terminal interaction into a single persistent agent runtime. Unlike ad-hoc scripts or editor plugins, Grok Build supports both interactive use and headless execution for scripting or CI, while also offering an Agent Client Protocol (ACP) for embedding into editors.

Key capabilities

  • Fullscreen terminal UI with scrollback, prompt, modals, and rendering engine for interactive agent sessions
  • File editing with precise line-range edits and context-aware suggestions
  • Shell command execution with output streaming, error handling, and stateful session awareness
  • Web search integration to fetch up-to-date external information during agent operations
  • Long-running task management with checkpoints, resumption, and progress tracking
  • Headless mode for non-interactive use in CI, scripting, or as a background service
  • Extensible via MCP servers, skills, plugins, and hooks for custom behavior

Who uses it and how

Developers use it interactively in terminals to iterate on code with AI guidance, executing edits and commands in a single session. CI pipelines invoke it in headless mode to automate multi-step build, test, or deployment tasks. Editor integrations (via ACP) embed Grok Build as an inline agent, forwarding user prompts directly to its runtime.

Getting started

Install via curl -fsSL https://x.ai/cli/install.sh | bash (macOS/Linux) or irm https://x.ai/cli/install.ps1 | iex (Windows PowerShell); binaries are prebuilt for macOS, Linux, and Windows. Build from source using cargo run -p xai-grok-pager-bin after installing Rust and DotSlash.

When to use it — and when not to

Use Grok Build when needing a unified, interactive AI agent for complex terminal workflows that span editing, execution, and web-aware reasoning. Avoid it if you require a lightweight CLI tool with minimal dependencies, as it depends on Rust toolchain, DotSlash, and optional protoc. It replaces paid agent platforms but requires self-hosted configuration for persistent storage (workspace state), authentication, and SMTP if email notifications are needed.

project readme (upstream, from github) — read inline

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:

  • 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
    # or: prebuilt packages — https://dotslash-cli.com/docs/installation/
    /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 — 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:

Frequently asked questions

Is Grok Build free to use?

Grok Build is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Grok Build do?

AI coding agent and CLI for complex terminal workflows

What is Grok Build written in?

Grok Build is primarily written in Rust. Its source is publicly available at https://github.com/xai-org/grok-build, and it has 26,820 GitHub stars.