# Custom API Keys Learn how to use your own API keys for various LLM providers in Cursor Cursor lets you input your own API keys for various LLM providers to send as many AI messages as you want at your own cost. When a Customer API key is used, we will use that when calling the LLM providers. To use your own API key, go to `Cursor Settings` > `Models` > `OpenAI API Key` and enter your API key. Then, click on the "Verify" button. Once your key is validated, your OpenAI API key will be enabled. Some Cursor features (like Tab Completion, Apply from Chat, and Composer) require specialized models and won't work with custom API keys. Custom API keys only work for features that use standard models from providers like OpenAI, Anthropic, and Google. ### OpenAI API Keys You can get your own API key from the [OpenAI platform](https://platform.openai.com/account/api-keys). ### Anthropic API Keys Similar to OpenAI, you can also set your own Anthropic API key so that you will be using claude-based models at your own cost. ### Google API Keys For Google API keys, you can set your own API key so that you will be using Google models such as `gemini-1.5-flash-500k` at your own cost. ### Azure Integration Finally, you can also set your own Azure API key so that you will be using Azure OpenAI models at your own cost. ### Will my API key be stored or leave my device? Your API key will not be stored, but it will be sent up to our server with every request. All requests are routed through our backend, because that's where we do the final prompt building. # Keyboard Shortcuts Learn Cursor with these keyboard shortcuts and keybindings A high level overview of the keyboard shortcuts and keybindings in Cursor. You can see all keyboard shortcuts by pressing `Cmd + R` then `Cmd + S`. Reference the [Key Bindings for VS Code](https://code.visualstudio.com/docs/getstarted/keybindings) as it serves as a good baseline for Cursor's keybindings. All `Cmd` keys can be replaced with `Ctrl` on Windows.
# General | Shortcut | Action | | ----------------- | ---------------------------- | | `Cmd + I` | Open Composer | | `Cmd + L` | Open Chat | | `Cmd + .` | Toggle Agent in Composer | | `Cmd + /` | Toggle between AI models | | `Cmd + Alt + L` | Open Chat & Composer history | | `Cmd + Shift + J` | Open Cursor settings | | `Cmd + Shift + P` | Open command palette | # Chat | Shortcut | Action | | ------------------------------ | ---------------------------- | | `Cmd + Enter` | Submit with codebase | | `Enter` | Submit | | `↑` | Select previous message | | `Select code, Cmd + L` | Add selected code as context | | `Select code, Cmd + Shift + L` | Add selected code as context | # Composer | Shortcut | Action | | ----------------- | ------------------------- | | `Cmd + Backspace` | Cancel generation | | `Cmd + Enter` | Accept all changes | | `Cmd + Backspace` | Reject all changes | | `Tab` | Cycle to next message | | `Shift + Tab` | Cycle to previous message | | `Cmd + Alt + /` | Open model toggle | | `Cmd + N` | Create new composer | | `Cmd + R` | Create new composer | | `Cmd + Shift + K` | Open composer as bar | | `Cmd + [` | Previous composer | | `Cmd + ]` | Next composer | | `Cmd + W` | Close composer | | `↑` | Select previous message | # Cmd+K | Shortcut | Action | | ----------------- | ------------------ | | `Cmd + K` | Open | | `Cmd + Shift + K` | Toggle input focus | | `Enter` | Submit | | `Option + Enter` | Ask quick question | # Code Selection & Context | Shortcut | Action | | --------------------------------------- | ------------------------------------ | | `@` | [@-symbols](/context/@-symbols/) | | `#` | Files | | `Cmd + Shift + L` | Add selection to Chat | | `Cmd + Shift + K` | Add selection to Edit | | `Cmd + L` | Add selection to new chat | | `Cmd + M` | Toggle file reading strategies | | `Cmd + →` | Accept next word of suggestion | | `Cmd + Enter` | Search codebase in chat | | `Select code, Cmd + C, Cmd + V` | Add copied reference code as context | | `Select code, Cmd + C, Cmd + Shift + V` | Add copied code as text context | # Tab | Shortcut | Action | | --------- | ----------------- | | `Tab` | Accept suggestion | | `Cmd + →` | Accept next word | # Terminal | Shortcut | Action | | ------------- | ------------------------ | | `Cmd + K` | Open terminal prompt bar | | `Cmd + Enter` | Run generated command | | `Esc` | Accept command |
# Models Learn about the different AI models available in Cursor and how to use them With Cursor Chat, Ctrl/⌘ K, and Terminal Ctrl/⌘ K, you can easily switch between different models of your choice. ### Model Dropdown Underneath the AI input box, you will see a dropdown that allows you to select the model you want to use. By default, Cursor has these models ready to use: * [`GPT-4o`](https://openai.com/index/hello-gpt-4o/) * [`GPT-4`](https://openai.com/index/gpt-4/) * [`Claude 3.5 Sonnet`](https://www.anthropic.com/news/claude-3-5-sonnet) * `cursor-small` * `cursor-small` is Cursor's custom model that isn't as smart as `GPT-4`, but is faster and users have unlimited access to it. You can add additional models under `Cursor Settings` > `Models` > `Model Names`. ### What context window is used for model X? In chat, we limit to around 20,000 tokens at the moment (or less if the model does not support that much context). For cmd-K, we limit to around 10,000 tokens, to balance TTFT and quality. Long-context chat uses the model's maximum context window. # Billing FAQ Everything you need to know about managing your Cursor subscription and billing ### How do I access billing settings? The billing portal is where you'll manage all aspects of your subscription. You can access it through the [dashboard](https://cursor.com/settings) by clicking the "Billing" button in your account settings. This takes you to a secure portal where you can handle all billing-related tasks. ### What are Cursor's billing cycles? Billing cycles run on either a monthly or annual basis, starting on the day you subscribe. For Business accounts with multiple seats, we use prorated billing when your team size changes. This means you only pay for the actual time each seat is used within a billing cycle. ### How do team seats work for Business accounts? Business accounts use a per-seat billing model where each team member requires one seat license. When adding new members mid-cycle, you're only charged for their remaining time in that billing period. Team admins can manage seats directly through the dashboard. ### Can I switch between monthly and annual billing? Yes you can! Here's how: **Pro** 1. Go to [settings](https://cursor.com/settings) 2. Click on "Manage subscription" and you will be taken to the billing portal 3. Click on "Update subscription" 4. From here you can switch between monthly and annual billing 5. Select "Yearly" or "Monthly", then click on "Continue" **Business** 1. Go to [settings](https://cursor.com/settings) 2. In the account section, click on "Advanced" then "Upgrade to yearly billing" Please note that you can only switch from monthly to yearly billing self-serve. To switch from yearly to monthly billing, please contact us at [hi@cursor.com](mailto:hi@cursor.com). ### How do trials work? Pro trials last for 14 days or until reaching the usage quotas detailed on our [pricing page](https://www.cursor.com/pricing). After trial expiration, you'll need to upgrade to continue using Pro features. You can upgrade at any time during your trial. ### What is usage-based pricing? You can opt in to usage-based pricing for requests beyond your plan's included quota through your [settings page](https://cursor.com/settings). Premium model requests cost $0.04 each and are billed in blocks of 500 requests ($20). You can set a monthly spending limit to control costs, and you'll never be charged more than your configured limit. ### Where can I find my invoices? All your billing history is available in the billing portal, where you can view and download both current and past invoices. ### Can I get invoices automatically emailed to me? Currently, invoices need to be downloaded manually from the billing portal. We know this is a hassle, so we're developing automatic invoice emails as a new feature, and once available, you'll be able to opt-in! ### How do I update my billing information? You can update your payment method, company name, address, and tax information through the billing portal. We use Stripe as our payment processor to ensure secure transactions. Please note that changes to billing information will only affect future invoices - we cannot modify historical invoices. ### How do I cancel my subscription? You can cancel your subscription directly through the billing portal using the "Cancel subscription" button. Your access will continue until the end of your current billing period. ### I'm having other billing issues. How can I get help? For any billing-related questions not covered here, please email us at [hi@cursor.com](mailto:hi@cursor.com). Include your account details and specific concerns, and our team will help you resolve them quickly! ### Can I get a refund? You can self-serve a refund by going to the billing portal and clicking on the `Cancel subscription` button. If you're not in the window of self-serve refunds, reach out to us at [hi@cursor.com](mailto:hi@cursor.com) and we'll get you sorted out. This is our self-serve refund policy: **EU, UK or Turkey customers** * Eligible for a refund if you cancel your subscription within 14 days of purchase. **All other customers (US + rest of world)** * Monthly subscriptions: Refundable within 24 hours after purchase. * Annual subscriptions: Refundable within 72 hours after purchase # Apply Learn how to apply code suggestions from Cursor Chat directly to your codebase Cursor's `Apply` allows you to quickly integrate a codeblock suggestion from the chat into your code. ### Apply Code Blocks To apply a code block suggestion, you can press on the play button in the top right corner of each chat code block. This will edit your file to incorporate the code produced by Chat. Since you can add the most context and have the most back-and-forth with the model in Chat, we recommend Chat + Apply for more complex AI-driven code changes. ### Accept or Reject Once you have applied a code block, you can go through the diffs and accept or reject the changes. You can also click on the "Accept" or "Reject" buttons in the top right corner of the chat code block. `Ctrl/⌘ Enter` to accept, `Ctrl/⌘ Backspace` to reject. # With Codebase Learn how to use Cursor Chat with your codebase for accurate code-aware responses ### Default Codebase Chat If a codebase isn't [indexed](/context/codebase-indexing), Cursor Chat will first attempt to compute a few search queries to be used to search across your codebase. For better accuracy, it's recommended to use [embeddings search](#embeddings-search). ### Embeddings Search With [codebase indexing](/context/codebase-indexing), Cursor Chat can accurately generate responses based on your codebase. By pressing `Ctrl/⌘ + Enter` after typing a message, Cursor Chat scans through your indexed codebase to find pieces of relevant code. This is generally good for quickly including code snippets to be taken into the context of the conversation. For more control over the codebase search and better accuracy, you can use `@codebase`. ### Advanced Codebase Search Cursor codebase chat goes through a more detailed search when `@Codebase` is used. See more about `@Codebase` [here](/context/@-symbols/@-codebase). # Customize Learn how to customize Cursor Chat with different models and settings ### Choose an AI Model Pick your preferred AI model through the [model toggle](/advanced/models#model-dropdown), and Cursor Chat will use that model to generate responses. You can toggle between models by pressing `Ctrl/⌘ /`. By default, Cursor Chat uses OpenAI's `GPT-4` for its AI model (specifically, the `gpt-4` label points to our instance of GPT4-Turbo). The AI model you choose for Chat will be saved for future sessions, so you don't have to change it every time you open Cursor Chat. ### In-Editor Cursor Chat can also be used as an editor tab by clicking on the horizontal "More" button, and then clicking on the "Open Chat in Editor" button. Cursor Chat will then behave as a regular editor tab. Pressing `Ctrl/⌘ + L` will bring up the chat tab and focus onto it. ### Settings You can customize the Cursor Chat under `Cursor Settings` > `Features` > `Chat`. These settings include: * Always search the web for answers. * This will make the AI model browse the web each query for the most up-to-date information. * Add chat fading animation. * This adds a smooth animation to the AI messages as they are generated. * Auto scroll chat. * This will automatically scroll the chat as the AI generates text when at the bottom of the thread. * Narrow scrollbar in the chat pane. * Show chat history when starting a new chat. # Overview Learn about Cursor Chat, your AI coding assistant that lives in your editor Cursor Chat lets you ask questions or solve problems in your codebase with the most capable language models, all in your editor. For language models to give good answers, they need to know specific things that are relevant to your codebase -- context. Cursor has several built in features to provide context in chat, such as automatically including context across your entire codebase, searching the web, indexing documentation, and user-specified references to code blocks. They are built to eliminate the tedious copy-pasting otherwise necessary for working with language models on code. By default, Cursor Chat is in the AI pane, which is on the opposite side of your primary sidebar. You can toggle the AI pane by pressing `Ctrl/⌘ + L`, which focuses onto the chat when opened. To submit your query, press `Enter`. ### User and AI Messages User messages contain the text you type, along with the context you've referenced. You can go back to any previous user messages to edit and rerun your queries. This will overwrite any messages after that and regenerate new ones. AI messages are the responses generated from the AI model you've picked. They are paired with the user message before them. AI messages may contain parsed code blocks which can be added to your codebase with [instant apply](/chat/apply). All user/AI messages together in the same thread are called a chat thread, and each chat thread is saved in your chat history. ### Chat History By pressing on the "Previous Chats" button on the top right of the AI pane, or by pressing `Ctrl/⌘ + Alt/Option + L`, you can see the chat history. You can click on any chat thread to go back and see the messages that make up that thread, and you can also modify the title of the thread by clicking the pen icon, or delete the thread by clicking the garbage can icon upon hovering over the thread in the history. The title of a Cursor thread is just the first few words of the first user message. ### Default Context By default, Cursor Chat includes the current file as context. You can submit a query without including any context by removing the current file pill from the message. As you type, you can see what will be included in context in the pills above the input box. ### Adding Context By default, user messages will contain the text you type, along with the context you've referenced. You can add more custom context to each bubble with @ symbols, and by default, the current viewing file will be used as context as well in the user message. See the [@ symbols](/context/@-symbols/@-files) pages for more information. ### AI Fix in Chat A convenient feature to fix linter errors in your codebase is to use the AI fix in chat. To do this, hover over the error in the editor, and click the blue AI fix button that shows up. The keyboard shortcut for this would be to do `Ctrl/⌘ + Shift + E`. # Overview Learn how to use Cmd K for quick code generation and editing in Cursor Cmd K, also known or "Ctrl K" on Windows/Linux, allows you to generate new code or edit existing code in the editor window. ### Prompt Bars In Cursor, we call the bar that appears when you press `Ctrl/Cmd K` the "Prompt Bar". It works similarly to the AI input box for chat, in which you can type normally, or use [@ symbols](context/@-symbols) to reference other context. ### Inline Generation If no code is selected when you press `Ctrl/Cmd K`, Cursor will generate new code based on the prompt you type in the prompt bar. ### Inline Edits For in-place edits, you can simply select the code you want to edit and type into the prompt bar. ### Follow-up Instructions After each generation, you can further refine the prompt by adding more instructions to the prompt bar, and pressing `Enter` so the AI regenerates based on your follow-up instructions. ### Default Context By default, Cursor will try to find different kinds of useful information to improve code generation, in addition to the manual [@ symbols](/context/@-symbols/@-files) you include. Additional context may include related files, recently viewed files, and more. After gathering, Cursor ranks the context items by relevance to your edit/generation and keeps the top items in context for the large language model. ### Quick Question If you press `Option/Alt Enter` while in the prompt bar, Cursor will respond to any questions you have about the selection, and the context you have attached. The contents of this conversation could be further used in follow-up generations, so you could simply type "do it" after Cursor comes up with a response to generate the code after a quick question. # Terminal Cmd K Learn how to use Cmd K in Cursor's terminal for AI-powered command generation In the built-in Cursor terminal, you can press `Ctrl/⌘ K` to open a prompt bar on the bottom of the terminal. This prompt bar allows you to describe your desired action in the terminal, and terminal Cmd K will generate a command. You can accept the command by hitting `esc` or run the command immediately with `Ctrl/⌘ + Enter`. By default, Terminal Cmd K sees your recent terminal history, your instructions, and anything else you put in the prompt bar as context. # Forum Join the Cursor community forum to engage with other users, share experiences, and get help Cursor has a dedicated forum where you can engage with other users, share your experiences, ask questions, and participate in discussions about Cursor. Currently, the forum requires a separate login from your main Cursor account. We are actively working on unifying the authentication systems. ## Getting Started To participate in the forum: 1. Visit the [Cursor Forum](https://forum.cursor.com) 2. Click "Sign Up" to create a new forum account 3. Create your credentials (separate from your main Cursor login) 4. Start engaging with the community! We appreciate your understanding as we work to implement a unified login system for all Cursor services. # Overview A developer's guide to Composer # Welcome to Composer Composer is your AI coding assistant that lives in your editor. It helps you explore code, write new features, and modify existing code without leaving your workflow. Use `⌘I` to open it, and `⌘N` to create a new Composer. Composer Main Interface # Agent Enable Agent with `⌘.` to get a coding partner that proactively works with your codebase: * Automatically pull relevant context (try `@Recommended`) * Run terminal commands * Create and modify files * Search code semantically * Execute file operations {/* Agent Demo */} Agent can make up to 25 tool calls before stopping. If you need more, let us know at [hi@cursor.com](mailto:hi@cursor.com)! For now, Agent supports only Claude models. Each tool operation counts as a separate request toward your quota. # Normal Normal mode provides core features for code exploration and generation: * Search through your codebase and documentation * Use web search * Create and write files * Access expanded `@`-symbol commands # Working with Context Type `@` to see context options based on your current work. Navigate with arrow keys, select with Enter, and filter by typing after `@`. Use `Ctrl/⌘ M` to switch file reading methods. `@Recommended` in Agent automatically pulls relevant context. @ Symbol Context Menu **`#` File Selection**\ Use `#` followed by a filename to focus on specific files. Combine this with `@` symbols for precise context control. **Context Pills**\ Pills at the top of your chat show active context. Add or remove pills to adjust what Composer sees. Use `#` to select files, which then appear as pills. # Generating & Applying Changes When Composer suggests changes: * Review them in the diff view * Accept or reject changes with the buttons provided * Use checkpoints to undo if needed {/* Accept/Reject Interface */} # Checkpoints Every time you generate code, Composer creates a checkpoint. You can return to any previous version by clicking on `checkout` near that checkpoint. This is handy if you don’t like the current changes and want to revert to an earlier state. Checkpoints # History Access previous Composer sessions and chats through the history. Open it from the history icon to the right of Cursor Tab. You’ll see a list of past composers and chats, which you can revisit, rename, or remove. Open with `⌘+⌥+L` or `Ctrl+Alt+L` when Composer is focused. History Icon # Layout Composer offers two layout modes: * Pane: A sidebar with chat on the left and your code editor on the right. * Editor: A single editor window, similar to viewing code normally. You can move it around, split it, or even place it in a separate window. # Beta Features ## Iterate on lints Composer attempts to fix linting issues in generated code for most programming languages. If Composer detects lint errors, it will try to fix them automatically when this feature is enabled. Currently, only one iteration is supported. Iterate on Lint Fix Some languages (like Rust) require files to be saved before lint errors appear, which may limit this feature’s effectiveness in all languages. # FAQ ## What's the difference between Chat and Composer? Cursor Chat helps you search and understand your code. Use it to explore your codebase, ask questions, and get explanations. You can search your code with `⌘⏎`. Composer helps you write and edit code. It provides a workspace where you can generate new code and apply changes directly to your files. ## How are long conversations handled? For long conversations, Cursor summarize earlier messages with smaller models like `cursor-small` and `gpt-4o-mini` to keep responses fast and relevant. This approach helps ensure that even extended conversations remain responsive and coherent, without losing track of key details from earlier exchanges. # @Chat This feature is currently only for Cmd K. ### `@Chat` You can add your current chat messages as context by using `@Chat` inside Cmd K. This is useful for when you have a conversation with the AI that you'd like to be applied to edit or generate code. # @Code Learn how to reference specific sections of code in Cursor ### `@Code` To reference specific sections of code, you can use the `@Code` symbol. ### Code Preview Similar to the [`@Files`](/context/@-symbols/@-files) symbol, Cursor will show a preview of the code's content so you can verify that the code you're referencing is the correct one. ### From the Editor Another way to add code snippets as context is to select the code you want to reference, and click on either "Add to Chat" (`Ctrl/⌘ Shift L`) or "Add to Edit" (`Ctrl/⌘ Shift K`). These will add the selected code snippet to either the Chat input box or the currently active Cmd K prompt bar. To add a selected code to a new chat, you can press `Ctrl/⌘ L`. # @Codebase Learn how to use advanced codebase search in Cursor Chat ### `@Codebase` Through `@Codebase`, Cursor Chat goes through these steps until it finds the most important pieces of code to use. * Gathering: scanning through your codebase for important files / code chunks * Reranking: reordering the context items based on relevancy to the query * Reasoning: thinking through a plan of using the context * Generating: coming up with a response Another way of submitting an advanced codebase query is to click on the dropdown next to the `Ctrl/⌘ + Enter` button and select `reranker` for the search behavior. This is only available when `@Codebase` isn't used, otherwise `@Codebase` takes precedence. # @Definitions This feature is currently only for Cmd K. ### `@Definitions` The `@Definitions` symbol adds all nearby definitions to Cmd K as context. # @Docs ### `@Docs` Cursor comes with a set of third party docs crawled, indexed, and ready to be used as context. You can access them by using the `@Docs` symbol. You can find a list of our default pre-scraped docs [here](https://raw.githubusercontent.com/getcursor/crawler/main/docs.jsonl). ### Add Custom Docs If you want to crawl and index custom docs that are not already provided, you can do so by `@Docs` > `Add new doc`. The following modal will appear after you've pasted in the URL of your desired doc: Cursor will then index and learn the doc, and you will be able to use it as context like any other doc. Make sure to add a trailing slash to the URL if you want to index all subpages and subdirectories ### Manage Custom Docs Under `Cursor Settings` > `Features` > `Docs`, you will see the docs you have added. You can edit, delete, or add new docs here. # @Files ### `@Files` In AI input boxes such as in Cursor Chat and Cmd K, you can reference entire files by using `@Files`. Also, if you continue to type after `@`, you will see your file search results after the [`@Code`](/context/@-symbols/@-code) strategy. In order to make sure the file you're referencing is the correct file, Cursor will show a preview of the file's path. This is especially useful when you have multiple files with the same name in different folders. ### Chat Long File References In Cursor's Chat, if the contents of a file is too long, Cursor will chunk the file into smaller chunks and rerank them based on relevance to the query. ### Cmd K Chunking Strategy For Cmd K, Cursor uses the file references differently based on the content length as well. * auto * Automatically pick one of the three reading strategies based on the file size * full file * The entire file is used as context. * outline * Cursor parses the outline of the file and uses the information as context. * chunks * Cursor chunks the file into smaller chunks and picks the most relevant one. ### Drag and Drop You can drag and drop files from the primary sidebar into Chat or Cmd K to add them as context as well. # @Folders Learn how to reference entire folders as context in Cursor Chat Currently, `@Folders` is only supported in the Cursor Chat. ### `@Folders` You can also reference entire folders in Cursor as context. `@Folders` is especially useful for [long context chat](/chat/overview#long-context-chat) where you want to provide a lot of context to the AI. # @Git Currently, `@Git` is only supported in the Cursor Chat. ### `@Git` In Cursor's Chat, you can use `@Git` to add git commits, diffs, or pull requests to your prompt. ### Common Use Cases One common use case for `@Git` is to allow Cursor's AI to scan the diff and look for bugs or issues that could be caused by the diff. You could also use `@Diff of Working State` to generate a commit message from your current diffs. # Paste Links ### `@https://your-link.com` In order for Cursor to visit a link before responding, type `@` and then paste in the link. ### Remove Links By default, we automatically parse links and turn them into `@Links` in Cursor Chat. If you prefer to have the link as plain text, click on the link and then click `Unlink`. # @Web ### `@Web` With `@Web`, Cursor constructs a search query based on the query and the context you've provided, and searches the web to find relevant information as additional context. This can be useful to allow Cursor to find the most up-to-date information online, or to allow Cursor to scrape multiple websites in a few seconds to find the best answer, without the user having to manually search anywhere. # Basic Usage Learn how to use @ symbols in Cursor's AI input boxes In Cursor's AI input boxes, such as in Cmd K, Chat, or Terminal Cmd K, you can use @ symbols by typing `@`. A popup menu will appear with a list of suggestions, and it will automatically filter to only show the most relevant suggestions based on your input. ### Keyboard Shortcuts You can navigate through the list of suggestions using the up/down arrow keys. You can hit `Enter` to select a suggestion. If the suggestion is a category, such as `Files`, the suggestions will be filtered to only show the most relevant items within that category. ### Cmd K Keyboard Shortcut You can use the up/down arrow key to navigate through the list of selected Cmd K @ symbols, `Enter` to expand/collapse the selected context item. For file references, you can use `Ctrl/⌘ M` to toggle the file reading strategies. Read more about file reading strategies [here](/context/@-symbols/@-files#cmd-k-chunking-strategy). # Codebase Indexing Learn how to index your codebase for better AI-powered code understanding ### Index your Codebase For better and more accurate codebase answers using `@codebase` or `Ctrl/⌘ Enter`, you can index your codebase. Behind the scenes, Cursor computes embeddings for each file in your codebase, and will use these to improve the accuracy of your codebase answers. Your codebase index will automatically synchronize with your latest codebase changes. The status of your codebase indexing is under `Cursor Settings` > `Features` > `Codebase Indexing`. ### Advanced Settings By default, Cursor will index all files in your codebase. You can also expand the `Show Settings` section to access more advanced options. Here, you can decide whether you want to enable automatic indexing for new repositories and configure the files that Cursor will ignore during repository indexing, in addition to your .gitignore settings. If you have any large content files in your project that the AI definitely doesn’t need to read, [ignoring those files](/context/ignore-files) could improve the accuracy of the answers. # Ignore Files The .cursorignore file lets you exclude files and directories from Cursor's codebase indexing # About .cursorignore To ignore files from being included in [codebase indexing](/context/codebase-indexing), you can use a `.cursorignore` file in the root of your project. It works the same way as `.gitignore` works for git. `.cursorignore` respects `.gitignore`. If you already have `.gitignore`, the files will be ignored by default. If you want to ignore additional files, you can add them to the `.cursorignore` file. You can read more about how this works on our [security page](https://www.cursor.com/security). ### Chat and Composer Context Currently, Cursor Chat and Composer have access to all files in their context, regardless of `.cursorignore` settings. More info on how we handle AI request can be found on our [security page](https://www.cursor.com/security#ai-requests). ### Example `.cursorignore` files #### Ignore specific files ```sh # Ignore all files in the `dist` directory dist/ # Ignore all `.log` files *.log # Ignore specific file `config.json` config.json ``` #### Only include specific files Include only `*.py` files in the `app` directory. Note that this is the same syntax as `.gitignore`. ```sh # ignore everything * # do not ignore app !app/ # do not ignore directories inside app !app/*/ !app/**/*/ # don't ignore python files !*.py ``` ### Troubleshooting The ignore file syntax is sometimes a bit confusing. The `.cursorignore` file follows the exact same syntax as `.gitignore`, so if you are trying an ignore file and it doesn't work the way you expect it to, we recommend a Google search for the issue, replacing `cursorignore` in your search query with `gitignore`. Probably someone will have had the same issue and StackOverflow will have a good answer. One common example: [here is how you ignore all files except those with a `.php` extension](https://stackoverflow.com/a/50606028) (just adding `*` followed by `!*.php` does not work because the gitignore file discoverer will not descend into and discover any `.php` files in subdirectories). # Rules for AI Learn how to customize AI behavior with global and project-specific rules You can add custom instructions to Cursor by modifying the `Rules for AI` section under `Cursor Settings` > `General` > `Rules for AI`. This custom instruction will be included for features such as Cursor Chat and Ctrl/⌘ K. ### `.cursorrules` For project-specific instructions, you can include the instructions in a `.cursorrules` file in the root of your project. As the same as the "Rules for AI" section, the instructions in the `.cursorrules` file will be included for features such as Cursor Chat and Ctrl/⌘ K. # Notepads Learn how to use Notepads to share context between composers and chat Notepads are currently in beta # Overview Notepads are powerful context-sharing tools in Cursor that bridge the gap between composers and chat interactions. Think of them as enhanced reference documents that go beyond the capabilities of `.cursorrules`, allowing you to create reusable contexts for your development workflow. Notepads serve as collections of thoughts, rules, and documentation that can be: * Shared between different parts of your development environment * Referenced using the `@` syntax * Enhanced with file attachments * Used as dynamic templates for various development scenarios ## Getting started 1. Click the "+" button in the Notepads section 2. Give your notepad a meaningful name 3. Add your content, context, files and other relevant information the same way you would in composer or chat. 4. Reference it in composers or chat using `@` # Key features * **Context Sharing**: Seamlessly share context between composers and chat * **File Attachments**: Attach documentation and reference files (not possible in `.cursorrules`) * **Dynamic References**: Use `@` mentions to link to other resources * **Flexible Content**: Write and structure information in a way that suits your needs # Common use cases 1. **Dynamic Boilerplate Generation** * Create templates for common code patterns * Store project-specific scaffolding rules * Maintain consistent code structure across your team 2. **Architecture Documentation** * Frontend specifications * Backend design patterns * Data model documentation * System architecture guidelines 3. **Development Guidelines** * Coding standards * Project-specific rules * Best practices * Team conventions ## FAQ ### What should I write in Notepads? Notepads are ideal for: * Project architecture decisions * Development guidelines and standards * Reusable code templates * Documentation that needs to be referenced frequently * Team-specific conventions and rules ### What should not be written in Notepads? Avoid using Notepads for: * Temporary notes or scratch work * Information that belongs in version control (like git) * Sensitive data or credentials * Highly volatile information that changes frequently ### Should I follow a particular format or structure? While Notepads are flexible, we recommend: * Using clear headings and sections * Including examples where relevant * Keeping content focused and organized * Using markdown formatting for better readability * Adding relevant file attachments when necessary ### Example Notepad Here's a typical example of a Notepad for a web application project: ```md Notepad example # API Development Guidelines ## Endpoint Structure - Use RESTful conventions - Base URL: `/api/v1` - Resource naming in plural form ## Authentication - JWT-based authentication - Token format: Bearer {token} - Refresh token mechanism required ## Response Format { "status": "success|error", "data": {}, "message": "Optional message" } ## Attached References @api-specs.yaml @auth-flow.md ``` # Generate Commit Message Generate a commit message for your staged files Cursor can help you generate meaningful commit messages for your changes with just a click. Here's how to use this feature: 1. Stage the files you want to commit 2. Open the Git tab in the sidebar 3. Look for the sparkle (✨) icon next to the commit message input field 4. Click the sparkle icon to generate a commit message based on your staged changes The generated commit message will be based on the changes in your staged files and your repository's git history. This means the AI will analyze both your current changes and previous commit messages to generate a contextually appropriate message. Cursor learns from your commit history, which means if you use conventions like [Conventional Commits](https://www.conventionalcommits.org/), the generated messages will follow the same pattern. ## Shortcut You can bind the generate commit message feature to a keyboard shortcut. 1. Go to Keyboard Shortcuts `⌘R ⌘S` or `⌘⇧P` and search for "Open Keyboard Shortcuts (JSON)" 2. Add the following to the file to bind to `⌘M`: ```json { "key": "cmd+m", "command": "cursor.generateGitCommitMessage" } ``` 3. Save the file and you're done! Currently, there isn't a way to customize or provide specific instructions for how commit messages should be generated. The AI will automatically adapt to your existing commit message style. # Migrate from VS Code Learn how to migrate your VS Code setup to Cursor and understand key differences Cursor is a fork of VS Code. This allows us to focus on making the best way to code with AI, while offering a familiar text editing experience. ### Import Extensions, Themes, Settings, and Keybindings You can import your VS Code configuration into Cursor with one-click. Navigate to `Cursor Settings` > `General` > `Account`. ### Staying Up to Date We periodically rebase Cursor onto the latest version of VS Code. ### Why Not an Extension? As a standalone application, Cursor has more control over the UI of the editor, enabling greater AI integration. Some of our features, like Cursor Tab and CMD-K, are not possible as plugins to existing coding environments. ### Settings You can open Cursor specific settings pane by clicking on the gear button top-right, by pressing `Ctrl/⌘ + Shift + J`, or with `Ctrl/⌘ + Shift + P` and typing `Cursor Settings`. You can open VS Code specific settings with `Ctrl/⌘ + Shift + P`, and then typing `VS Code Settings`. ### Why is the Activity Bar in Cursor horizontal? The activity bar is horizontal by default to save room for chat. If you prefer the normal vertical activity bar you can go to the VS Code settings and set `workbench.activityBar.orientation` to `vertical`, and restart Cursor. # Usage Learn about Cursor's subscription tiers, usage limits, and pricing options For more pricing info, please visit [Cursor Pricing](https://cursor.com/pricing). ### Subscription Tiers Cursor offers multiple subscription tiers to fit your needs. * **Hobby** * 14 days **Pro trial** * 50 slow `premium` model uses * 2000 [completions](/tab/overview) uses * **Pro** * 500 fast `premium` model uses per month * Unlimited slow `premium` model uses * Unlimited [completions](/tab/overview) completions * 10 `o1+mini` uses per month * **Business** * Usage information is the same as the `Pro` tier * Enforce privacy mode org-wide * Centralized team billing * Admin dashboard with usage stats * SAML/OIDC SSO ### Premium models GPT-4, GPT-4o, and Claude 3.5 Sonnet are all counted as `premium` models. Each request to Claude 3.5 Haiku is counted as 1/3 of a `premium` model request. ### Pro Trial All new users start with a 14-day Pro trial that includes: * Full access to Pro features * 150 fast `premium` model requests After the trial period ends, accounts automatically transition to the Hobby plan unless upgraded to Pro. ### Fast and Slow Requests By default, Cursor servers try to give all users fast `premium` model requests. However, during peak periods, users who run out of fast `premium` credits will be moved to a slow pool, which essentially is a queue of users waiting for a fast `premium` request to become available. This queue is fair, and Cursor will do everything possible to keep the queue as short as possible. However, if you need more fast `premium` credits and don't want to wait, you can add more requests on the [settings page](https://cursor.com/settings). ### Purchasing additional requests We're actively working on the ability to purchase additional fast requests. For now, these are the ways to do it: #### Fast Requests Packages Additional fast requests are available in packages of 500 for \$20/month to increase your monthly quota. For annual plans, packages are billed annually at \$240. For monthly plans, packages are billed monthly at \$20. Mid-cycle purchases are prorated based on remaining days and billed immediately upon upgrading. For example, purchasing halfway through your billing cycle means paying for half the month. Note that additional packages on a Pro plan will show up as separate Pro subscriptions in your billing dashboard. #### Usage-based Pricing You may opt in to usage-based pricing for requests that go beyond what is included in your plan by visiting your [settings page](https://cursor.com/settings). Usage-based pricing details: * Usage-based pricing is per calendar month (not necessarily same as your billing cycle, will be billed roughly on the 2nd-3rd day of the month) * Available for premium models and other specialized models like o1, Claude 3 Opus * Premium cost \$0.04 per request and are billed every 500 requests (\$20) * If you immediately cancel a request or if it errors we do not count it * You can set a Monthly spending limit to control your maximum usage costs * You will never be charged more than your configured spending limit per month * For team accounts, administrators can restrict usage-based pricing settings to admin-only access ### Check Your Usage You can check your usage on the [Cursor Settings](https://cursor.com/settings) page. You can reach this page inside the Cursor application as well, under `Cursor Settings` > `General` > `Account`, and press "Manage Subscription" for pro users, or "Manage" for business users. Cursor usage resets monthly, based on your subscription start date. # Getting Started Set up your Cursor Business team with centralized billing and SSO support ### Upgrading to Business 1. Open your [Cursor Settings dashboard](https://cursor.com/settings) where you will see this section: 2. Click `Upgrade to Business` and fill in: * Team name * Billing cycle (monthly/yearly) 3. Click `Create Team` and proceed to billing 4. Once billing is complete, you can start inviting team members! 5. For extra security, you can set up SSO or Domain Verification by clicking on the `SSO` ### Current Authentication Options * Email login (magic link) * Gmail/Google/GitHub account authentication * SAML/OIDC SSO support # Team Roles Understanding the different roles and permissions in Business Business plans offers three role types to help you manage your team effectively. Each role has specific permissions and billing implications. ### Member Members are standard users who can access and use all Business features while contributing to team collaboration. * Access to all [Business features](https://cursor.com/pricing) * Can invite team members * Billed for a user seat ### Admin Admins have comprehensive control over team management and security settings to ensure smooth team operations. * Full team management capabilities: * Add/remove team members * Modify team roles * Control team-wide settings * Usage and security controls: * Enable/disable usage-based features * Configure privacy settings * Set organization-wide policies * Usage-based pricing controls: * Enable/disable usage-based pricing * Set organization-wide spending caps * Access to admin dashboard * Billed for a user seat ### Unpaid Admin Unpaid Admins manage the team without using a paid seat - ideal for IT staff who don't need Cursor access. * Same capabilities as Admin * **Not billed for a user seat** * Requires at least one paid Admin on the team to assign this role ### Role Comparison This table provides a detailed breakdown of capabilities across all role types in Business. | Capability | Member | Admin | Unpaid Admin | | ----------------------- | :----: | :---: | :----------: | | Use Cursor Features | ✓ | ✓ | | | Invite Team Members | ✓ | ✓ | ✓ | | Add/Remove Team Members | | ✓ | ✓ | | Modify User Roles | | ✓ | ✓ | | Access Admin Dashboard | | ✓ | ✓ | | Configure SSO/Security | | ✓ | ✓ | | Manage Billing & Subs | | ✓ | ✓ | | Set Usage Controls | ✓ | ✓ | ✓ | | Monitor Team Activity | | ✓ | ✓ | | Requires Paid Seat | ✓ | ✓ | | # Team Management Learn how to manage team members and configure team settings ### Adding Team Members **Email Invitations** * Click the `Invite Members` button * Enter email addresses **Invite links** * Click the `Invite Members` button * Copy the `Invite Link` * Share with team members Invite links currently do not expire. ### Understanding Billing Impact When adding new team members: * Each new member or admin adds a billable seat (see [pricing](https://cursor.com/pricing)) * Billing adjusts automatically * Changes are prorated for your billing period * Unpaid admin seats are not counted When you add new team members in the middle of a month, we'll only charge you for the days they actually use. Similarly, if someone leaves the team, we'll credit your account for any unused days. If you change someone's role (like from Member to Admin), we'll automatically adjust the billing from the day of the change. You can choose to be billed either monthly or yearly - both options are available to suit your needs. ### Team Configuration #### User Management * Modify user roles from the team dashboard * Enable/disable features for specific users * Monitor user activity and usage #### Security Settings & SSO * Configure SSO connections * Set up domain verification * Manage access controls #### SCIM & Provisioning * SSO configuration blocks other sign-in methods automatically * Just-in-time (JIT) provisioning available for domain users with SSO * SCIM provisioning coming soon #### Usage Controls Access usage settings to: * Set spending caps * Monitor team-wide usage ### Billing [How do I switch to annual billing?](/billing/billing-faq#can-i-switch-between-monthly-and-annual-billing) # Privacy FAQ ### What is Privacy Mode? With `Privacy Mode` enabled, none of your code will ever be stored by us or any third-party. Otherwise, we may collect prompts, code snippets and telemetry data to improve Cursor. You can [read more about Privacy Mode here](https://cursor.com/privacy). You can enable `Privacy Mode` at onboarding or under `Cursor Settings` > `General` > `Privacy Mode`. Privacy Mode ### Are requests always routed through the Cursor backend? Yes! Even if you use your API key, your requests will still go through our backend! That's where we do our final prompt building. ### Does indexing the codebase require storing code? It does not! If you choose to index your codebase, Cursor will upload your codebase in small chunks to our server to compute embeddings, but all plaintext code ceases to exist after the life of the request. The embeddings and metadata about your codebase (hashes, obfuscated file names) are stored in our database, but none of your code is. You can read more about this on our [security page](https://cursor.com/security). # Features The features section lets you manage which Cursor-specific features you want to use. ### Cursor Tab Here, you can enable [Cursor Tab](/tab/overview) and its [Advanced Features](/tab/advanced-features) in your editor. ### Chat & Composer Here, you can configure [Cursor Chat](/chat/overview) and manage settings for Composer in your editor. ##### Agent Stickiness If enabled, your selection between normal and Agent mode will persist across new Composer conversations.