OpenCode vs Cursor (now Grok Build): plans, CLIs, approvals
OpenCode vs Cursor, now Grok Build: models and plans, where each runs, sign-in on a server, default approvals, rules files, MCP, scripts and licences.
OpenCode is a free, MIT-licensed coding agent that runs in a terminal, a desktop app or a web interface, on models from any of 200-plus providers: your own API keys, a ChatGPT Plus or Pro or GitHub Copilot sign-in, a set of free models, or OpenCode’s Go plan from $10 a month. Cursor became Grok Build on November 30, 2026: the editor is now the Grok Build desktop app, and its terminal agent is the grok command, which combines the Cursor CLI with xAI’s open-source (Apache 2.0) Grok CLI. The old agent command keeps working. Grok Build is sold in The X Subscription (Free, Plus $8, Premium $30, Super $100, Ultra $200 a month), whose weekly pool covers Grok and Composer models; Claude, Gemini and other third-party models cost API list price on top, from Premium up. As read on December 1, 2026.
Cursor is now Grok Build
Most of what ranks for “OpenCode vs Cursor” was written before the rename, so the names on Cursor’s side have moved. Cursor’s announcement, posted on November 30, 2026, says Cursor becomes the Grok Build desktop app and that “The core app experience is unchanged”; its new Agents Window opened in beta that day, with a wider rollout in the coming weeks. cursor.com now carries the banner “Cursor is now Grok Build”, and its docs and pricing pages redirect to docs.grok.com and grok.com.
In the terminal, Grok Build’s What’s new page says “The new Grok Build CLI combines the best of the two CLIs, the Grok CLI and the Cursor CLI.” The terminal docs describe it as running “Grok Build in your terminal as the grok command”. The announcement adds that “Command-line and API automations that call agent will keep working as written”, and Cursor’s own install script still served a build of agent on December 1. The Cursor CLI as it stood before the rename, with its sign-in over SSH and its print mode, is covered in the Cursor CLI guide; this page uses the current names from here on.
At a glance
From each maker’s own pages, read on December 1, 2026:
| OpenCode | Grok Build (formerly Cursor) | |
|---|---|---|
What it is | A coding agent: terminal, desktop app, web interface, phone app | A desktop app with an editor, plus a terminal agent |
Terminal command | opencode (2.4.3 on npm) | grok; agent still works |
Models | Any of 200-plus providers, local models, free models | Grok 4.7, 4.6, 4.5 and Composer 2.5 in the plan; Claude, Gemini and others at API price from Premium |
What you pay | Nothing for the tool; the model’s provider, a ChatGPT or Copilot plan, or Go ($10, $40) | A plan from $8 a month; third-party models from prepaid credit |
Default approvals | Everything allowed except reading .env files, which asks | Terminal: Ask, prompts for anything not allowed. Desktop app: Auto-review recommended |
Sandbox | None | Optional; off by default in the terminal |
Instructions | AGENTS.md, CLAUDE.md where there is none | Desktop: .cursor/rules/*.mdc, AGENTS.md. Terminal: AGENTS.md, CLAUDE.md, .grok/rules/*.md |
Script mode | opencode run | grok -p |
Licence | MIT | The earlier Grok CLI Apache 2.0; the combined CLI’s and the desktop app’s not stated |
Where each one runs
OpenCode is, in its docs’ words, “available as a terminal-based interface, desktop app, or web app”, and its home page lists desktop apps for macOS, Windows and Linux and a phone app for iPhone and Android. The terminal agent runs the same on a laptop or on a server over SSH. Its web interface and phone app connect to an OpenCode server, which listens only on localhost by default; opencode pair --remote warns that it “will expose your OpenCode server to the internet”. The OpenCode web and remote server guide covers reaching it from another device without doing that. Install it with the script, npm or Homebrew:
curl -fsSL https://opencode.ai/v2/install | bashCopiednpm install -g @opencode/cliCopiedGrok Build is two things. The desktop app, which its install page calls “a desktop app with an editor”, runs on Mac, Windows and Linux. It can open a project on a server over Remote SSH, but the network page says “AI features run on your local machine and communicate with the remote server for file access”, so the agent stops when your laptop does. The terminal agent runs on the server itself. The What’s new page gives this install line for the combined CLI on macOS and Linux:
curl -fsSL https://x.ai/cli/unified/install.sh | bashCopiedThe terminal docs still show https://x.ai/cli/install.sh, which on December 1 served version 1.0.97 of the earlier Grok CLI; per the What’s new page, “If the version starts with 2., you’re on the new CLI”, so check grok --version after installing. Each piped install on this page runs whatever its URL serves, so download the script and read it first if that matters to you. If you already use the Cursor CLI, the What’s new page moves it to the new one with cursor-agent update --channel grok. Either terminal agent ends with your SSH session unless you start it inside tmux.
Models and what you pay
OpenCode costs nothing itself. Its home page says “Start with free models or bring any of 200+ providers” and “Log in with ChatGPT Plus or Pro or GitHub Copilot.” OpenCode also sells Go, a subscription to a curated list of 29 models at $10 a month, or $40 for Go Plus with higher limits, counted over five-hour, weekly and monthly windows; free models carry a daily request limit. Pay-as-you-go credit is in the OpenCode Console. The OpenCode pricing guide sets out each route, including what Anthropic’s terms say about using a Claude plan in another tool.
Grok Build is sold in The X Subscription, with Grok and X. From its pricing page, in US dollars before tax:
| Plan | Monthly | Yearly | Models |
|---|---|---|---|
Free | $0 | Grok Build’s own, limited usage | |
Plus | $8 | $80 | Grok Build’s own only |
Premium | $30 | $300 | Own models in the pool; third-party at API list price |
Super | $100 | $1,000 | The same, larger pool |
Ultra | $200 | $2,000 | The same, larger pool |
Teams | $30, $100 or $200 a seat | By seat tier |
“Every paid plan includes a weekly pool of usage for first-party models”, which the models page says “covers Grok 4.7, Grok 4.6, Grok 4.5, and Composer 2.5”, shared by the agent in the editor, the terminal agent, Grok Bot and the Grok apps. Claude, Gemini and the other third-party models are outside it: “On Premium and above” they cost the model’s API list price “from the first request”, paid from prepaid credit, and “Plus and Free don’t include third-party models.” Plans bought before The X Subscription (Pro, Pro+, the old Ultra and others) carry on for those who have them.
Put side by side: Claude costs per token in both, on an API key in OpenCode and from prepaid credit in Grok Build, where it also needs a $30-a-month plan underneath. OpenAI’s models can come out of a ChatGPT Plus or Pro plan in OpenCode; Grok Build’s available models page names Claude and Gemini models beside its own, and no GPT model. Grok Build’s own models are included in its plan, from $8; OpenCode’s cheapest included models are its free ones and Go.
Signing in on a remote machine
A server reached over SSH has no browser. Grok Build’s CLI reference gives device-code sign-in for that: you open a link on your own laptop or phone and enter a code.
grok login --device-authCopiedOpenCode signs in per provider. Inside the terminal app, /connect lists them; GitHub Copilot uses a device flow, and an API key is pasted in. From the shell, the commands page gives:
opencode auth login anthropic --method keyCopiedNever paste a key into the command itself, where it lands in your shell history. Anything that needs a browser to call back to the machine, such as an MCP server’s OAuth, works differently on a server: OpenCode’s MCP page says “the browser cannot reach OpenCode after you sign in” and has you paste the callback page’s address back into the prompt. Grok Build’s MCP docs say OAuth servers “trigger a browser flow on first use” and do not cover SSH.
What each does without asking
The defaults differ more than anything else on this page. OpenCode’s permissions page gives its base policy as allow everything, except reading .env and .env.* files, which asks; edits, shell commands and paths outside the project run without a prompt unless you add rules to opencode.jsonc. Its security policy says the permission system “is not designed to provide security isolation” and “OpenCode does not sandbox the agent.” OpenCode permissions shows how to write the rules.
Grok Build’s terminal agent starts in Ask mode, which the permissions page describes as “Prompt for anything not already allowed”. Auto mode lets a classifier approve tools it judges safe, and --always-approve (alias --yolo) approves every tool call, with deny rules still applied; of commands such as rm and git push, the page says “Under always-approve they run unless you add a deny.” Its sandbox (Landlock on Linux, Seatbelt on macOS) is “Off by default” and is chosen with --sandbox. In the desktop app, Auto-review is the recommended mode: allowlisted commands run, others go into the sandbox where possible or past a classifier, and the run modes page warns “Auto-review is not a security boundary.” Its Run Everything mode is for when “You accept the risk and want zero prompts.”
Rules files and MCP
OpenCode reads AGENTS.md in each directory and a global one at ~/.config/opencode/AGENTS.md; “In any directory without an AGENTS.md, OpenCode reads CLAUDE.md instead.” Its instructions page does not mention .cursor/rules.
Grok Build reads different files in its two surfaces. The desktop app keeps Cursor’s: “Project rules live in .cursor/rules as .mdc files”, and it “supports AGENTS.md in the project root and subdirectories.” The terminal agent reads AGENTS.md, CLAUDE.md and .grok/rules/*.md; it reads .cursor/rules/ “for compatibility” but, per its rules page, “does not load .mdc files at all”. So a project’s existing Cursor rules reach the desktop agent and not the terminal one, and the docs advise a copy in .grok/rules/ for rules you want in both. Rules in AGENTS.md reach both, and OpenCode too.
For MCP, OpenCode takes servers under mcp.servers in opencode.jsonc, or with opencode mcp add, local over stdio or remote over Streamable HTTP (OpenCode MCP servers). Grok Build’s desktop app reads .cursor/mcp.json and ~/.cursor/mcp.json; the terminal agent uses grok mcp add and ~/.grok/config.toml, and also loads a project’s .cursor/mcp.json, .mcp.json and ~/.claude.json.
Scripts and CI
Both have a one-shot mode. OpenCode’s is opencode run; its commands page says that in CI you “pass a provider API key as a secret and use standalone mode so the private server receives it”:
opencode run --standalone --model anthropic/claude-sonnet-5-5 "Review this repository for correctness and summarize any issues."Copied--format json gives machine-readable output. The permissions page says “Non-interactive clients must decide how to handle approval requests; configured deny rules always remain enforced”, and run --auto will “Auto-approve permissions that are not explicitly denied”. With OpenCode’s default policy most actions need no approval anyway, so a run edits files and runs commands as your user from the start; running OpenCode headless on a schedule covers what happens to the rest and how to lock a job down.
Grok Build’s is grok -p, with --output-format plain, json or streaming-json. The headless page advises --no-auto-update in scripts and CI:
grok --no-auto-update -p "Summarise the open TODOs" --output-format jsonCopiedThat page does not say what a headless run does with an action that would need approval; --always-approve approves all of them. Give either agent a repository you can reset, on a machine whose credentials you would not mind it reaching.
Licence
OpenCode is MIT-licensed, on its home page and in its npm package, and its source is at anomalyco/opencode. The source of xAI’s grok CLI is at xai-org/grok-build, where “First-party code in this repository is licensed under the Apache License, Version 2.0” and “External contributions are not accepted.” That repository’s install line is the earlier CLI’s, and it does not mention the combined CLI or the Cursor CLI, so whether the combined CLI is built from it is not stated. The pages read for this guide state no licence for the combined CLI or for the Grok Build desktop app.
Which fits
- You want an editor with the agent inside it: Grok Build’s desktop app, which is the Cursor editor renamed. OpenCode is an agent you use beside your editor.
- You already pay for ChatGPT Plus or Pro, or Copilot: OpenCode signs in with them. Grok Build’s model list names no GPT model, and its third-party models are billed at API price from Premium up.
- Grok and Composer are enough for you: Grok Build’s plans include them, from $8 a month on Plus.
- The agent should keep working on a server while your laptop is shut: both terminal agents run there. Grok Build’s desktop app over Remote SSH runs its AI on your laptop.
- You want prompts before it acts, out of the box: Grok Build’s terminal agent starts in Ask mode; OpenCode allows most actions until you write rules.
- You want to change the source and share the change: OpenCode is open source under MIT. xAI’s earlier Grok CLI is Apache 2.0 and takes no outside contributions; no licence is stated for the combined
grok.
Rules in AGENTS.md serve both, and an MCP server set up in .cursor/mcp.json reaches both Grok Build surfaces, though not OpenCode. The same comparison for Cursor against the big labs’ agents is in Claude Code vs Cursor and Codex vs Cursor, and OpenCode against Anthropic’s agent in OpenCode vs Claude Code.