How to Use Cursor with Claude
Cursor IDE integrates Claude AI to provide intelligent code assistance, auto-completion, and contextual programming help. This integration transforms your coding workflow by bringing Claude's advanced reasoning directly into your development environment.
- Download and install Cursor. Visit cursor.sh and download Cursor for your operating system. Run the installer and complete the setup process. Cursor is built on VS Code, so existing VS Code extensions and settings transfer automatically.
- Configure your Claude API key. Open Cursor and press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux). Type 'Cursor: Open Settings' and select it. Navigate to the AI tab and enter your Anthropic API key in the Claude API Key field. Save the settings.
- Activate Claude chat mode. Press Cmd+L (Mac) or Ctrl+L (Windows/Linux) to open the Claude chat panel. Alternatively, click the chat icon in the left sidebar. The chat panel appears alongside your code editor for real-time assistance.
- Use Claude for code generation. Select code in your editor or place your cursor where you want new code. Press Cmd+K (Mac) or Ctrl+K (Windows/Linux) to trigger inline code generation. Type your request and press Enter. Claude generates code directly in your editor.
- Enable auto-completion with Claude. Go to Cursor Settings > AI > Auto-completion and enable Claude-powered suggestions. Set your preferred trigger delay and max suggestions. Claude now provides intelligent auto-completions as you type.
- Chat with context about your codebase. Open the chat panel and use '@' to reference specific files or folders. Type '@filename.js' to include that file's context in your question. Claude can analyze your entire codebase structure and provide targeted assistance.
- Review and edit Claude's suggestions. When Claude generates code, review it before accepting. Use Tab to accept suggestions or Escape to reject them. For inline generations, Claude shows a diff view highlighting changes. Click Accept or Reject for each suggestion.