Getting Started with Cursor
Installation, Setup, and Migrating from VS Code
Get Cursor installed, configure your AI models, import your VS Code settings, and set up your first project. This lesson covers everything you need to go from zero to productive.
Installing Cursor
Cursor is available for macOS, Windows, and Linux. Download the installer from cursor.com and run it like any desktop application. There's no CLI installation required — it's a full desktop IDE.
After first launch, Cursor will offer to import your VS Code settings, extensions, and keybindings. Accepting this import means you can be productive in Cursor immediately, with no reconfiguration.
Initial Setup Checklist
After installation:
- Sign in — Create a Cursor account or sign in with GitHub/Google. Your account controls your usage tier and model access.
- Import VS Code settings — If you're migrating from VS Code, accept the import prompt to bring over extensions, themes, and keybindings.
- Configure models — Go to Settings > Models to choose which AI model powers each feature (chat, completions, agent).
- Enable codebase indexing — Open a project folder and allow Cursor to index it. This typically takes 1–5 minutes for a medium-sized codebase.
Configuring AI Models
Cursor Settings > Models lets you select:
- The completion model (used for Tab suggestions)
- The chat/composer model (used for Chat and Composer)
- Whether to use Cursor's servers, your own API keys, or a local model
Using your own API keys (Anthropic, OpenAI) bypasses Cursor's usage limits and uses models directly from the provider. This is the recommended approach for professional use.
// Example: using your own Anthropic API key
// Settings > Models > API Keys
{
"anthropicApiKey": "sk-ant-...",
"defaultModel": "claude-3-5-sonnet-20241022"
}The .cursorrules File
The most important configuration in any Cursor project is the .cursorrules file at the root of your repository. This file contains project-specific instructions that are automatically injected into every AI interaction.
# .cursorrules
You are working in a Next.js 14 application using TypeScript, Tailwind CSS, and Supabase.
## Code conventions
- Use named exports, not default exports
- All React components use functional component syntax with TypeScript props interfaces
- Database queries use the Supabase client, never raw SQL from the frontend
- Error handling uses typed Result objects, not try/catch
## File structure
- Components live in src/components/[domain]/ComponentName.tsx
- API routes live in src/app/api/[route]/route.ts
- Database types are auto-generated in src/types/supabase.ts
## Do not
- Import lodash — use native array methods
- Use any — always provide proper TypeScript types
- Create inline styles — use Tailwind classes onlyA well-written .cursorrules file dramatically improves AI output quality by giving the model project-specific context it couldn't otherwise have.
Codebase Indexing
When you open a project folder, Cursor offers to index it. Indexing creates semantic embeddings of your code that power:
- Codebase-aware completions
- @codebase search in Chat
- Automatic context retrieval in Composer and Agent
Indexing respects .gitignore. Node modules, build artifacts, and other large folders are excluded automatically. For a typical web app, indexing completes in under a minute.
Key Takeaways
- Installation is a standard desktop app install — import VS Code settings on first run
- Configure AI models in Settings > Models; use your own API keys for professional use
- The
.cursorrulesfile is the single most impactful configuration you can add to any project - Enable codebase indexing immediately after opening a project — it powers all the best features