Usage: agent [options] [command] [prompt...] Start the Cursor Agent Arguments: prompt Initial prompt for the agent Options: -v, --version Output the version number --api-key API key for authentication (can also use CURSOR_API_KEY env var) -H, --header
Add custom header to agent requests (format: 'Name: Value', can be used multiple times) -e, --endpoint Target API endpoint URL (can also use CURSOR_API_ENDPOINT env var) (default: "https://api2.cursor.sh", env: CURSOR_API_ENDPOINT) -p, --print Print responses to console (for scripts or non-interactive use). Has access to all tools, including write and shell. (default: false) --output-format Output format (only works with --print): text | json | stream-json (default: "text") --stream-partial-output Stream partial output as individual text deltas (only works with --print and stream-json format) (default: false) --mode Start in the given execution mode. plan: read-only/planning (analyze, propose plans, no edits). ask: Q&A style for explanations and questions (read-only). (choices: "plan", "ask") --plan Start in plan mode (shorthand for --mode=plan). (default: false) --resume [chatId] Select a session to resume (default: false) --continue Continue previous session (default: false) --model Model to use (e.g., gpt-5, sonnet-4-thinking). Parameterized models accept quoted bracket overrides, e.g. 'claude-opus-4-8[context=1m,effort=high,fast=false]' --list-models List available models and exit (default: false) -f, --force Force allow commands unless explicitly denied (default: false) --yolo Alias for --force (Run Everything) (default: false) --auto-review Use Auto-review (Smart Auto): a server classifier auto-runs safe tool calls and prompts for the rest (default: false) --sandbox Explicitly enable or disable sandbox mode (overrides config) (choices: "enabled", "disabled") --approve-mcps Automatically approve all MCP servers (default: false) --trust Trust the current workspace without prompting (default: false) --workspace Workspace directory or saved workspace name to use (defaults to current working directory) --add-dir Add an additional workspace root directory (can be specified multiple times) --plugin-dir Load a local plugin directory (can be specified multiple times) -w, --worktree [name] Start in an isolated git worktree at ~/.cursor/worktrees//. If omitted, a name is generated. --worktree-base Branch or ref to base the new worktree on (default: current HEAD) --skip-worktree-setup Skip running worktree setup scripts from .cursor/worktrees.json (default: false) -h, --help Display help for command Commands: persist Start or manage a session that survives terminal disconnects install-shell-integration Install shell integration to ~/.zshrc uninstall-shell-integration Remove shell integration from ~/.zshrc login Authenticate with Cursor. Set NO_OPEN_BROWSER to disable browser opening. logout Sign out and clear stored authentication mcp Manage MCP servers plugin Manage plugins and plugin marketplaces worker [options] Run a self-hosted Cloud Agent worker that connects to Cursor and executes agent tool calls on this machine. Without --pool it is a personal My Machines worker (no Enterprise plan needed); with --pool it joins a team Self-Hosted Pool (Enterprise plan + service account API key). status|whoami [options] View authentication status models List available models for this account team View or switch the active team for this account bedrock Configure AWS Bedrock usage for CLI about [options] Display version, system, and account information update [options] Update Cursor Agent to the latest version create-chat Create a new empty chat and return its ID generate-rule|rule Generate a new Cursor rule with interactive prompts agent [prompt...] Start the Cursor Agent ls Resume a chat session resume Resume the latest chat session help [command] Display help for command