Cursor CLI
Read the two badges separately: the first is whether this page is backed by evidence, the second is whether the product is still maintained. An archived product can have complete evidence; complete evidence does not mean the product is active.
30-second check: should it make your shortlist?
The terminal form of Cursor: it shares one account, one model catalogue and one…
Cloud / API · CLI
Not checked
Read the original licence before commercial useDirect in mainland · Not in filing list
These four cards help you rule things out, not decide for you. The real differences are in the eight questions and sources below.
Information not confirmed
- Execution-environment ownership and quota limits of the three "detach from terminal" paths (
&Cloud Agent handoff /agent persist/agent worker) — not stated officially (CLI Overview, CLI changelog and About pages checked) - The underlying sandbox implementation on native Windows (container vs process-level) — not stated officially (CLI Overview and Permissions pages checked)
- Whether the CLI and the editor share one quota pool — official pages describe quota per account overall, not split by form factor
- The concrete request counts or token amounts behind each tier multiplier (1x / 3x / 20x etc.)
The terminal form of Cursor: it shares one account, one model catalogue and one mcp.json with the editor.
The command is agent. Officially it supports "print automation for scripts and CI pipelines", so you can put the agent inside a script.
Against the IDE form it adds two paths. One is headless non-interactive use. The other is handing a session to a Cloud Agent or a persistent session.
Three differences from the IDE form: the interaction surface (a terminal), scriptability (-p / --print plus --output-format text|json|stream-json), and the way it plugs into other clients (agent acp, which serves ACP over stdio and JSON-RPC).
When to use it, when not to
People doing engineering work in the terminal, writing scripts, or running CI/CD. The official GitHub Actions docs and cookbook cover this. People already on Cursor who want the editor and the terminal to share one account, model set and MCP config. People who need to hand a session to a Cloud Agent or keep it running through a persistent session.
Not a fit where an open-source licence or full self-hosting is required. Cursor CLI is a closed-source commercial product: it needs a Cursor account or an API key, and usage draws on the same account quota pools.
China availability domestic / direct access / CAC filing · snapshot 2026-10-23
- Origin
- foreign-made foreign entity (no matching filing entity in the CAC registry).
- Direct access
- direct OK official site measured 200 direct.
- CAC filing
- not in filing list:not in the CAC public registry (13 batch attachments searched 2026-10-20, https://www.cac.gov.cn/2024-04/02/c_1713729983803145.htm); the product does not serve the mainland public, so filing does not apply.
Filing status is quoted from the CAC public registry (updated batch by batch; this site copies the number and does not interpret it). "Direct access" is this site's own reachability measurement from a mainland network, not a vendor promise. GitHub-hosted sites fluctuated on the measurement day — the note says so.
8 questions, one table
8 questions, each comparable item by item with its peers.
- Model & openness
Same origin as the Cursor editor: the model catalog follows the account.
Example selectable models on the official CLI landing page:
- Auto
- Composer 2
- Opus 4.6
- Codex 5.3 High Fast
- Gemini 3 Pro
- Grok
The same page also says it covers:
- frontier models from Anthropic, OpenAI, Gemini, Cursor, etc.
The official model names (original English):
Official landing-page wording: Auto, Composer 2, Opus 4.6, Codex 5.3 High Fast, Gemini 3 Pro, Grok
The models & pricing page lists another batch: Claude 4.6 Opus / Sonnet, Gemini 3.1 Pro, GPT-5.3 Codex, GPT-5.4, Grok 4.20 and Composer 2.
Switch models via
--model <model>,--list-models,agent models,/model.Enterprises can restrict available models via admin policies. A restricted model passed to
--modelexits with restriction info. Official CLI changelog wording:Official CLI changelog wording: "Admin Team model restrictions apply in the CLI"
v2026.09.28 fixed a pitfall.
--modelcould previously silently run a shorter base model.The only difference from
./cursor.mdis the entry point. The model catalog does not change by form factor.- Where it runs
A local terminal process; the command name is
agent.The official install script puts it in
~/.local/bin; native Windows uses PowerShell. Auto-update is on by default;agent updateupgrades manually.The lifecycle is mainly bound to the terminal session. But the official docs offer several "detach from the terminal" paths (see background).
Compared with the IDE form in
./cursor.md, there are three differences. One is the interaction surface: here it is the terminal. Two is scriptability. Three is integration:agent acpcan run the CLI as an ACP server, on stdio, for custom clients to connect.- Local files
Operates within the repo/workspace; Git worktrees can isolate changes.
Specify the workspace with
--workspace <path>. Use-w/--worktree [name]to create a new worktree under~/.cursor/worktrees/<reponame>/<name>(sharing retention rules with the editor).Writing to disk is tightened by default. To land changes in scripts you need
--force(or--yolo). Official headless-page wording:Official headless-page wording: "Without
--force, changes are only proposed, not applied"Note the parameters page has a contradicting statement; both pages coexist:
Official parameters-page wording: "Has access to all tools, including write and shell"
Rules are read from
.cursor/rulesandAGENTS.md/CLAUDE.mdat the project root. Read/write scope is precisely controlled by permissionsRead(...)/Write(...).- Tasks after shutdown
The terminal process ends with the session, but the official docs provide three "detach from the terminal" paths.
One is Cloud Agent handoff. Prefixing a message with
&in a session lets you pick it up on web or mobile at cursor.com/agents.Official wording: "continue running while you're away"
Two is persistent sessions. Start with
agent persist, detach with/detach, reconnect withagent persist attach, manage withagent persist list/stop. This capability came in v2026.08.26; changelog wording:v2026.08.26 changelog wording: "Keep agents running after you disconnect"
Three is
agent worker, officially described as starting a private cloud worker:Official wording: "a private cloud worker that runs agents in your environment"
The execution-environment ownership and quota limits of each of the three paths are not spelled out separately on the official pages.
- Tools & extensions
The tool surface has three layers, all three verified.
Layer one: built-in tools. Official using-page wording:
Official using-page wording: "Agent has tools for file operations, searching, running shell commands, and web access"
Within it, Shell Mode (
/shell, aliases/sh,/run) runs commands in a login shell.Layer two: MCP. The CLI automatically reads
mcp.json:Official wording: "automatically detect and respect your
mcp.json"Locations are
.cursor/mcp.jsonor~/.cursor/mcp.json, sharing the same servers with the editor. There is also theagent mcpsubcommand (login/list/list-tools/enable/disable) and--approve-mcps.Layer three: ACP.
agent acpexposes an ACP server over stdio + JSON-RPC.Extension mechanisms additionally include plugins (
--plugin-dir,/plugin), skills (pasteable as a custom mode) and.cursor/rules.- Context & memory
Sessions are resumable, forkable, and compactable.
Continue sessions with
--resume [chatId],--continue,agent resume,agent ls,/resume./forkforks the current session into a new one;/rewindjumps back to earlier messages. Context compaction uses/summarize(alias/compress).v2026.09.22 fixed a pitfall: earlier summaries could drop the latest request or the whole session. Now the most recent user message is preserved verbatim. If summarization fails or is aborted, the original session is kept.
Long-term context relies on rules and skills.
.cursor/rulesandAGENTS.md/CLAUDE.mdload automatically./goalcan set a long-term goal, officially marked "Rolling out".Where cross-session memory is stored is not explained on this page by the official docs.
- Permissions & limits
The permission design is the finest-grained part of this form factor, with additional sudo credential protection.
There are two config files: global
~/.cursor/cli-config.json, project-level<project>/.cursor/cli.json.Permission tokens come in five classes:
Shell(cmd)Read(path)Write(path)WebFetch(domain)Mcp(server:tool)
Controlled via
permissions.allow/permissions.deny; deny takes precedence over allow.By default, every terminal command requires approval. Official using-page wording:
Official using-page wording: "Before running terminal commands, CLI will ask you to approve (y) or reject (n)"
--force(alias--yolo) grants a pass. The sandbox is controlled by/sandboxor--sandbox enabled|disabled; the official docs say disabling uses "allowlist mode".When
sudois needed, a masked password prompt appears. The official docs say the password goes straight tosudovia secure IPC:Official wording: "The AI model never sees it"
For CI, the official docs recommend restricted autonomy + permission-based restrictions, writing instructions into
permissions.jsonalongside Auto-review.- Best for
Fits three kinds of people:
- those doing engineering tasks in the terminal, writing scripts, or running CI/CD (official GitHub Actions docs and cookbook)
- those already using Cursor who want the editor and terminal to share one account / models / MCP config
- those who need to hand sessions to a Cloud Agent or keep them running in a persistent session
Not a fit for scenarios requiring an open-source license. Cursor CLI is a closed-source commercial product, requires a Cursor account or API key, and its usage is folded into the account's quota pool.
Top misconception
- Thinking Cursor CLI is a standalone free tool: it needs a Cursor account or an API key, and usage draws on the same account quota pools.
- Assuming print mode writes files by default: the headless page states that without --force / --yolo changes are only proposed, not applied.
- Expecting Shell Mode to run long tasks: commands time out after 30 seconds and the limit is not configurable.
Evidence sources
Checked 2026-10-23,Content updated 2026-10-08。This is the date of the entry, not a claim that every field was rechecked that day.
| Type | Name | Link |
|---|---|---|
| docs | Cursor · official CLI landing page (install, example models, headless entry) | https://cursor.com/cli |
| changelog | Cursor · CLI changelog (v2026.09.28 / 09.22 / 08.26 persistent sessions, captured 2026-10-08) | https://cursor.com/docs/cli/changelog |
| docs | Cursor Docs · Cursor CLI overview (modes, non-interactive, Cloud Agent handoff, sandbox, sudo) | https://cursor.com/docs/cli/overview |
| docs | Cursor Docs · Headless CLI (print mode, --force, output formats, CI scripts) | https://cursor.com/docs/cli/headless |
| docs | Cursor Docs · GitHub Actions integration (CURSOR_API_KEY, autonomy levels, permission restrictions) | https://cursor.com/docs/cli/github-actions |
| docs | Cursor Docs · CLI Permissions (Shell / Read / Write / WebFetch / Mcp) | https://cursor.com/docs/cli/reference/permissions |
| docs | Cursor Docs · CLI Parameters (global options and subcommand list) | https://cursor.com/docs/cli/reference/parameters |
| docs | Cursor Docs · Models & pricing (dual usage pools and per-tier inclusions) | https://cursor.com/docs/models-and-pricing |
| pricing | Cursor · official pricing page | https://cursor.com/pricing |
| changelog | Cursor · product changelog (Projects / self-hosted / Rollouts etc.) | https://cursor.com/changelog |
Test notes
This site has not completed measured runs. The test protocol is at protocols/coding/_protocol.md.
Suggested measurement: focus on the actual "no-write vs write" behavior in non-interactive mode. The two official pages disagree. The headless page says: without --force, nothing lands on disk. The parameters page says: the CLI has access to all tools, including write and shell.
This is the single best thing to verify with a real CI pipeline.
Second, test the consistency of persistent sessions (agent persist) after network disconnects.
Differences from the IDE form (differences only)
| Dimension | Cursor (IDE form) | Cursor CLI (this entry) | ||
|---|---|---|---|---|
| Interaction surface | graphical editor | terminal process, command agent | ||
| Scripting | no native non-interactive entry | -p / --print + `--output-format text\ | json\ | stream-json` |
| CI | — | official GitHub Actions docs and cookbook | ||
| Editor integration | it is the editor | agent acp exposes an ACP server (stdio + JSON-RPC) | ||
| Shared items | account, models, mcp.json, .cursor/rules, quota pool | same |
These are two installations of the same product. The model catalog and quota pool do not change by form factor; the differences are the interaction surface and degree of scriptability. See Cursor (IDE form).
Headless / non-interactive (the key point of this section)
The official headless page spells out the scripting contract:
- one-shot execution:
agent -p "...". Official wording "Use print mode (-p, --print) for non-interactive scripting and automation"
- landing changes: batch file edits need
--force(alias--yolo). Official wording "Without--force, changes are only proposed, not applied"
- output:
--output-format text | json | stream-json, with--stream-partial-outputfor incremental streaming; the example script parsestool_callevents withjq
- auth:
export CURSOR_API_KEY=...(stored as a repo/org secret in CI) - trust:
--trusttrusts the workspace without interaction under headless
For CI, the official docs distinguish two autonomy levels and recommend "restricted autonomy" for production: leave commits, pushes and comments to deterministic CI steps; the agent only edits files. Then enforce hard constraints at the CLI layer via permissions.allow / deny.
Permissions and sandbox
Five permission-token classes, written in ~/.cursor/cli-config.json (global) or <project>/.cursor/cli.json (project-level). deny takes precedence over allow.
| token | example |
|---|---|
Shell(cmd) | allow Shell(git), deny Shell(rm) |
Read(path) | Read(**/*.md), deny Read(.env*) |
Write(path) | Write(src/**), deny Write(**/*.key) |
WebFetch(domain) | fetches not in allow require approval each time |
Mcp(server:tool) | Mcp(datadog:*), Mcp(*:*) |
In interactive mode, every terminal command requires approval by default. The sandbox toggles via /sandbox or --sandbox enabled|disabled; disabling degrades to allowlist mode.
When sudo is needed, the official docs say the password goes straight to sudo via secure IPC — the model never sees it in plaintext.
Changelog highlights (official CLI changelog)
| Version | Key change |
|---|---|
v2026.09.28 | --model / /model now run the exact model you chose (previously could silently run a shorter base model) |
v2026.09.22 | Auto-review: decides whether MCP calls pass or are blocked per instructions in permissions.json; fixed summaries dropping requests |
v2026.08.26 | persistent sessions: agent persist keeps agents running after disconnect; team model restrictions take effect in the CLI |
The official docs have a dedicated Cursor CLI changelog page, separate from IDE / Agents Window / SDK. agent --version shows the version; agent update upgrades in place.
Verification notes
This entry is marked confidence: partial, for these reasons.
Verified: capability and permission-surface evidence is sufficient. The official CLI docs, dedicated changelog page, pricing and models pages were all captured.
Still missing: two structural gaps (see the unknowns list below), so it is not marked verified.
Official pages checked the 2026-10-08 check:
- official landing page — https://cursor.com/cli
- official CLI changelog — https://cursor.com/docs/cli/changelog
- CLI Overview — https://cursor.com/docs/cli/overview
- CLI Headless — https://cursor.com/docs/cli/headless
- CLI GitHub Actions — https://cursor.com/docs/cli/github-actions
- CLI Permissions — https://cursor.com/docs/cli/reference/permissions
- CLI Parameters — https://cursor.com/docs/cli/reference/parameters
- Models & pricing — https://cursor.com/docs/models-and-pricing
- official pricing page — https://cursor.com/pricing
- product changelog — https://cursor.com/changelog
Related entries
- Cursorthe IDE form of the same product; account, model catalog,
mcp.jsonand rules are shared — differences are the execution surface and approval defaults - Claude Code CLIalso a terminal coding agent; permission granularity and cloud-session mechanics are worth comparing
- Codex CLIalso a vendor-official CLI; non-interactive modes and sandbox tiers can be compared side by side
- Filesystem MCP ServerOther layer · MCP tools
Same-category peers
Look at these three before reading further
Selected by overlap in jobs, not ranked. Compare where it runs, licence and status first; if one of the three fails, skip it.
| Object | Where | Licence | Evidence / status | What it is for |
|---|---|---|---|---|
| Amp | Cloud / API | Not checked | 8 questions checked Active | Sourcegraph's Amp: a frontier coding agent spanning CLI + cloud orbs + r |
| Claude Code CLI | Local / self-hosted | Not checked | 8 questions checked Active | A terminal coding and tool-execution product, with a CHANGELOG and Atom |
| Codex CLI | Local / self-hosted | Not checked | 8 questions checked Active | OpenAI's official terminal coding agent, written in Rust, architecturall |
Same vendor
More from Anysphere
One vendor’s products are often split across categories. This list puts them together so you do not have to assemble them across five sites.
This page is generated from the ai-handbook data layer (CC BY 4.0).
For the judging criteria and method notes, see METHODOLOGY.md.