Cursor AI Code Editor
Cursor is an AI-first code editor built on VS Code. It uses Claude and GPT-4o to autocomplete, explain, refactor, and generate code across your entire codebase. The default choice for developers building AI applications.

Cursor is an AI-first code editor, built as a fork of VS Code and developed by Anysphere. It embeds Claude and GPT-4o directly into the editing experience so that autocomplete, multi-file edits, and codebase-wide queries happen inside a single tool rather than across a browser tab and an IDE. For developers building AI applications, Cursor removes the context-switching that slows down every cycle of the coding loop.
Official site: https://cursor.com
Documentation: https://docs.cursor.com
Changelog: https://cursor.com/changelog
How Cursor fits into the stack
Installation and first-time setup
Download the installer from cursor.com . Cursor ships native packages for macOS, Windows, and Linux.
# macOS: open the downloaded .dmg and drag Cursor to Applications
# Linux: download the .AppImage or .deb, then:
chmod +x cursor-*.AppImage && ./cursor-*.AppImage
# or
sudo dpkg -i cursor-*.debOn first launch, Cursor imports your VS Code settings, extensions, and keybindings automatically. Sign in with a GitHub or Google account to activate your plan.
Connect to a project:
# Open any existing project from the terminal
cursor /path/to/your/project
# Or open the current directory
cursor .Cursor indexes your codebase in the background after you open a project. The index enables @codebase queries and powers the relevance ranking for Composer. For large monorepos, indexing takes a few minutes on first open and stays current as files change.
Install your existing VS Code extensions:
Open the Extensions panel (Cmd+Shift+X on macOS). All extensions from the VS Code Marketplace install and run identically inside Cursor.
Core features
Tab completion
Cursor’s tab completion goes beyond single-line suggestions. It reads the surrounding context, including adjacent functions and imported modules, and fills multiple lines at once. Press Tab to accept the full suggestion or use the arrow keys to step through alternatives.
# You type the function signature and docstring
def calculate_discount(price: float, user_tier: str) -> float:
"""Return discounted price based on user tier."""
# Cursor completes the body:
tiers = {"gold": 0.20, "silver": 0.10, "bronze": 0.05}
discount = tiers.get(user_tier, 0)
return price * (1 - discount)The model reads the user_tier parameter name, the docstring, and the return type annotation to generate a pattern-consistent implementation rather than a generic placeholder.
Composer and Agent mode
Composer (Cmd+I on macOS) is the multi-file editing interface. You describe what you want in plain English. Cursor reads the relevant files, generates a diff across all affected files, and presents the changes for review. You accept, reject, or modify before anything is written to disk.
Example: add input validation to a FastAPI endpoint
Open Composer and type:
Add Pydantic input validation to the POST /users endpoint in routes/users.py.
The request body must include email (valid email format) and name (non-empty string).
Return a 422 with a clear error message if validation fails.Cursor reads routes/users.py, identifies the existing endpoint signature, generates the Pydantic model, imports it, and updates the route handler. The diff shows every line changed. Review and press Accept All to apply.
Example: refactor to async/await
Refactor get_user_by_id() in services/user_service.py to use async/await.
Update all callers in routes/users.py and tests/test_users.py to match.Cursor traces the call graph, updates the three files, and presents the full diff. This task would take 10-15 minutes manually; Composer produces it in under 30 seconds.
Agent mode extends Composer with terminal access. Cursor can run commands (install packages, run tests, check linting) as part of the task and loop until the output confirms success.
Chat: Cmd+L
Chat (Cmd+L) opens a conversation panel pinned to the right of the editor. Use it to ask questions about the codebase without making changes.
What does the @file:services/auth_service.py token_refresh() function do,
and why does it call revoke_old_tokens() before issuing the new token?Cursor reads the file, traces the function, and explains the logic. The answer includes references to the specific lines. Click a reference to jump directly to that location in the editor.
Chat also accepts code selections. Highlight a block, press Cmd+L, and ask about the selected code only.
@-symbols: pinning context
The @ prefix pins specific sources into the model’s context window:
| Symbol | What it includes |
|---|---|
@file:path/to/file.py | The full content of one file |
@folder:src/services/ | All files inside a directory |
@web:https://docs.example.com | Fetched content of a URL |
@docs | Indexed documentation from configured sources |
@git | Recent commits and diff history |
@codebase | Cursor’s semantic search across the full repo |
Example: use @file to give targeted context
Using @file:schemas/invoice.py as the source of truth for the Invoice model,
write a serialization function that converts an Invoice to the format expected
by the QuickBooks API documented at @web:https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoiceCursor fetches the URL, reads the schema file, and generates the serialization function against both sources simultaneously.
Rules: persistent behavior instructions
Create a .cursor/rules/ directory at your project root and add .mdc files to encode project-specific conventions. Cursor loads these rules on every Composer and Chat session.
mkdir -p .cursor/rules# .cursor/rules/python.mdc
- Use `async/await` for all I/O-bound operations. Never use synchronous `requests` in FastAPI routes.
- All functions must have type annotations on parameters and return values.
- Error handling uses `HTTPException` with explicit `status_code` and `detail`. No bare `raise`.
- Tests use `pytest` with `pytest-asyncio`. Test files mirror the source path: `routes/users.py` -> `tests/routes/test_users.py`.Rules eliminate the need to repeat conventions in every prompt. They are committed to the repo so the whole team shares the same Cursor behavior.
Background agents
Background agents run tasks outside the editor without blocking your current session. Start a background agent from the Cursor dashboard or via the command palette:
Run the full test suite, identify any failures caused by the auth refactor,
and propose fixes without applying them yet.The agent runs pytest, reads the failure output, traces the source of each failure, and returns a summary with proposed diffs. You review the results and apply selectively.
Background agents are useful for long-running tasks (test suites, database migrations, build verification) that would otherwise block the interactive session.
Composer workflow
Cursor vs alternatives
| Cursor | GitHub Copilot | Windsurf | Codeium | |
|---|---|---|---|---|
| Base editor | VS Code fork | Plugin for any editor | VS Code fork | Plugin for any editor |
| Multi-file editing | Yes (Composer) | Limited (Edits, preview) | Yes (Cascade) | Limited |
| Context window | Up to 1M tokens (Claude) | 64K tokens | Up to 200K tokens | 16K tokens |
| Models available | Claude, GPT-4o, o3 | GPT-4o, o3 | Claude, GPT-4o | Codeium custom model |
| Codebase indexing | Yes, semantic | Yes, basic | Yes, semantic | Yes, basic |
| Rules / conventions | .cursor/rules/ | Custom instructions | Workspace rules | .codeium/ config |
| Terminal integration | Yes (Agent mode) | No | Yes | No |
| Background agents | Yes | No | Limited | No |
| Price per month | Free / €19 Pro / €38 Business | Free / €10 Individual / €19 Business | Free / €15 Pro | Free / €12 Pro |
Key differentiator: Cursor’s combination of Claude’s long context window, semantic codebase indexing, and multi-file Composer puts it ahead of plugin-based tools for complex refactors and greenfield feature development. Windsurf is the closest alternative and is worth evaluating if you prefer a different pricing model. GitHub Copilot remains the default choice for teams already inside the GitHub Enterprise ecosystem where SSO and audit logging are pre-configured.
Pricing
| Plan | Price | What is included |
|---|---|---|
| Free | €0/month | 2,000 completions/month, 50 slow premium requests, access to basic models |
| Pro | €19/month | Unlimited completions, 500 fast premium requests, all models including Opus and o3, background agents |
| Business | €38/seat/month | Everything in Pro, SSO, audit logs, admin dashboard, privacy controls, centralized billing |
The Free tier is enough to evaluate Cursor for a single project. Pro is the practical minimum for professional use. Business is required for teams that need compliance logging or want to disable training data sharing at the organizational level.
Fast premium requests use Claude Sonnet 4.6 or GPT-4o at full speed. Slow requests use the same models at reduced priority. The 500 fast requests on Pro reset monthly; heavy Composer sessions can exhaust this in a week on complex projects.
When not to use Cursor
Your team requires a specific enterprise IDE. JetBrains IDEs (IntelliJ, PyCharm, WebStorm) and Eclipse have deep integrations with enterprise toolchains: profilers, debuggers, build systems, and code review plugins tuned to those environments. Cursor has no equivalent. If your team’s workflow depends on IntelliJ’s refactoring engine or a proprietary JetBrains plugin, switching editors carries a real cost.
Your project requires an air-gapped or offline environment. Cursor sends code to external model APIs. There is no fully offline mode. For classified projects, regulated environments with strict data residency, or networks without outbound internet access, Cursor is not suitable. Look at GitHub Copilot with a self-hosted Azure OpenAI endpoint, or JetBrains AI with a local model.
Context window costs are a concern at scale. Each Composer session sends tens of thousands of tokens to the model API. At Pro tier, this is included in the flat fee. If you run Cursor on behalf of a team under Business tier, or integrate it into automated pipelines, model usage can scale beyond the included allocation. Monitor usage per seat before rolling out to large teams.
You need deterministic, reproducible builds in CI. Cursor is an interactive editor, not a pipeline tool. For automated code generation in CI/CD, use the Anthropic API or OpenAI API directly with version-pinned models.
Further reading
- Cursor documentation : official reference for all features, keybindings, and configuration options
- Cursor rules community repository
: community-maintained collection of
.cursor/rules/files for common frameworks and languages - What is vibe coding? : foundational explainer for the AI-assisted development workflow that Cursor is built around
- Claude Anthropic : the model powering Cursor’s default completions and Composer sessions
- Anthropic model documentation : current Claude model IDs, context windows, and pricing
- Context engineering vs prompt engineering : why what you include in the context window matters more than how you phrase the instruction
- Cursor changelog : weekly release notes; Cursor ships updates at a pace that makes the changelog more useful than any third-party summary