Command-line interface for Cursor - open files, manage projects, and integrate with your development workflow
Cmd/Ctrl + Shift + P
)Option | Short | Description |
---|---|---|
--new-window | -n | Open in a new window |
--wait | -w | Wait for the window to close before returning |
--add | -a | Add folder(s) to the last active window |
--goto | -g | Go to line and column (e.g., file.js:10:5 ) |
--diff | -d | Compare two files side by side |
--merge | -m | Perform a three-way merge |
--reuse-window | -r | Force to open a file or folder in an already opened window |
--help | -h | Show help information |
--version | -v | Show version information |
Variable | Description |
---|---|
CURSOR_PATH | Override the path to the Cursor executable |
CURSOR_USER_DATA_DIR | Set custom user data directory |
CURSOR_EXTENSIONS_DIR | Set custom extensions directory |
Command not found after installation
Permission denied errors
Different behavior from VS Code CLI
code
command, some advanced options may behave differently. Use cursor --help
to see all available options.CLI not working on Windows
code
command provides full compatibility with VS Code CLI usage: