SpyBara
Go Premium

overview.md 2026-11-18 23:57 UTC to 2026-11-19 22:57 UTC

This page contains 43 additions and 84 deletions.

2026
Thu 19 22:57

Getting Started

Grok Build

Grok Build is a coding agent for the terminal. Use it as an interactive TUI, headlessly in scripts or bots, or through the Agent Client Protocol (ACP) in other apps.

Install

Run the command for your system. It downloads the latest stable release and adds grok to your PATH:

curl -fsSL https://x.ai/cli/install.sh | bash
irm https://x.ai/cli/install.ps1 | iex

Run Grok

Start Grok in your project folder:

cd your-project
grok

If your shell can't find grok, open a new terminal.

On first launch, Grok opens your browser to sign in, and keeps you signed in after that. If there is no browser, use another method:

Where you're working Sign in with Command
Your own machine Browser grok
SSH or a remote machine Device code grok login --device-auth
CI and scripts API key export XAI_API_KEY="xai-..."

For every sign-in option, see Authentication.

Ask your first question

At the prompt, start with a question that works in any repository:

Explain this repo.

Grok reads the files it needs, shows each step as it runs, and answers with a summary of the codebase. Once you see that, the install, sign-in and project are all working.

Then point it at a file with @:

@src/main.rs Walk me through this file.

In a session, /usage shows your credit usage.

Run headlessly

Headless mode is ideal for scripts, automations, or integration into other apps:

grok -p "Explain this codebase"
grok -p "Explain the architecture" --output-format streaming-json

For its flags and output formats, see Headless and Scripting.

Update

One command updates Grok for both interactive and headless use:

grok update

To see what each release changed, read the Changelog.

Requirements

  • macOS (Apple silicon or Intel) or Linux (x86_64 or arm64). On Windows, use PowerShell, Git Bash or WSL.
  • A terminal, and a project folder to run Grok in.
  • A SpaceXSI account to sign in with, or an API key.

Features

Next