How to Use Grok Build for Coding (Terminal, Desktop and Plans)
Install Grok Build, pick a plan, sign in and run your first task, then use plan mode, AGENTS.md, MCP and headless mode.

Key takeaways
- Grok Build runs as a desktop app (the former Cursor), as the grok command in a terminal, and on the web.
- Free plans get limited agent requests; Plus includes the agent with Grok Build models; third-party models need Premium or higher and are billed separately.
- Install with one official command, run grok in your project, and start with "Explain this repo."
- Use /plan for bigger changes and keep an AGENTS.md with your build and test commands.
- grok -p runs headless for scripts and CI; commit first, because /rewind does not undo file changes.
Grok Build is the coding agent from the company behind Grok. You can use it in three places: the Grok Build desktop app (the former Cursor editor), the grok command in your terminal, and the web. To start, you need a Grok plan or an xAI API key, one install command, and a project folder. This guide covers the terminal version step by step, then plan mode, project rules, extensions and scripting.
What Grok Build is
Grok Build launched as a terminal agent in May 2026. Its harness went open source on GitHub in July. On 30 November, Cursor was renamed Grok Build: the editor became the desktop app, and the terminal agent now runs Cursor's agent harness underneath. Like other coding agents, it reads your files, proposes changes, edits code and runs commands in a loop until the task is done.
The desktop app is for people who want an editor and a window full of agents. The terminal version, called the TUI, suits people who already work in a shell, run agents over SSH or want to script them. Both share one subscription.
Which plan you need
Grok Build is part of the plans on grok.com/pricing: Free, Plus, Premium, Super and Ultra. The pricing page lists Grok Build agent requests as limited on Free and included on every paid plan. According to the models and pricing docs:
| Plan | What you get in Grok Build |
|---|---|
| Free | Agent with limited usage |
| Plus | Agent with Grok Build's own models (Grok 4.7, 4.6, 4.5 and Composer 2.5) at fixed settings |
| Premium | 4x Plus usage, cloud agents and automations, code review, third-party models from prepaid credit |
| Super and Ultra | 15x and 50x Plus usage, earlier access to new features |
Usage comes from one weekly pool shared with Grok chat. If you want Claude, Gemini or GPT models inside Grok Build, you need Premium or higher, and those are billed separately at API list price. Prices change, so check the pricing page before you subscribe. For scripts and CI you can also use an xAI API key instead of a plan.
Install Grok Build on Mac, Linux or Windows
The official getting started page gives one command per system. It downloads the latest stable release and adds grok to your PATH.
macOS, Linux or WSL:
curl -fsSL https://x.ai/cli/unified/install.sh | bash
Windows PowerShell:
irm https://x.ai/cli/unified/install.ps1 | iex
It runs on macOS (Apple silicon or Intel) and on Linux (x86_64 or arm64) with glibc 2.28 or later; Alpine and other musl systems are not supported. If your shell can't find grok afterwards, open a new terminal. grok update keeps it current.
Sign in and run your first task
- Open a terminal in your project:
cd your-project, then typegrok. - On first launch your browser opens to sign in. Over SSH, use
grok login --device-auth. In CI, setXAI_API_KEY. - Type
Explain this repo.Grok reads the files it needs and summarizes the codebase. If that works, install, sign-in and project are all fine. - Point it at a file with
@, for example@src/main.rs Walk me through this file. - Type
/usageat any time to see how much of your allowance you have used.
Use plan mode for bigger changes
For anything with more than one sensible approach, start in plan mode. Type /plan followed by the task, or press Shift+Tab to cycle modes. Grok explores the code and drafts a plan, then opens a preview. Press a to approve and start building, s to request changes, c to comment on a line, or q to leave plan mode.
One caveat from the plan mode docs: while planning, only Markdown files can be edited, but the shell still follows your permission mode, so a command could still write files. Ask mode is stricter: edits and shell commands are refused.
Project rules, skills and MCP
- AGENTS.md. Put build commands, conventions and architecture notes in an
AGENTS.mdat the repo root. Grok also readsCLAUDE.md, and plain.mdfiles in.grok/rules/, but not Cursor's.mdcfiles.grok inspectlists every rules file it found. See how to write CLAUDE.md and AGENTS.md. - Skills and plugins. Skills are folders with a
SKILL.mdin.grok/skills/or~/.grok/skills/, and appear as slash commands./plugins,/skills,/hooksand/mcpsopen one extensions screen. - MCP servers. Add one with
grok mcp add, for example a remote server with--transport http.grok mcp doctorchecks the connection. New to MCP? Read what MCP is. - From Claude Code.
/import-claudebrings over your Claude Code permissions, environment variables, MCP servers and hooks./resume-claudeand/resume-codexpick up an earlier Claude Code or Codex session.
Run it in scripts (headless mode)
Headless mode sends one prompt and exits, which is what you want in a script or a CI job:
grok -p "List TODO comments" --output-format json
Output can be plain text, one JSON object, or streaming JSON. Add --no-auto-update in automated environments. Be careful with --always-approve: it skips permission prompts for every tool call. To embed Grok in another app or editor, grok agent stdio runs it over the Agent Client Protocol.
Tips that save trouble
- Commit before a big task.
/rewindrolls back the conversation but leaves file changes on disk, so Git is your undo. - Try the sandbox. It is off by default;
grok --sandbox workspacelimits writes to the project,~/.grok/and temp folders. - Check before cloud send. Handing a session to a cloud agent pushes your local changes, uncommitted files included, to a new branch. Make sure none of them hold secrets.
- Keep rules short. The docs note that short, specific instructions are followed more reliably than long ones.
Use your Grok plan without the terminal
If you'd rather chat than type commands, Ninja Builder can run Grok Build for you. Its Grok plan chats use xAI's own Grok Build app on your computer, signed in with your Grok account, and show each step in the chat.
- Open Settings › Accounts, click Add account, then Grok.
- Stay on the Grok plan (Grok Build) tab and click Install if Grok Build isn't on your computer yet. You don't need Terminal.
- Click Sign in with Grok and sign in in your browser.
- Pick the Grok plan account in the top-bar account menu and send a message.

The chat's Autonomy setting picks Grok's own mode: "Plan first" uses plan mode, and "Just build it" lets Grok change files and run commands. Nothing is billed per message; your plan's limits apply. Prefer to pay per use? Add an xAI API key on the API key tab instead.

Ninja Builder has a 14-day free trial, then costs $4.99 a month. Download Ninja Builder for Mac, Windows or Linux.
Frequently asked questions
Is Grok Build free?
The Free plan includes limited Grok Build agent requests. Paid plans on grok.com/pricing include the agent with more usage, and you can also use an xAI API key billed per use.
How do I install Grok Build on Windows?
Open PowerShell and run irm https://x.ai/cli/unified/install.ps1 | iex, or install inside WSL with the macOS and Linux command. Then open a new terminal and type grok in your project folder.
Does Grok Build read CLAUDE.md?
Yes. Grok Build reads AGENTS.md, CLAUDE.md and plain Markdown files in .grok/rules/. It does not load Cursor .mdc rule files, so copy those into .grok/rules/ as .md files.
Can I move my Claude Code setup to Grok Build?
Run /import-claude in the Grok Build TUI to bring over permissions, environment variables, MCP servers and hooks. /resume-claude continues an earlier Claude Code session.
Can I use Claude models in Grok Build?
Yes, on Premium and higher plans. Third-party models are not part of the included usage pool and are billed at API list price from prepaid credit.
Keep reading

Cursor Is Now Grok Build: What Changes for Cursor Users
Cursor is now the Grok Build desktop app. What still works, what changes, and a checklist for Cursor users.

Grok Build vs Claude Code: Which Coding Agent Should You Use?
A neutral comparison of Grok Build and Claude Code: models, plans, interfaces, extensions and who each one suits.

How to write CLAUDE.md and AGENTS.md files that agents follow
Write project instruction files that coding agents actually follow, with a copyable template and one setup for every tool.