Skip to content

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.

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.

Terminal window
# Preferred: Install via Homebrew for easy updates
brew install --cask cursor
# Alternative: Download .dmg from cursor.com
# After installation, add to PATH:
# Command Palette → "Install 'cursor' command in PATH"

If you’re migrating from VS Code, import your settings to maintain your workflow:

  1. Open Cursor Command Palette (Ctrl+Shift+P)
  2. Search for “Import VS Code Settings”
  3. Select which settings to import:
    • Extensions
    • Keybindings
    • Settings
    • Snippets
  4. 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:

Terminal window
# From Command Palette (Ctrl+Shift+P):
# 1. "Install 'cursor' command in PATH"
# 2. "Install 'code' command in PATH"
# Now you can:
cursor . # Open current directory
cursor myfile.js # Open specific file
cursor -n # Force new window
cursor -r folder/ # Reuse existing window
cursor -w file.txt # Wait for file to close
cursor -g file.js:42 # Go to line 42
cursor --diff file1 file2 # Compare files
cursor -a folder # Add folder to workspace

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:

  1. Open Settings (Ctrl+Shift+J)
  2. Navigate to Features → YOLO Mode
  3. Enable YOLO Mode
  4. 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, pytest
    Deny list: rm -rf, sudo, ssh, curl, wget

For microservices or monorepos, configure multi-root workspaces:

Terminal window
# Method 1: Add folders incrementally
cursor /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
}
}
}

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)

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

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
}
}

Tip 11: Create Comprehensive Project Rules

Section titled “Tip 11: Create Comprehensive Project Rules”

Set up .cursor/rules/ directory for consistent AI behavior:

Terminal window
# Create rules structure
mkdir -p .cursor/rules
touch .cursor/rules/style-guide.md
touch .cursor/rules/architecture.md
touch .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

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"]
}
]
}

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

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
}

Tip 15: Set Up Development Environment Variables

Section titled “Tip 15: Set Up Development Environment Variables”

Configure environment for consistent AI assistance:

.cursor/environment.json
{
"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:

Terminal window
# API Keys (never commit this file)
ANTHROPIC_API_KEY=your_key_here
OPENAI_API_KEY=your_key_here
# Project-specific
DATABASE_URL=postgresql://localhost:5432/mydb
API_ENDPOINT=http://localhost:3000

After setup, verify your configuration:

  • Shell commands (cursor and code) 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

Shell command not found:

Terminal window
# macOS/Linux: Add to ~/.bashrc or ~/.zshrc
export PATH="$PATH:/Applications/Cursor.app/Contents/Resources/app/bin"
# Windows: Run as administrator
setx PATH "%PATH%;C:\Users\%USERNAME%\AppData\Local\Programs\cursor\bin"

Indexing stuck:

  1. Check excluded patterns aren’t too broad
  2. Restart Cursor
  3. Clear cache: Settings → Advanced → Clear Index Cache

High memory usage:

  • Reduce memoryLimit in performance settings
  • Increase file exclusions
  • Disable unused extensions

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.