Grok Build CLI
M06 · 8 min

Install and first session

One install command. Run from the project root. Authenticate once.

Grok Build CLI is a local coding agent: interactive TUI, headless scripts, and ACP for custom orchestration. SuperGrok / X Premium+ early beta access. Install:

Install

# macOS / Linux
curl -fsSL https://x.ai/cli/install.sh | bash

# Windows (PowerShell)
irm https://x.ai/cli/install.ps1 | iex

cd your-project
grok
  • First launch opens a browser for auth.
  • Headless/non-browser: export XAI_API_KEY=… then grok.
  • Useful first prompts: “Explain this repo.” / “@src/app.ts walk me through this file.”
  • Send product feedback with /feedback inside the CLI.

Exercise

Checklist install

If you can install: run grok in a sample repo and ask it to explain structure. If not: write the exact commands you’ll run later.

  • Install command saved
  • Auth path understood (browser or API key)
  • First explore prompt ready
Next