Cursor IDE Setup Guide
Getting Started with AI-Powered Coding
1 What is Cursor?
Cursor is an AI-powered code editor built on VS Code. It allows you to:
- Write code with AI assistance
- Ask questions about your code
- Generate code from natural language descriptions
- Debug and fix errors with AI help
For this course, we’ll use Cursor to build an AI agent without needing deep programming expertise.
2 Part 1: Download and Install Cursor
2.1 Step 1: Download Cursor
- Go to cursor.sh
- Click the Download button
- The website will automatically detect your operating system (Mac, Windows, or Linux)
2.2 Step 2: Install on Mac
- Open the downloaded
.dmgfile - Drag the Cursor icon to the Applications folder
- Open Cursor from Applications
- If prompted about security, go to System Preferences → Security & Privacy and click “Open Anyway”
2.3 Step 3: Install on Windows
- Run the downloaded
.exeinstaller - Follow the installation wizard
- Launch Cursor from the Start Menu
3 Part 2: Initial Setup
3.1 Step 1: Sign In (Optional but Recommended)
- When Cursor opens, you’ll see a welcome screen
- Click Sign In to create a free account
- You can sign in with:
- Google account
- GitHub account
Benefits of signing in:
- Free AI credits for code assistance
- Settings sync across devices
3.2 Step 2: Choose Your Theme
- Cursor will ask about your preferred color theme
- Choose Dark or Light based on your preference
- You can change this later in Settings
3.3 Step 3: Import VS Code Settings (Optional)
If you’ve used VS Code before:
- Cursor will offer to import your settings
- Click Import to bring over extensions and preferences
- Or click Skip to start fresh
4 Part 3: Install Python
Cursor needs Python installed on your computer to run our project.
4.1 Check if Python is Already Installed
- In Cursor, open the terminal: View → Terminal (or press
Ctrl+`) - Type this command and press Enter:
python --version- If you see
Python 3.x.x, you’re good! Skip to Part 4. - If you get an error, follow the installation steps below.
4.2 Install Python on Mac
Option A: Using Homebrew (Recommended)
- Open Terminal (outside of Cursor)
- Install Homebrew if you don’t have it:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"- Install Python:
brew install pythonOption B: Direct Download
- Go to python.org/downloads
- Download the latest Python 3.x version
- Run the installer
- Important: Check “Add Python to PATH” during installation
4.3 Install Python on Windows
- Go to python.org/downloads
- Click “Download Python 3.x.x”
- Run the installer
- IMPORTANT: Check the box that says “Add Python to PATH”
- Click “Install Now”
4.4 Verify Installation
After installation, close and reopen Cursor, then:
- Open terminal: View → Terminal
- Run:
python --version- You should see
Python 3.x.x
5 Part 4: Install Required Packages
Our project needs a few Python libraries. Install them in Cursor’s terminal:
pip install pandas numpy scikit-learnYou should see output indicating successful installation.
If you get a “pip not found” error on Mac:
pip3 install pandas numpy scikit-learn6 Part 5: Using Cursor’s AI Features
6.1 Feature 1: AI Chat (Cmd+L / Ctrl+L)
Use this to ask questions or get help:
- Press Cmd+L (Mac) or Ctrl+L (Windows)
- A chat panel opens on the right
- Ask questions like:
- “How do I load a CSV file in Python?”
- “Explain what this code does”
- “Why am I getting this error?”
6.2 Feature 2: Inline Edit (Cmd+K / Ctrl+K)
Use this to write or modify code:
- Select some code (or place cursor where you want new code)
- Press Cmd+K (Mac) or Ctrl+K (Windows)
- Describe what you want in plain English:
- “Add a function that calculates the average price”
- “Fix this error”
- “Add comments explaining this code”
- Review the suggested changes
- Press Enter to accept or Escape to cancel
6.3 Feature 3: Code Completion (Tab)
As you type, Cursor suggests completions:
- Start typing code
- You’ll see gray “ghost text” suggestions
- Press Tab to accept the suggestion
- Press Escape to dismiss
6.4 Feature 4: Agent Mode (Cmd+I / Ctrl+I)
For larger tasks, use Agent mode:
- Press Cmd+I (Mac) or Ctrl+I (Windows)
- Describe a complex task:
- “Create a Python script that loads data and builds a regression model”
- The agent will generate multiple files and complete code
7 Part 6: Creating Your First Project
7.1 Step 1: Create a Project Folder
- In Cursor, go to File → Open Folder
- Navigate to where you want your project (e.g., Documents)
- Click New Folder and name it
oj-pricing-agent - Select this folder and click Open
7.2 Step 2: Create a Python File
- In the Explorer sidebar (left panel), right-click
- Select New File
- Name it
test.py - Add this code:
print("Hello from Cursor!")7.3 Step 3: Run Your Code
- Open the terminal: View → Terminal
- Run your script:
python test.py- You should see:
Hello from Cursor!
Congratulations! You’re ready to build your AI agent.
8 Part 7: Keyboard Shortcuts Reference
| Action | Mac | Windows |
|---|---|---|
| AI Chat | Cmd+L | Ctrl+L |
| Inline Edit | Cmd+K | Ctrl+K |
| Agent Mode | Cmd+I | Ctrl+I |
| Open Terminal | Ctrl+| Ctrl+ |
|
| Save File | Cmd+S | Ctrl+S |
| Open File | Cmd+O | Ctrl+O |
| New File | Cmd+N | Ctrl+N |
| Find | Cmd+F | Ctrl+F |
9 Troubleshooting
9.1 “Python not found” in terminal
Mac:
- Try
python3instead ofpython - Or run:
brew install python
Windows:
- Reinstall Python and make sure to check “Add Python to PATH”
- Restart Cursor after installation
9.2 “pip not found”
Mac:
- Use
pip3instead ofpip
Windows:
- Try
python -m pip install package_name
9.3 Cursor won’t start
- Make sure you have enough disk space (at least 1GB free)
- Try restarting your computer
- Reinstall Cursor from cursor.sh
9.4 AI features not working
- Make sure you’re signed in (check bottom-left corner)
- Check your internet connection
- Try signing out and back in
9.5 Code runs but shows errors
- Copy the error message
- Press Cmd+L (or Ctrl+L) to open AI Chat
- Paste the error and ask “How do I fix this?”
10 Getting Help During the Course
- Zoom Sessions: Ask questions during live sessions
- Cursor AI: Use Cmd+L to ask the AI for help
- Discussion Board: Post questions for peer assistance
- Office Hours: [Insert instructor office hours if applicable]
11 Next Steps
After completing this setup:
- ✅ Cursor is installed and running
- ✅ Python is installed
- ✅ Required packages are installed
- ✅ You can create and run Python files
You’re ready for Zoom Session 1 where we’ll practice using Cursor’s AI features together!