Core Capability: Control the Cursor AI-powered code editor (VS Code fork) from the command line.
Quick Start
# Open current directory
cursor .
# Open file at specific line
cursor /path/to/file.ts:42
# Compare two files
cursor --diff file1.ts file2.ts
# Use as git editor
git config --global core.editor "cursor --wait"
THE EXACT PROMPT — Open Files
# Open file
cursor /path/to/file.ts
# Open at specific line
cursor /path/to/file.ts:42
# Open at line and column
cursor /path/to/file.ts:42:10
# Open multiple files
cursor file1.ts file2.ts file3.ts
# Open in new window
cursor -n /path/to/project
# Reuse existing window
cursor -r /path/to/file
THE EXACT PROMPT — Diff and Wait
# Compare two files
cursor --diff file1.ts file2.ts
cursor -d file1.ts file2.ts
# Wait for file to close (scripts/git)
cursor --wait /path/to/file
cursor -w /path/to/file
# Use as git editor
git config --global core.editor "cursor --wait"