grokkybara[bot] 77cd7eb675 Synced from monorepo
Synced from monorepo

Changes:
- Keep user-expanded Execute panels open while progress updates
- Default compaction to two-pass mode
- Add a headless session resume page
- Classify headless sessions in the shell
- Emit startup phases as tracing spans
- Reassemble relay-mangled X10 mouse reports instead of typing them as text
- Default chat compaction mode to segments
- Security: trusting a parent directory no longer implicitly trusts every repo cloned under it later
- Make the interactive default permission mode configurable
- Sanitize and quote remote text in the failed-server reminder
- Announce MCP server failures once per episode
- Reduce auto-mode permission friction and harden always-allow scoping
- Enforce exclusive source selection for workflows
- Reuse a linked codebase for session worktrees
- Route session picker results to the requesting picker
- Hide the workflow tool from child agents
- Gate the bubblewrap lockdown helper on enforce mode
- Revert auto as the default permission mode
- Stop print-once from freezing streaming wake-turn replies at their first chunk
- Treat recalled memory context as advisory
- Reuse a local codebase when cloning with grok
- Improve compaction telemetry
- Add bot-client role and bot-relay skeleton in computer-hub
- Make grok clone bootstrap depth one
- Ground durable memory summaries in reusable facts
- Add fail-closed shallow clone protocol
- Add bot-client connection kind and bot-relay wire types

Source-Revision: 28439e8a8712c363321cf6ff0c2d70cd058d2a7d
2026-08-25 21:15:49 +00:00
2026-07-16 06:46:02 +01:00
2026-08-25 21:15:49 +00:00
2026-08-19 00:29:49 +00:00
2026-07-16 06:46:02 +01:00
2026-08-25 21:15:49 +00:00
2026-08-25 21:15:49 +00:00
2026-08-23 10:48:57 +00:00
2026-07-16 06:46:02 +01:00
2026-07-16 20:27:30 +01:00
2026-08-04 16:51:06 +00:00
2026-08-25 21:15:49 +00:00

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:

Description
Terminal coding assistant maintained by HoshizukiMio with configurable model providers.
Readme Apache-2.0 111 MiB
2026-11-19 11:02:16 +00:00
Languages
Rust 98.4%
Swift 0.8%
Kotlin 0.4%
Python 0.2%