2 min read

xAI open-sources Grok Build coding agent in Rust

Grok Build, xAI’s terminal-based coding agent, is now available in a public Rust repository with binaries for macOS, Linux, and Windows.

Image: Hacker News

Grok Build — described in the repository as SpaceXAI’s terminal-based coding agent — is now available as a public Rust codebase on GitHub. The tool runs as a full-screen TUI and is designed to understand a codebase, edit files, execute shell commands, search the web, and manage long-running tasks. It can run interactively, in a headless mode for scripting and CI, or inside editors through the Agent Client Protocol (ACP).

The repository says it is synced periodically from the SpaceXAI monorepo and contains the source for the grok CLI/TUI and its agent runtime. Prebuilt binaries are available for macOS, Linux, and Windows. For local builds, the project requires Rust, with the toolchain pinned by rust-toolchain.toml, and protoc, resolved through bin/protoc or a version on PATH or $PROTOC.

Installation and build details

The released binary installs as grok, while the build artifact produced from source is named xai-grok-pager. On first launch, the app opens a browser for authentication, according to the repository documentation.

The project lists these primary build commands:

  • cargo run -p xai-grok-pager-bin to build and launch the TUI
  • cargo build -p xai-grok-pager-bin --release for a release binary
  • cargo check -p xai-grok-pager-bin for faster validation

macOS and Linux are the supported build hosts. Windows builds are described as best-effort and “not currently tested from this tree.”

Recommended reading

Hinge founder Justin McLeod readies Overtone AI matchmaker

Repository structure and licensing

The codebase is split across several crates, including:

  • xai-grok-pager-bin for the composition-root package that builds the binary
  • xai-grok-pager for the TUI layer, including scrollback, prompt, modals, and rendering
  • xai-grok-shell for the agent runtime and entry points
  • xai-grok-tools for tool implementations such as terminal access, file editing, and search
  • xai-grok-workspace for filesystem, VCS, execution, and checkpoints

The repository also notes that the root Cargo.toml is generated and should be treated as read-only, with changes made in per-crate Cargo.toml files instead.

Documentation is hosted at docs.x.ai/build/overview, while the bundled user guide covers setup, keyboard shortcuts, slash commands, configuration, theming, MCP servers, skills, plugins, hooks, headless mode, and sandboxing. First-party code is licensed under the Apache License, Version 2.0, while third-party and vendored code keep their original licenses, including components referencing openai/codex and sst/opencode tool implementations.

Tomas Berg

Computing Editor

Tomas lives in the terminal. He covers chips, laptops, and operating systems with a focus on performance and efficiency. He reads kernel changelogs the way other people read fiction, and he's always on the hunt for the perfect mechanical keyboard switch. If it processes data, Tomas has an opinion on it.

via Hacker News

// Keep reading