Cursor AI editor open on a monitor with code and AI chat panel visible
# ai coding tools# developer tools

Cursor AI Tutorial: Getting Started From Scratch

Cursor is one of the most capable AI coding tools available right now, and the good news is it doesn't take long to get productive with it. This tutorial walks you through everything from installation to writing and editing code with AI — no prior AI tool experience needed.

What You'll Need

  • A computer running macOS, Windows, or Linux
  • A project to work on (any language or framework works)
  • About 10 minutes for initial setup

If you're not sure what Cursor is, read what is Cursor AI first.

Step 1: Download and Install

Go to cursor.sh and download the installer for your operating system. The installation process is identical to installing VS Code — run the installer and follow the prompts.

On first launch, Cursor will ask if you want to import your VS Code settings, extensions, and keybindings. If you're a VS Code user, say yes. Everything carries over: your themes, your plugins, your keyboard shortcuts. You won't need to reconfigure anything.

Step 2: Sign In and Choose a Plan

Cursor requires an account. Create one at cursor.sh or sign in with GitHub. The free tier gives you a generous number of AI requests per month — enough to properly evaluate the tool before deciding on a paid plan.

Step 3: Open Your Project

Open your project the same way you would in VS Code: File > Open Folder or drag the folder onto the Cursor window.

Cursor will automatically begin indexing your codebase in the background. This is what makes Cursor's AI context so much richer than a standard AI plugin — it reads your entire project structure so it can answer questions about code you're not currently looking at.

You'll see an indexing indicator in the bottom status bar. Let it finish before relying on codebase-wide questions.

Step 4: Autocomplete

Start typing any code. Cursor will offer AI completions in grey text as you type — press Tab to accept a suggestion, or keep typing to ignore it.

This works similarly to GitHub Copilot. For single-line suggestions it's useful; the real power shows up when Cursor suggests entire function bodies or blocks of logic.

Tip: If a suggestion isn't quite right, don't reject it — edit it. Cursor learns from your edits within the session and subsequent suggestions will better match your style.

Step 5: The AI Chat (Cmd+L)

Press Cmd+L (or Ctrl+L on Windows) to open the AI chat panel on the right side of the editor.

This is where you can ask questions about your code:

  • "What does this function do?" — select the function first, then ask
  • "Find all the places where this variable is modified"
  • "Explain the authentication middleware in this project"
  • "Why would this be returning null?"

The chat has access to your open files and indexed codebase. Answers are specific to your project, not generic documentation responses.

Adding Context to Chat

You can reference specific files or symbols in your chat messages by typing @:

  • @filename.php — includes that file's content as context
  • @function_name — references a specific function
  • @Codebase — explicitly tells Cursor to search the full project

Step 6: Inline Editing (Cmd+K)

This is one of Cursor's most useful features. Select any block of code and press Cmd+K. A small prompt bar appears — type what you want done in plain English:

  • "Add error handling to this function"
  • "Convert this to use async/await"
  • "Write a docblock comment for this method"
  • "Simplify this conditional logic"

Cursor will rewrite the selected code and show you a diff view — green lines are additions, red lines are removals. Press Accept to apply the change or Reject to keep your original.

This diff-based review step is important. You're always in control of what actually gets committed to your codebase.

Step 7: Composer for Multi-File Changes (Cmd+Shift+I)

Press Cmd+Shift+I to open Composer. This is Cursor's feature for changes that span multiple files.

Example prompts for Composer:

  • "Add a created_by field to the User model, migration, and API resource"
  • "Create a new PaymentController with CRUD endpoints following the same pattern as OrderController"
  • "Rename the handle() method to process() across all Job classes"

Composer shows you a diff for each file it wants to change. Review each one, then accept all or individually.

Step 8: Using the Terminal

Cursor has a built-in terminal (same as VS Code). You can also ask the AI to run commands for you — press Cmd+K in the terminal and describe what you want to do, and Cursor will suggest the appropriate command.

Keyboard Shortcuts to Remember

ActionMacWindows/Linux
AI ChatCmd+LCtrl+L
Inline EditCmd+KCtrl+K
ComposerCmd+Shift+ICtrl+Shift+I
Accept suggestionTabTab

Tips for Getting the Best Results

  • Be specific in prompts — "add validation to the email field so it rejects addresses without a TLD" beats "validate the email"
  • Give context — reference file names or function names so Cursor knows exactly what you mean
  • Review everything — the diff view exists for a reason; AI makes mistakes
  • Index first — give the codebase indexer time to complete before using codebase-wide features

For a deeper dive into getting the most out of Cursor, see our Cursor AI productivity tips.

After You Ship

Once you've built something with Cursor and deployed it, the monitoring side matters just as much as the build side. Domain Monitor checks your site every minute and alerts you the moment it goes down — so the code you've been working hard on stays available to the people using it. Set up uptime monitoring before you launch, not after.

More posts

What Is Generative AI? How It Works and What It Creates

Generative AI creates new content — text, images, code, and more. This guide explains how it works, what tools are available, and where it's genuinely useful versus overhyped.

Read more
What Is Cursor AI? The AI Code Editor Explained

Cursor AI is an AI-powered code editor built on VS Code. Learn what it does, how it works, and whether it's the right tool for your development workflow.

Read more
What Is Claude Opus? Anthropic's Most Powerful Model Explained

Claude Opus is Anthropic's most capable AI model, built for complex reasoning and demanding tasks. Learn what it does, how it compares, and when to use it.

Read more

Subscribe to our PRO plan.

Looking to monitor your website and domains? Join our platform and start today.