Download Cursor

Cursor Composer — Multi-File AI Editing from Natural Language Instructions

Composer is the feature that transforms Cursor from a code editor into a code generation engine. Describe a change in plain English — "add JWT authentication to all API routes with refresh token rotation" — and Composer modifies every relevant file simultaneously. It creates middleware, updates route handlers, adds environment variables, generates tests, and adjusts configuration files. Every change appears as a diff preview. Accept, reject, or edit before anything touches your working directory.

Composer understands project structure. It reads your imports, module boundaries, and dependency graph to produce changes that compile and pass existing tests. When the task requires terminal commands — package installations, database migrations, build steps — Composer hands off to agent mode for autonomous execution. The result is end-to-end feature implementation from a single natural language prompt.

Download Cursor Free View Pricing
Cursor Composer editing multiple files simultaneously with diff preview and natural language instruction panel

Cursor Composer Capabilities — April 2026

  • Edits multiple files simultaneously from a single natural language instruction
  • Diff preview for every change — accept all, reject specific hunks, or edit generated code before applying
  • Creates new files, updates imports, generates tests, and adjusts configurations in one atomic operation
  • Integrates with agent mode for tasks requiring terminal commands, package installs, or build steps
  • Supports undo/redo for all Composer operations — revert entire multi-file changes with one shortcut
  • Powered by Claude Sonnet/Opus, GPT-4o/5.4, and Gemini — auto mode selects the optimal model
  • Available on all plans: Hobby (limited), Pro ($20 credits), Pro+ ($60 credits), Ultra ($200 credits)

The Composer Workflow — From Description to Deployed Code

Composer follows a four-step workflow: describe the change, preview the diffs, accept or reject, and apply. Each step gives you full control over what happens to your code.

Cursor Composer natural language input panel with instruction describing a multi-file feature addition

Step 1: Describe the Change in Natural Language

Open Composer with Ctrl+I (Cmd+I on macOS) and type your instruction. Composer accepts anything from simple tasks — "rename the User model to Account across all files" — to complex features — "implement rate limiting middleware with Redis backend, per-endpoint configuration, sliding window algorithm, and integration tests." The more specific your instruction, the more accurate the output. You can reference specific files with @file syntax, mention symbols with @symbol, or scope the change to a directory.

Composer maintains conversation context. Follow-up instructions like "now add error logging to the middleware you just created" work because Composer remembers what it changed in the previous turn. This iterative workflow lets you build features incrementally — describe the core logic first, then add error handling, then add tests, each in a separate Composer turn with full diff preview at every step.

Cursor Composer diff preview showing changes across three files with accept and reject controls

Step 2: Preview Diffs Across All Affected Files

After you submit an instruction, Composer generates changes and presents them as diffs — one per affected file. Each diff shows additions in green, deletions in red, and modifications with inline highlighting. You can expand or collapse individual files, scroll through changes, and read the AI's reasoning for each modification. The diff preview is not a final commit — nothing changes in your working directory until you explicitly accept.

For large changes that touch 10 or more files, Composer groups diffs by category: new files, modified files, and deleted files. Each group shows a summary of what changed and why. This organization prevents you from missing a critical change buried in a long diff list. According to research from MIT's software construction course, structured code review — where changes are grouped by purpose rather than alphabetical order — catches 40% more defects than unstructured review.

Cursor Composer accept and reject controls with per-hunk granularity for multi-file changes

Steps 3-4: Accept, Reject, and Apply Changes

You control exactly what gets applied. Accept all changes with one click, reject the entire operation, or use per-hunk controls to accept some changes and reject others. Each hunk — a contiguous block of additions or deletions — has its own accept/reject button. This granularity means you can take the function implementation but reject the import change, or accept the test file but modify the error message before applying.

After accepting, changes apply atomically to your working directory. Undo with Ctrl+Z (Cmd+Z) reverts the entire multi-file operation — every file returns to its pre-Composer state in one keystroke. Redo with Ctrl+Shift+Z restores the changes. This undo/redo integration means Composer operations are no riskier than manual edits. The Cursor documentation covers keyboard shortcuts and advanced Composer configuration including custom prompts and model selection per operation.

Composer Capabilities Matrix

A breakdown of what Composer can do across different operation types and plan tiers.

CapabilityDescriptionHobbyProPro+Ultra
Multi-File EditModify multiple files from one instructionLimitedFrom creditsFrom creditsPriority
New File CreationGenerate new files with boilerplate and logicLimitedFrom creditsFrom creditsPriority
Import ManagementAuto-add/remove imports across affected filesLimitedFrom creditsFrom creditsPriority
Test GenerationCreate unit/integration tests for changed codeLimitedFrom creditsFrom creditsPriority
Diff PreviewPer-file, per-hunk accept/reject controlsYesYesYesYes
Undo/RedoAtomic revert of entire multi-file operationsYesYesYesYes
Agent IntegrationHand off to agent for terminal/build tasksLimitedFrom creditsFrom creditsPriority
Conversation ContextFollow-up instructions reference prior changesYesYesYesYes
@file / @symbol RefsScope changes to specific files or symbolsYesYesYesYes

Real-World Composer Use Cases

Developers use Composer for tasks that would normally require coordinated edits across multiple files — the kind of work that slows down feature delivery.

Feature Implementation

Describe a complete feature — "add search functionality to the product catalog with filtering by price, category, and rating" — and Composer creates the search component, API endpoint, database query, filter UI, pagination logic, and tests. Each file receives exactly the changes it needs. The result compiles and passes tests because Composer reads your existing patterns, types, and dependencies before generating code.

Cross-File Refactoring

Restructure your codebase without manual find-and-replace. Ask Composer to "extract all database queries into a repository pattern" and it creates repository classes, moves query logic, updates all callers, adjusts imports, and modifies tests. Unlike IDE refactoring tools that only rename symbols, Composer understands architectural patterns and can restructure code at the design level while preserving all existing behavior.

Bug Fixes with Tests

Describe a bug — "the checkout flow fails when the cart contains items with zero quantity" — and Composer traces the issue, fixes the validation logic, adds guard clauses, updates error messages, and generates a regression test that reproduces the original bug. The test confirms the fix works and prevents the bug from reappearing. One instruction produces a complete fix with verification — no manual test writing required.

Start Using Cursor Composer Today

Download Cursor free for macOS, Windows, or Linux. Open Composer with Ctrl+I and describe your first multi-file change. The Hobby plan includes limited Composer operations so you can evaluate the workflow. Pro at $20/month provides a credit pool for regular use. Import your VS Code settings in one click — every extension, theme, and keybinding transfers. Over 1 million developers already build features faster with Cursor Composer.

Download Cursor Agent Mode

Frequently Asked Questions About Cursor Composer

How Composer works, what it can do, and which plans include it.

What is Cursor Composer?

Composer is Cursor's multi-file editing feature. Describe a change in natural language and Composer modifies all relevant files — functions, imports, tests, configurations — with a diff preview before applying. It integrates with agent mode for tasks requiring terminal commands or iterative debugging.

How does Composer edit multiple files at once?

Composer reads your project structure, dependencies, and instruction to determine which files need changes. It generates modifications for all files simultaneously and presents unified diffs. Accept all changes, reject specific hunks, or edit code before applying. The operation is atomic — undo reverts all files at once.

Can Composer create new files and imports?

Yes. Composer creates new files, adds imports, generates test files, and updates configurations in one operation. Ask it to add an API endpoint and it creates the handler, updates the router, adds tests, and manages all import statements automatically.

Does Composer work with agent mode?

Yes. For tasks that need terminal commands — package installations, migrations, builds — Composer hands off to agent mode. Agent mode runs commands, reads output, and iterates until the task succeeds. Combined, they handle end-to-end feature implementation from description to passing tests.

Which plans include Cursor Composer?

All plans include Composer. Hobby (free) has limited requests. Pro ($20/mo) provides a $20 credit pool. Pro+ ($60/mo) and Ultra ($200/mo) offer larger pools. Auto mode is unlimited on all paid plans. Teams ($40/user/mo) includes shared Composer access with centralized billing.