Master command reference, dev/prompting shortcuts, and setup guides for Cursor's AI-native editor.
Choose the Right Surface
Agent
Edits files, runs terminal commands, searches the codebase, and executes multi-step tasks.
Default mode
Plan
Researches code, asks questions, and constructs a reviewable plan before editing anything.
Shift + Tab
Ask
Explores codebase architecture and explains code without editing any files.
/ask
Inline Edit
Makes a targeted edit to the selected code directly inside the editor.
⌘ K · Ctrl K
Command Reference
| Category | Action | macOS | Windows | Description |
|---|---|---|---|---|
| Agent | Toggle Agent Sidepanel Essential | ⌘ I | Ctrl I | Open or close the main Agent panel. |
| Agent | Toggle Agent Layout Essential | ⌘ E | Ctrl E | Switch between editor and agent view layout. |
| Agent | Open Mode Switcher Essential | ⌘ . | Ctrl . | Toggle between Agent, Plan, or Ask modes. |
| Agent | Cycle Agent Modes Essential | ⇧ Tab | Shift Tab | Rotate through the active AI modes. |
| Agent | Cycle AI Models Advanced | ⌘ / | Ctrl / | Cycle through the available AI models. |
| Agent | Nudge Agent Essential | Return | Enter | Send the default prompt nudge. |
| Agent | Queue Message Advanced | Ctrl Return | Ctrl Enter | Queue a message while the agent is still acting. |
| Agent | Send Immediately Advanced | ⌘ Return | Ctrl Enter | Send the prompt and interrupt the current task. |
| Agent | Toggle Voice Input Advanced | ⌘ ⇧ Space | Ctrl Shift Space | Activate voice dictation. |
| Edit | Inline Code Edit Essential | ⌘ K | Ctrl K | Generate or edit code right at the cursor. |
| Tab | Accept Auto-suggestion Essential | Tab | Tab | Accept the autocomplete suggestion. |
| Tab | Accept Next Word Advanced | ⌘ → | Ctrl → | Accept the suggestion one word at a time. |
| Tab | Reject Suggestion Essential | Esc | Esc | Dismiss the active autocomplete suggestion. |
| Navigate | Command Palette Essential | ⌘ ⇧ P | Ctrl Shift P | Open the main IDE command palette. |
| Navigate | Quick Open File Essential | ⌘ P | Ctrl P | Navigate to a file by name. |
| Navigate | Global Search Essential | ⌘ ⇧ F | Ctrl Shift F | Search text across the whole codebase. |
| Terminal | Toggle Terminal Essential | ⌃ ` | Ctrl ` | Open the integrated terminal panel. |
| Setup | Cursor Settings Essential | ⌘ ⇧ J | Ctrl Shift J | Open Cursor's own options and settings. |
| Setup | General Options Essential | ⌘ , | Ctrl , | Open the global settings panel. |
The CLEAR Framework
Define strict boundaries so Cursor executes accurately without unnecessary edits.
C · Context
State the stack, scope, baseline functionality, and the relevant source files.
L · Limits
Define which files are in scope, which modules are untouchable, and any other constraints.
E · Expected
Detail the expected end-state behavior and the visual or functional outcome.
A · Actions
Explicitly list the steps Cursor should execute, in order, and how to verify them.
Prompt Templates
Project Rules (.cursor/rules/*.mdc)
Configure project-wide instructions to standardize agent code output across a team.
- Keep rules modular and path-scoped using globs.
- Reference canonical code files as structural examples.
- Use
AGENTS.mdfor directory-level domain context. - Store custom rules under
.cursor/rules/name.mdc.
---
description: Frontend TSX standards
globs: src/components/**/*.tsx
alwaysApply: false
---
- Use Tailwind CSS tokens for colors and spacing.
- Enforce strict typing; avoid `any`.
- Keep components modular and export pure functions.
Model Context Protocol
Integrate external databases, documentation scraping, and API calls directly into Cursor's Agent loop using MCP.
Transport Options
Use stdio for local tools and HTTP/SSE for remote services.
Least Privilege
Restrict write capabilities; assign read-only access wherever possible.
Scoped Config
Use a project-level mcp.json for repository-specific tooling.
Environment Keys
Pass credentials securely using environment variables, e.g. ${env:KEY}.
{
"mcpServers": {
"database": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": { "DATABASE_URL": "${env:DATABASE_URL}" }
}
}
}
CLI Installation
Control the Cursor Agent directly from a terminal, run isolated tasks in Git worktrees, and resume sessions seamlessly.
curl https://cursor.com/install -fsS | bash
irm 'https://cursor.com/install?win32=true' | iex
Production Loops
The safest AI workflow cycles between autonomous agent execution and human validation loops.
Inspect the repository first
Do not modify any files yet — read the relevant code and identify every targeted file.
Explain the proposed architecture change
List the risk factors and construct a test plan before touching any code.
Await explicit approval
Only execute the change once the plan has been reviewed and approved.
Safety Guardrails
Keep automated code generation safe and deterministic with explicit boundaries and automated checks.
.env files listed in .cursorignore.