Global options

Global options can be used with any command:
OptionDescription
-V, --versionOutput the version number
-a, --api-key <key>API key for authentication (can also use CURSOR_API_KEY env var)
-pPrint 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)
--fullscreenEnable fullscreen mode
--resume [chatId]Resume a chat session
-m, --model <model>Model to use (e.g., sonnet-4, sonnet-4-thinking, gpt-5)
-f, --forceForce allow commands unless explicitly denied
-h, --helpDisplay help for command

Commands

CommandDescriptionUsage
loginAuthenticate with Cursorcursor-agent login
logoutSign out and clear stored authenticationcursor-agent logout
statusCheck authentication statuscursor-agent status
update|upgradeUpdate Cursor Agent to the latest versioncursor-agent update or cursor-agent upgrade
lsResume a chat sessioncursor-agent ls
resumeResume the latest chat sessioncursor-agent resume
help [command]Display help for commandcursor-agent help [command]
When no command is specified, Cursor Agent starts in interactive chat mode by default.

Arguments

When starting in chat mode (default behavior), you can provide an initial prompt: Arguments:
  • prompt — Initial prompt for the agent

Getting help

All commands support the global -h, --help option to display command-specific help.