# 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](https://github.com/xai-org/grok-build) |
| Documentation | [docs.x.ai/build/overview](https://docs.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:

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

Windows (PowerShell):

```bash
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:

```bash
grok --always-approve
```

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

```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](https://envhaven.com/yolo/grok-build).

## 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

```bash
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](https://envhaven.com/mcp-config) writes the same server for every agent at once.

## Run it from scripts

```bash
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](https://envhaven.com/agents/grok-build/browser)
- [Grok Build on iPhone](https://envhaven.com/agents/grok-build/iphone)
- [Grok Build on iPad](https://envhaven.com/agents/grok-build/ipad)
- [Grok Build on Android](https://envhaven.com/agents/grok-build/android)
- [Grok Build on a Chromebook](https://envhaven.com/agents/grok-build/chromebook)
- [Grok Build on Windows](https://envhaven.com/agents/grok-build/windows)
- [Grok Build on a VPS](https://envhaven.com/agents/grok-build/vps)
- [Grok Build in Docker](https://envhaven.com/agents/grok-build/docker)
- [Grok Build on a Raspberry Pi](https://envhaven.com/agents/grok-build/raspberry-pi)
- [Grok Build 24/7](https://envhaven.com/agents/grok-build/24-7)

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

- [Grok Build vs Claude Code](https://envhaven.com/compare/grok-build-vs-claude-code)
- [Grok Build vs Codex](https://envhaven.com/compare/grok-build-vs-codex)

## When Grok Build misbehaves

- [Grok Build: Not signed in. To authenticate without a browser, run:](https://envhaven.com/errors/grok-build/not-signed-in)
- [Is Grok Build down?](https://envhaven.com/status/grok-build) Live status of the providers it depends on.

## Keep reading

- [Grok Build full-access mode](https://envhaven.com/yolo/grok-build)
- [Grok Build in the browser](https://envhaven.com/agents/grok-build/browser)
- [Grok Build on iPhone](https://envhaven.com/agents/grok-build/iphone)
- [Grok Build on iPad](https://envhaven.com/agents/grok-build/ipad)
- [Grok Build vs Claude Code](https://envhaven.com/compare/grok-build-vs-claude-code)
- [Grok Build vs Codex](https://envhaven.com/compare/grok-build-vs-codex)

Source: https://envhaven.com/agents/grok-build
