# Cursor CLI: Cursor's Coding Agent in the Terminal

> A practical Cursor CLI guide: installing the cursor-agent binary, the Agent, Plan, and Ask modes, CI usage, pricing, and how it compares to Claude Code, Codex CLI, and Gemini CLI.

- Canonical: https://pivio.app/blog/cursor-cli-guide
- Published: 2026-03-27 · Updated: 2026-07-19
- Author: Pivio (pivio.app)

---
Cursor CLI puts Cursor's coding agent in your terminal: one curl command installs the `cursor-agent` binary, and you get the same Agent, Plan, and Ask modes as the Cursor editor with no GUI involved. It runs interactively for everyday work and headless for scripts and CI, and it's included with every Cursor plan, from the free Hobby tier up.

**TL;DR:** Install with `curl https://cursor.com/install -fsS | bash`, then run `cursor-agent` inside a repo. Use Agent mode to make changes, Plan mode to sign off on an approach first, and Ask mode for read-only questions. Pricing follows your Cursor plan: free Hobby tier, then Pro $20/mo, Pro+ $60/mo, or Ultra $200/mo as of July 2026. The full reference lives in [Cursor's CLI docs](https://cursor.com/docs/cli/overview).

## What is Cursor CLI?

Cursor made its name as an AI-first editor, a fork of VS Code with a coding agent baked into the editing experience. But a lot of real work in AI-assisted development happens outside any editor: in scripts, in CI pipelines, on remote boxes where there's no GUI at all. Cursor CLI fills that gap by exposing the same agent from the command line. You invoke `cursor-agent` in your working directory, describe a task, and let it read files, make edits, and run commands.

That puts it in a now-familiar category, the terminal-native coding agent, alongside Claude Code, OpenAI's Codex CLI, and the open-source OpenCode. Once installed, Cursor's agent is no longer tied to the Cursor window: it works in a plain terminal, over SSH, inside a container, or as a pipeline step.

## Installation

One command ([install docs](https://cursor.com/docs/cli/installation)):

```bash
curl https://cursor.com/install -fsS | bash
```

This installs the `cursor-agent` binary. From there, running `cursor-agent` in a project directory starts an interactive session. If you already pay for Cursor, there's nothing extra to buy; the CLI rides on your existing plan.

## The three modes: Agent, Plan, and Ask

The CLI ships the [same three modes as the editor](https://cursor.com/docs/cli/overview):

- **Agent** does the work: it edits files and runs commands to complete the task you describe.
- **Plan** makes the agent lay out an approach before touching anything. Reach for it when the change is big enough that you want to approve the strategy, not just the diff.
- **Ask** is read-only, for interrogating a codebase without risking an edit.

If you've used these modes in the editor, the behavior carries over. That continuity is the CLI's main pitch to teams already standardized on Cursor: one set of conventions across both surfaces.

## Interactive vs. non-interactive

Interactive mode is the default experience: `cursor-agent` opens a session in your terminal and you steer the agent conversationally, watching edits as they happen. It's the right mode for everyday development.

Non-interactive mode is the automation story. Pass a prompt, let the agent run headless, and chain the result into whatever comes next ([overview docs](https://cursor.com/docs/cli/overview)). That unlocks the jobs a GUI can't do:

**CI steps.** Generate boilerplate, apply a mechanical refactor across many files, draft tests, or attempt a fix and leave a pull request for human review.

**Scripted runs.** Wrap the binary in shell scripts and reuse a prompt across a dozen services. Migrations, codemods, dependency bumps, and other well-scoped, repeatable jobs are the sweet spot.

**Remote and containerized work.** A desktop GUI is awkward over SSH or inside a container; a CLI is trivial. Install it where the code lives.

There's a quieter audience too: developers who live in tmux or Neovim and never wanted an IDE. For them the CLI isn't a companion to the editor, it's the whole product.

Whatever the mode, review diffs and run your tests before anything merges. That advice applies to every agent in this category, not just this one.

## Pricing

Cursor CLI has no separate price; access follows your [Cursor plan](https://cursor.com/docs/account/pricing). As of July 2026 that means a free Hobby tier, Pro at $20/month, Pro+ at $60/month, and Ultra at $200/month. The Hobby tier means trying it on a real repo costs nothing.

## How it fits alongside the Cursor editor

The CLI doesn't replace the editor; they're two front-ends to the same agent. The editor is better for interactive, exploratory work: reading code, reviewing diffs inline, staying in a tight feedback loop with full visual context. The CLI wins whenever a GUI is absent or unnecessary: one-off tasks, scripted runs, remote machines, automation. Rules and project conventions carry over between them, so adopting the CLI doesn't mean learning a second tool from scratch.

## Cursor CLI vs Claude Code, Codex CLI, and Gemini CLI

All figures as of July 2026.

| | Cursor CLI | Claude Code | Codex CLI | Gemini CLI |
| --- | --- | --- | --- | --- |
| **Maker** | Cursor | Anthropic | OpenAI | Google |
| **Pricing entry point** | Free Hobby tier; Pro $20/mo | $20/mo (Claude Pro) | $0 (ChatGPT Free) | $0 (1,000 req/day free) |
| **Open source?** | No | No | Yes: Apache-2.0, ~99.6k stars | Yes: Apache-2.0, ~106k stars |
| **Default model family** | Multiple frontier models | Claude (Sonnet 5 default) | GPT-5.6 (gpt-5.6-sol) | Gemini 3 |

A few notes on the neighbors. Claude Code is the strongest pick for reasoning over large, messy codebases (our [Claude Code workflow tips](/blog/claude-code-workflow-tips) cover getting the most from it, and [Claude Code vs Codex](/blog/claude-code-vs-codex) puts it head-to-head with OpenAI's agent). [Codex CLI](https://github.com/openai/codex) is written in Rust and bundled with every ChatGPT plan, including Free. [Gemini CLI](https://github.com/google-gemini/gemini-cli) owns the free tier at 1,000 requests a day. And [OpenCode](https://opencode.ai/), absent from the table but hard to ignore at roughly 187k GitHub stars, is the MIT-licensed, model-agnostic option.

Which one wins depends mostly on the models you prefer and where you're already spending money. For a fuller side-by-side, see [Claude Code vs Cursor vs OpenCode](/blog/claude-code-vs-cursor-vs-opencode) and our roundup of the [best AI coding CLI tools of 2026](/blog/best-ai-coding-cli-tools-2026).

## Running it in a multi-agent stack

Terminal agents stack well. Nothing stops you from pointing Cursor CLI at a scripted migration while Claude Code works a feature on the same machine, even the same repo. The hard part is orchestration: several agents across several windows and panes gets messy, and context-switching eats the productivity you were chasing. Our guide to [running multiple AI agents in parallel](/blog/run-multiple-ai-agents-parallel) covers keeping that under control.

That's also the problem Pivio was built for. Pivio is a desktop app for macOS, Windows, and Linux that runs Claude Code, Codex, and OpenCode in one to six panes in a single window, with Cursor CLI and Gemini CLI on the roadmap, and adds scheduled prompts, a Kanban board with GitHub sync, pipelines, and an embedded browser around the panes. [Pivio](/) is free to download right now, and it doesn't ask for an account.

## Frequently asked questions

### What is the Cursor CLI?

Cursor CLI is Cursor's coding agent in the terminal. Installing it with `curl https://cursor.com/install -fsS | bash` gives you the `cursor-agent` binary, which offers the same Agent, Plan, and Ask modes as the Cursor editor and runs both interactively and headless.

### Is Cursor CLI free?

There's a free Hobby tier, so trying it costs nothing. Paid Cursor plans are Pro at $20/month, Pro+ at $60/month, and Ultra at $200/month as of July 2026, and the CLI is included with each; there's no separate CLI subscription.

### Is Cursor CLI the same as the Cursor editor?

No. They're two front-ends to the same underlying agent. The editor is built for interactive, visual work, while the CLI covers headless runs, scripting, CI, and remote or containerized environments. Rules and conventions carry over between them.

### Can you run Cursor CLI alongside Claude Code?

Yes. As a terminal-native agent, Cursor CLI runs side by side with Claude Code or Codex on the same machine and repo. The main challenge is orchestration, which is why tools for [running multiple AI agents in parallel](/blog/run-multiple-ai-agents-parallel) exist.

## Bottom line

Cursor CLI frees Cursor's agent from the GUI: a one-line install, three familiar modes, and a headless option that makes CI automation practical. For teams already paying for Cursor it's an easy add; for everyone else, the Hobby tier makes evaluation free. Keep the [official docs](https://cursor.com/docs/cli/overview) open for exact flags and current syntax, since the tool moves faster than any guide.