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 by | SpaceXSI (xAI) |
| Command | grok |
| Version checked | 1.0.70, in EnvHaven v1.9.0 |
| License | Apache-2.0, source |
| Documentation | docs.x.ai/build/overview |
Use Grok Build in EnvHaven
- Open your workspace in any browser, on a laptop, a tablet or a phone.
- Tap Launch, choose Grok Build and tap Sign in: it runs
grok login --device-authfor you in the terminal. For an API key, choose Set key instead and pasteXAI_API_KEY; the workspace keeps it write-only. - 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.
- Give it a task. The image launches
grokwith--always-approve. - 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 loginto sign in in the browser, orgrok login --device-authon 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.
- Grok Build in the browser
- Grok Build on iPhone
- Grok Build on iPad
- Grok Build on Android
- Grok Build on a Chromebook
- Grok Build on Windows
- Grok Build on a VPS
- Grok Build in Docker
- Grok Build on a Raspberry Pi
- Grok Build 24/7
SpaceXSI (xAI)‘s own options:
/shareshares the current session at a URL.grok agent stdioruns Grok inside other apps and editors over the Agent Client Protocol.
Compare Grok Build
When Grok Build misbehaves
- Grok Build: Not signed in. To authenticate without a browser, run:
- Is Grok Build down? Live status of the providers it depends on.