Starting & Modes

Action Shortcut
Install (Mac / Linux / WSL) curl https://cursor.com/install -fsS | bashcurl https://cursor.com/install -fsS | bashcurl https://cursor.com/install -fsS | bash
Install (Windows PowerShell) irm 'https://cursor.com/install?win32=true' | iexirm 'https://cursor.com/install?win32=true' | iexirm 'https://cursor.com/install?win32=true' | iex
Start an interactive session agentagentagent
Start with an initial prompt agent "your prompt"agent "your prompt"agent "your prompt"
Rotate between modes (Agent / Plan / Ask) ShiftTabShiftTabShiftTab
Run non-interactively (headless / print) -p-p-p
Start in Plan mode --mode=plan--mode=plan--mode=plan
Start in Ask mode (read-only) --mode=ask--mode=ask--mode=ask
Run with a specific model --model--model--model
Continue the previous session --continue--continue--continue
Resume a specific conversation --resume--resume--resume

Interactive Controls

Action Shortcut
Submit your prompt EnterEnterEnter
New line without sending ShiftEnterShiftEnterShiftEnter
New line (alternate / tmux) CtrlJCtrlJCtrlJ
Exit the CLI (press twice) CtrlDCtrlDCtrlD
Cycle back through message history UpUpUp
Hand off to a Cloud Agent (prefix your message) &&&

Reviewing Changes

Action Shortcut
Open the review of the agent's changes CtrlRCtrlRCtrlR
Add follow-up instructions (during review) iii
Scroll through files (during review) UpUpUp
Switch files (during review) LeftLeftLeft

Command Approval

Action Shortcut
Approve a terminal command yyy
Reject a terminal command nnn

Slash Commands

Action Shortcut
Switch to Plan mode (design first, clarifying questions) /plan/plan/plan
Switch to Ask mode (read-only exploration) /ask/ask/ask
Summarize to free up context /summarize/summarize/summarize
Summarize (alias) /compress/compress/compress
Resume a previous conversation /resume/resume/resume
Toggle sandbox / network access /sandbox/sandbox/sandbox
Toggle Max Mode (on supported models) /max-mode/max-mode/max-mode
No shortcuts found. Try a different search term.

Frequently Asked Questions

Is the Cursor CLI the same as the Cursor editor?
No. The Cursor CLI is cursor-agent, Cursor's coding agent that runs in your terminal — you launch it with the agent command. The Cursor editor is the AI code editor (a VS Code fork). They share the same underlying agent and your account, but they're different surfaces with different shortcuts, similar to how Claude Code (terminal) differs from the Claude app. For the editor's shortcuts, see our Cursor keyboard shortcuts page.
How do I exit the Cursor CLI?
Press Ctrl+D twice (a double-press) to exit the cursor-agent session. A single Ctrl+D won't quit — this prevents accidental exits while you're typing.
How do I add a new line in the Cursor CLI without sending?
Press Shift+Enter to insert a new line. Shift+Enter works in terminals like iTerm2, Ghostty, Kitty, Warp, and Zed; inside tmux, use Ctrl+J instead. Cmd+Enter also inserts a newline.
How do I review the agent's changes in the Cursor CLI?
Press Ctrl+R to open the review. While reviewing, use the Up/Down arrows to scroll through a file, Left/Right to switch between changed files, and press i to add follow-up instructions without leaving the review.
How do I switch between Agent, Plan, and Ask modes?
Press Shift+Tab to rotate between modes during a session. You can also type /plan or /ask, or launch the agent with the --mode=plan / --mode=ask flag (or --plan).
How do I approve or reject a command the agent wants to run?
When cursor-agent asks to run a terminal command, press y to approve it or n to reject it. You can also adjust command-execution and network behavior with the /sandbox slash command or the --sandbox flag.