How to Set Up Cursor, the AI Code Editor (Step by Step)
Cursor is a code editor built on VS Code with AI built in. It has Tab suggestions, inline edit, and an Agent that can read your project, edit files and run commands.
In short: download Cursor, sign in, import your VS Code settings, then use Tab, Ctrl+K (inline edit) and Ctrl+I (Agent). Put project rules in AGENTS.md.
Why use Cursor
You do not install an AI plugin. The AI is part of the editor. It feels like VS Code, so your shortcuts and most extensions keep working. You can also pick from several AI models in one place.
What you get
- Tab: grey suggestions as you type. Tab accepts.
- Inline edit: select code, press Ctrl+K (Mac: Cmd+K), type what to change.
- Agent: side panel (Ctrl+I). It searches your code, edits files and runs terminal commands.
- Plan Mode: Shift+Tab in the Agent box. It researches, asks questions and writes a plan before coding.
- Model picker: switch AI models in the Agent box (Ctrl+/ loops through them).
- Rules: AGENTS.md or .cursor/rules/*.mdc files with your project rules.
How setup flows
Install steps
- Go to cursor.com and download the installer for your system (Windows 10+, macOS 12+, or Linux).
- Windows: run the .exe. Mac: open the .dmg and drag Cursor to Applications.
- Ubuntu/Debian: Cursor has an apt package (preferred over the AppImage, because it updates itself). Copy the exact commands from the Cursor download page.
- Open Cursor and sign in.
- Import VS Code: press Ctrl+Shift+J (Mac Cmd+Shift+J) → General → Account → under VS Code Import click Import. This brings extensions, themes, settings and keybindings.
- Open your project: File → Open Folder.
Settings
- Cursor Settings (Ctrl+Shift+J): models, rules, Tab and privacy options live here.
- Privacy: check the privacy / data-sharing option in Cursor Settings before working on company code. Follow your company policy.
- Extensions: Cursor uses the Open VSX registry, not the VS Code Marketplace. Most popular extensions are there; a few Microsoft-only ones may be missing.
- Shortcuts: same defaults as VS Code, plus AI keys. Change them in the keyboard shortcuts editor.
Configuration: project rules
- AGENTS.md in the project root: simple rules in plain Markdown. Works with other coding agents too.
- .cursor/rules/: one
.mdcfile per rule, with a small header that says when it applies (always, or only for some files). Plain.mdfiles in that folder are ignored. - Keep rules short. They are sent with requests.
# Project rules - Node 20, TypeScript strict - Tests: npm test must pass before you finish - Never edit .env or deploy scripts - Ask before adding a new npm package
First task (5 minutes)
- Press Ctrl+I to open Agent. Ask: “Explain this codebase. Point me to the main entry points.”
- Ask for one small change: “Add input checks to the function in @utils.ts and add a test.” (Type
@to point at a file.) - Watch the diff. Reject anything you do not want.
- Ask it to run your tests. Check the result yourself.
- For a bigger job, press Shift+Tab for Plan Mode first and approve the plan.
| Action | Windows/Linux | Mac |
|---|---|---|
| Agent panel | Ctrl+I | Cmd+I |
| Inline edit | Ctrl+K | Cmd+K |
| Switch agent mode | Shift+Tab | Shift+Tab |
| Next AI model | Ctrl+/ | Cmd+/ |
| Accept Tab suggestion | Tab | Tab |
Quick quiz
1. Which shortcut opens the Cursor Agent?
Ctrl+I (Mac: Cmd+I).
2. How do you import VS Code settings?
Ctrl+Shift+J → General → Account → VS Code Import → Import.
3. Which extension registry does Cursor use?
Open VSX.
4. Where do simple project rules go?
AGENTS.md in the project root (or .mdc files in .cursor/rules/).
Save tokens and money
Use Tab and inline edit (Ctrl+K) for small changes; they are cheaper than Agent. Point Agent at files with @ instead of letting it search everything. Start a new chat for each new task.