Skip to content
Cursor

Getting Started with Cursor

Set up Cursor, configure a .cursorrules file, and learn the inline Cmd+K and chat workflows that make it useful day to day.

Beginner7 min read

What Cursor is

Cursor is a code editor built on top of VS Code with AI assistance woven directly into the editing experience — inline edits, a chat panel with your codebase as context, and autocomplete that predicts multi-line changes. See /tools/cursor for a full comparison against terminal-based agents like Claude Code.

Step 1: Install and open a project

  • Download and install Cursor for your OS
  • Open an existing project folder (File → Open Folder) — it can import your VS Code settings and extensions automatically
  • Sign in to enable the AI features

Step 2: Set project rules with .cursorrules

Like Claude Code's CLAUDE.md, Cursor supports a rules file at your project root that's applied to every AI interaction automatically. Set this up before you start generating real code.

.cursorrules
Always use TypeScript, never plain JavaScript.
Prefer named exports over default exports.
Use Tailwind CSS utility classes only — do not write custom CSS files.
Keep components small and focused; extract logic into hooks when a
component exceeds ~100 lines.
Never remove or weaken existing tests without asking first.

Step 3: Inline edits with Cmd+K (Ctrl+K on Windows)

Select a block of code and press Cmd+K to describe a change directly in place — this is the fastest loop for small, localized edits where you already know exactly what needs to change.

Cmd+K prompt
Extract this validation logic into a separate function called
validateEmail, and add a check for a missing @ symbol.

Step 4: Use chat for anything that spans multiple files

The chat panel is better suited to tasks that touch more than one file — it can search your codebase for context, propose changes across several files, and show you a combined diff before applying anything.

Chat prompt
The /checkout page calls calculateTotal from lib/pricing.ts. Find every
place that function is called, and update all of them to pass the new
optional "couponCode" argument I just added to its signature.

Step 5: Review before accepting

  • Read the proposed diff in full before clicking Accept — don't accept multi-file changes on autopilot
  • Run your test suite after any chat-driven change, not just the file you were focused on
  • If autocomplete suggests something that looks subtly wrong, reject it — a wrong suggestion accepted quickly is more expensive to find later

Common pitfalls

  • Skipping .cursorrules and re-explaining the same conventions in every chat
  • Using Cmd+K for changes that actually span multiple files — switch to chat instead
  • Accepting long autocomplete blocks without reading them, especially around business logic

Ready to build the next one?

Browse the full tutorial library or grab a ready-made prompt for your next step.