Setup & Configuration: Tips 1-15
Getting your Cursor environment properly configured is the foundation for everything that follows. These 15 tips cover installation best practices, essential settings, and configuration optimizations that even experienced developers often overlook.
Installation Fundamentals
Section titled “Installation Fundamentals”Tip 1: Platform-Specific Installation Best Practices
Section titled “Tip 1: Platform-Specific Installation Best Practices”Choose the right installation method for your operating system to ensure smooth updates and system integration.
# Preferred: Install via Homebrew for easy updatesbrew install --cask cursor
# Alternative: Download .dmg from cursor.com# After installation, add to PATH:# Command Palette → "Install 'cursor' command in PATH"
# Option 1: Windows Package Managerwinget install Anysphere.Cursor
# Option 2: Download installer from cursor.com# Cursor installs to AppData by default
# Download AppImage from cursor.comchmod +x Cursor-*.AppImage
# For Ubuntu/Debian, install FUSE if needed:sudo apt install libfuse2
# Create desktop entry for application launcher./Cursor-*.AppImage --appimage-desktop-integration
Tip 2: Import VS Code Settings Seamlessly
Section titled “Tip 2: Import VS Code Settings Seamlessly”If you’re migrating from VS Code, import your settings to maintain your workflow:
- Open Cursor Command Palette (
Ctrl+Shift+P
) - Search for “Import VS Code Settings”
- Select which settings to import:
- Extensions
- Keybindings
- Settings
- Snippets
- Restart Cursor to apply changes
Tip 3: Install Shell Commands for Terminal Integration
Section titled “Tip 3: Install Shell Commands for Terminal Integration”Enable the cursor
and code
commands for seamless terminal workflow:
# From Command Palette (Ctrl+Shift+P):# 1. "Install 'cursor' command in PATH"# 2. "Install 'code' command in PATH"
# Now you can:cursor . # Open current directorycursor myfile.js # Open specific filecursor -n # Force new windowcursor -r folder/ # Reuse existing windowcursor -w file.txt # Wait for file to closecursor -g file.js:42 # Go to line 42cursor --diff file1 file2 # Compare filescursor -a folder # Add folder to workspace
Essential Configuration
Section titled “Essential Configuration”Tip 4: Enable Privacy Mode for Sensitive Projects
Section titled “Tip 4: Enable Privacy Mode for Sensitive Projects”Configure privacy settings before working on proprietary code:
// In Cursor Settings (Ctrl+Shift+J){ "cursor.privacy.mode": "enabled", "cursor.privacy.shareCodeWithAnthropicCheck": false, "cursor.privacy.shareLogsCheck": false}
When Privacy Mode is enabled:
- No code is stored or used for training
- All processing happens in real-time
- Logs are not retained
Tip 5: Configure YOLO Mode for Automated Testing
Section titled “Tip 5: Configure YOLO Mode for Automated Testing”YOLO mode enables Cursor to run commands automatically, essential for test-driven development:
- Open Settings (
Ctrl+Shift+J
) - Navigate to Features → YOLO Mode
- Enable YOLO Mode
- Configure allowed commands:
Prompt: "any kind of tests are always allowed like vitest, npm test, nr test, etc. also basic build commands like build, tsc, etc. creating files and making directories (like touch, mkdir, etc) is always ok too"Allow list: npm, pnpm, yarn, bun, deno, node, tsc, vitest, jest, pytestDeny list: rm -rf, sudo, ssh, curl, wget
Tip 6: Set Up Multi-Root Workspaces
Section titled “Tip 6: Set Up Multi-Root Workspaces”For microservices or monorepos, configure multi-root workspaces:
# Method 1: Add folders incrementallycursor /path/to/frontend# Then: File → Add Folder to Workspace → Select backend folder
# Method 2: Create workspace file# Save as: myproject.code-workspace{ "folders": [ { "path": "frontend" }, { "path": "backend" }, { "path": "shared" } ], "settings": { "cursor.workspace.searchExclude": { "**/node_modules": true, "**/dist": true } }}
Model Configuration
Section titled “Model Configuration”Tip 7: Strategic Model Selection
Section titled “Tip 7: Strategic Model Selection”Configure models based on task complexity:
// Cursor Settings → Models{ "cursor.models.default": "claude-3.5-sonnet", "cursor.models.codeCompletion": "cursor-small", "cursor.models.chat": { "simple": "claude-3.5-sonnet", "complex": "claude-3-opus", "reasoning": "o3-mini" }}
Model Selection Strategy:
- Sonnet 4: Default workhorse for most coding tasks
- Opus 4: Complex architectural decisions (5x cost)
- o3: Intricate debugging and problem-solving
- Gemini 2.5 Pro: Large context windows (2M tokens)
Tip 8: Enable Max Mode Strategically
Section titled “Tip 8: Enable Max Mode Strategically”Max Mode provides extended context windows but increases costs:
{ "cursor.maxMode.enabled": true, "cursor.maxMode.trigger": "manual", // Don't auto-enable "cursor.maxMode.warningThreshold": 500000 // Warn at 500k tokens}
Use Max Mode for:
- Analyzing files over 10,000 lines
- Cross-repository refactoring
- Understanding complex architectural relationships
Performance Optimization
Section titled “Performance Optimization”Tip 9: Configure Memory and Performance Limits
Section titled “Tip 9: Configure Memory and Performance Limits”Optimize Cursor for large codebases:
{ "cursor.performance.memoryLimit": "8GB", "cursor.performance.cacheSize": "2GB", "cursor.performance.garbageCollection": "aggressive", "cursor.performance.maxFiles": 50000, "cursor.performance.fileWatcher.pollInterval": "auto"}
Tip 10: Set Up Intelligent File Exclusions
Section titled “Tip 10: Set Up Intelligent File Exclusions”Improve indexing performance by excluding unnecessary files:
{ "cursor.workspace.searchExclude": { "**/node_modules/**": true, "**/dist/**": true, "**/build/**": true, "**/.git/**": true, "**/coverage/**": true, "**/*.log": true }, "cursor.workspace.indexExclude": { "**/vendor/**": true, "**/public/assets/**": true, "**/tmp/**": true }}
Project Rules Setup
Section titled “Project Rules Setup”Tip 11: Create Comprehensive Project Rules
Section titled “Tip 11: Create Comprehensive Project Rules”Set up .cursor/rules/
directory for consistent AI behavior:
# Create rules structuremkdir -p .cursor/rulestouch .cursor/rules/style-guide.mdtouch .cursor/rules/architecture.mdtouch .cursor/rules/testing.md
Example style-guide.md
:
# Project Style Guide
## Code Standards- Use TypeScript with strict mode enabled- Prefer functional components with hooks- Use named exports over default exports- Maximum line length: 100 characters- Use camelCase for variables, PascalCase for components
## Error Handling- Always use try-catch for async operations- Log errors with context- Return meaningful error messages to users
## Comments- Write JSDoc for all public functions- Use inline comments sparingly- Prefer self-documenting code
Tip 12: Configure Auto-Attach Rules
Section titled “Tip 12: Configure Auto-Attach Rules”Set rules to automatically apply based on file patterns:
{ "cursor.rules.autoAttach": [ { "pattern": "**/*.test.{js,ts}", "rules": ["testing"] }, { "pattern": "**/components/**", "rules": ["style-guide", "react-patterns"] }, { "pattern": "**/api/**", "rules": ["api-conventions", "error-handling"] } ]}
Codebase Indexing
Section titled “Codebase Indexing”Tip 13: Optimize Codebase Indexing
Section titled “Tip 13: Optimize Codebase Indexing”Configure indexing for optimal performance:
{ "cursor.indexing.enabled": true, "cursor.indexing.type": "incremental", "cursor.indexing.updateInterval": "5m", "cursor.indexing.priorityPatterns": [ "src/core/**/*", "src/api/**/*", "src/components/**/*" ], "cursor.indexing.includeProjectStructure": true}
Monitor indexing progress:
- Check status in Settings → Indexing & Docs
- View progress in status bar
- Typical times: 1-15 minutes depending on size
Tip 14: Configure Search Cache
Section titled “Tip 14: Configure Search Cache”Enable search cache for faster repeated searches:
{ "cursor.search.cache.enabled": true, "cursor.search.cache.maxSize": "1GB", "cursor.search.cache.ttl": "24h", "cursor.search.semanticSearch": true}
Environment Setup
Section titled “Environment Setup”Tip 15: Set Up Development Environment Variables
Section titled “Tip 15: Set Up Development Environment Variables”Configure environment for consistent AI assistance:
{ "env": { "NODE_ENV": "development", "CURSOR_PROJECT_TYPE": "react-typescript", "CURSOR_TEST_RUNNER": "vitest" }, "runtime": { "node": "20.x", "packageManager": "pnpm" }}
Create .env.cursor
for sensitive configurations:
# API Keys (never commit this file)ANTHROPIC_API_KEY=your_key_hereOPENAI_API_KEY=your_key_here
# Project-specificDATABASE_URL=postgresql://localhost:5432/mydbAPI_ENDPOINT=http://localhost:3000
Verification Checklist
Section titled “Verification Checklist”After setup, verify your configuration:
- Shell commands (
cursor
andcode
) work in terminal - Privacy mode is configured appropriately
- YOLO mode is enabled with safe command list
- Models are selected based on your needs
- File exclusions are configured
- Project rules are created
- Indexing is complete
- Memory limits are appropriate for your machine
Common Setup Issues
Section titled “Common Setup Issues”Shell command not found:
# macOS/Linux: Add to ~/.bashrc or ~/.zshrcexport PATH="$PATH:/Applications/Cursor.app/Contents/Resources/app/bin"
# Windows: Run as administratorsetx PATH "%PATH%;C:\Users\%USERNAME%\AppData\Local\Programs\cursor\bin"
Indexing stuck:
- Check excluded patterns aren’t too broad
- Restart Cursor
- Clear cache: Settings → Advanced → Clear Index Cache
High memory usage:
- Reduce
memoryLimit
in performance settings - Increase file exclusions
- Disable unused extensions
Next Steps
Section titled “Next Steps”With your environment properly configured, you’re ready to explore Core Features. These foundational settings will pay dividends as you scale up your Cursor usage.