Complete command reference for Cursor Agent CLI
Option | Description |
---|---|
-V, --version | Output the version number |
-a, --api-key <key> | API key for authentication (can also use CURSOR_API_KEY env var) |
-p | Print responses to console (for scripts or non-interactive use) |
--output-format <format> | Output format (only works with -p ): text , json , or stream-json (default: stream-json ) |
--fullscreen | Enable fullscreen mode |
--resume [chatId] | Resume a chat session |
-m, --model <model> | Model to use (e.g., sonnet-4, sonnet-4-thinking, gpt-5) |
-f, --force | Force allow commands unless explicitly denied |
-h, --help | Display help for command |
Command | Description | Usage |
---|---|---|
login | Authenticate with Cursor | cursor-agent login |
logout | Sign out and clear stored authentication | cursor-agent logout |
status | Check authentication status | cursor-agent status |
update|upgrade | Update Cursor Agent to the latest version | cursor-agent update or cursor-agent upgrade |
ls | Resume a chat session | cursor-agent ls |
resume | Resume the latest chat session | cursor-agent resume |
help [command] | Display help for command | cursor-agent help [command] |
prompt
— Initial prompt for the agent-h, --help
option to display command-specific help.