Grok Build

xAI's open-source coding agent for the terminal, usable interactively, headless in scripts, or inside other apps over the Agent Client Protocol. Run it in EnvHaven from any browser, signed in once with your own account, and keep it working 24/7; or install it on your own machine.

Updated November 23, 2026 · Checked against Grok Build 1.0.70 in EnvHaven v1.9.0

At a glance
Made bySpaceXSI (xAI)
Commandgrok
Version checked1.0.70, in EnvHaven v1.9.0
LicenseApache-2.0, source
Documentationdocs.x.ai/build/overview

Use Grok Build in EnvHaven

  1. Open your workspace in any browser, on a laptop, a tablet or a phone.
  2. Tap Launch, choose Grok Build and tap Sign in: it runs grok login --device-auth for you in the terminal. For an API key, choose Set key instead and paste XAI_API_KEY; the workspace keeps it write-only.
  3. Start it with one tap: signed in, Grok Build gets a green dot in the Launch menu and an icon in the workspace’s top bar. Support is built in (1.0.70), so there is nothing to install or update.
  4. Give it a task. The image launches grok with --always-approve.
  5. Close the tab whenever you like. The workspace is an always-on Linux machine, so Grok Build keeps working, and every device you open it from shows the same session.

Every agent signs in with your own account: EnvHaven never resells tokens or adds a markup.

Install Grok Build on another machine

macOS, Linux:

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

Windows (PowerShell):

irm https://x.ai/cli/install.ps1 | iex

Sign in from the terminal

In a workspace the Launch menu does this for you. On any other machine, or when you would rather type it:

  • Run grok login to sign in in the browser, or grok login --device-auth on SSH sessions, containers and other headless machines.
  • Or set XAI_API_KEY, which bills the API separately.
  • At launch in May 2026, Grok Build opened to SuperGrok and X Premium Plus subscribers; API keys bill separately.

Run Grok Build without permission prompts

For one session:

grok --always-approve

As the default, in ~/.grok/config.toml:

[ui]
permission_mode = "always-approve"

--always-approve auto-approves every tool execution; in a session, Ctrl+O or Shift+Tab toggles it. Deny rules and hooks still apply, plans are still reviewed, and the setting is ignored in a project’s own .grok/config.toml.

In EnvHaven: The image launches grok with --always-approve. The details, and when full access is safe, are on the Grok Build full-access page.

Instructions file

Grok Build reads AGENTS.md, CLAUDE.md, CLAUDE.local.md, .grok/rules/*.md. It also reads .claude/rules/ and .cursor/rules/, and MCP servers from ~/.claude.json and .mcp.json, at lower priority.

Add MCP servers

grok mcp add <name> -- <command> [args...]

Add -e KEY=value for environment variables. Servers are saved as [mcp_servers.<name>] in ~/.grok/config.toml.

The MCP config converter writes the same server for every agent at once.

Run it from scripts

grok -p "<prompt>"

Headless runs cannot stop to ask, so they need the full-access setting above.

Grok Build away from your desk

Grok Build keeps working only while the machine it runs on is awake. In EnvHaven that machine is the workspace, which never sleeps: start a task, close the laptop and check on it from a phone.

SpaceXSI (xAI)‘s own options:

  • /share shares the current session at a URL.
  • grok agent stdio runs Grok inside other apps and editors over the Agent Client Protocol.

Compare Grok Build

When Grok Build misbehaves