Full access is free during Beta. A paid subscription will be offered after Beta.

Cursor — User Guide

AI-first editor; VS Code fork.

Visit website
Freemium
Strengths
  • Composer mode: describe requirements at once and automatically modify multiple related files
  • Understand the entire codebase context, not just the current file
  • Agent mode: autonomously perform multi-step tasks (create files, run commands, fix errors)
  • Fully compatible with VS Code, plug-ins and shortcut keys are seamlessly migrated
  • Supports GPT-4, Claude 3.5 and other underlying models and can be switched
Best for
  • Large-scale project reconstruction: modify multiple related files at one time to maintain logical consistency
  • New feature development: from requirement description to complete implementation, including test files
  • Understand unfamiliar code bases: quickly get started with other people's projects and ask "what does this function do?"
  • Full stack development: Modify the front and back ends at the same time to keep the interface consistent
  • Bug fix: Paste error message, automatically locate and fix it

Composer multi-file programming

Composer is Cursor's most powerful feature and can accomplish complex tasks across multiple files.

Scenario

Add user authentication function (involving multiple files)

Prompt example
I need to add JWT user authentication functionality to this Express.js project, including:
1. User registration interface POST /api/auth/register
2. User login interface POST /api/auth/login, returns JWT token
3. Middleware: Verify JWT token and protect routes that require login
4. Add password hash storage in the User model

Please modify all related files, including routes, middleware, and models.
Output / what to expect

Cursor Composer automatically:

  • Modify models/User.js: add bcrypt password hashing
  • Create routes/auth.js: registration and login routes
  • Create middleware/auth.js: JWT verification middleware
  • Modify app.js: register new route
  • Update package.json: add jsonwebtoken, bcryptjs dependencies

All file modifications remain logically consistent and can be run directly.

Tips

Press Ctrl+I (Mac: Cmd+I) to open it in Composer, describe the requirements and press Enter to execute.

Scenario

Migrate JavaScript projects to TypeScript

Prompt example
Please migrate this project from JavaScript to TypeScript:
1. Add type annotations to all functions
2. Create the necessary interface and type definitions
3. Update tsconfig.json configuration
4. Fix all types of errors

Keep existing functionality as is, just add a type system.
Output / what to expect

Composer will scan the entire project, in batches:

  • Rename .js files to .ts
  • Add function parameters and return value types
  • Create types/index.ts to uniformly manage type definitions -Configuration tsconfig.json
  • Fix type conflict
Tips

For large projects, it is recommended to migrate in modules. Composer only processes one directory at a time.

Starter & above

The rest of this guide

Additional scenarios and the full comparison table are included with Starter and above. Sign in with an eligible account to load them.

You're on the Free plan. Upgrade to Starter or higher to unlock the rest of this guide—additional scenarios and the full comparison table.

Loading full guide…