Cursor Setup Guide
Complete guide to integrating Bootspring with Cursor, the AI-powered code editor.
Overview#
Cursor is an AI-enhanced code editor built on VS Code. Bootspring complements Cursor by providing:
- Structured Context - CLAUDE.md enhances Cursor's understanding
- Expert Agents - Specialized assistance beyond general AI
- Skill Patterns - Production-ready code patterns
- Development Workflows - Multi-phase orchestration
Prerequisites#
- Cursor installed (cursor.sh)
- Bootspring CLI installed (
npm install -g bootspring) - Node.js 18+ installed
Installing Cursor#
macOS#
# Download from cursor.sh or use Homebrew
brew install --cask cursorWindows#
Download from cursor.sh and run the installer.
Linux#
# AppImage
wget https://download.cursor.sh/linux/appImage/x64
chmod +x Cursor-*.AppImage
./Cursor-*.AppImageBootspring Integration#
Step 1: Initialize Bootspring#
cd your-project
bootspring init
bootspring generateThis creates:
CLAUDE.md- Context file (Cursor reads this)bootspring.config.js- Configuration.bootspring/- Local data
Step 2: Cursor Reads CLAUDE.md#
Cursor automatically indexes your project, including CLAUDE.md. This provides:
- Project architecture understanding
- Coding standards and patterns
- Tech stack details
- Custom instructions
Step 3: Configure Cursor Rules#
Create .cursorrules to reference Bootspring context:
# Cursor Rules
## Project Context
Refer to CLAUDE.md for complete project context, architecture, and coding standards.
## Code Generation
- Follow patterns defined in CLAUDE.md
- Use the tech stack specified in project context
- Match existing code style
## When Uncertain
- Check CLAUDE.md for project-specific guidance
- Follow the architecture described in context
- Use established patterns from the codebase
Syncing Context#
Context in CLAUDE.md#
Bootspring generates comprehensive context:
1# Project Context
2
3## Overview
4E-commerce platform built with Next.js...
5
6## Tech Stack
7- Next.js 14 (App Router)
8- TypeScript (strict mode)
9- Prisma (PostgreSQL)
10- Tailwind CSS
11
12## Patterns
13- API routes in app/api/
14- Server Components by default
15- Zod for validation
16
17## Standards
18- ESLint + Prettier
19- Jest for testing
20- Conventional commitsRegenerate After Changes#
# Manual regeneration
bootspring generate
# Watch mode
bootspring generate --watchGit Hook#
Auto-generate on commit:
#!/bin/sh
# .git/hooks/post-commit
bootspring generate --quietUsing Both Together#
Cursor for Quick Edits#
Use Cursor's built-in AI for:
- Line completions (Tab)
- Quick edits (Cmd+K)
- Simple questions (Cmd+L)
Bootspring for Complex Tasks#
Use Bootspring CLI for:
- Expert agent consultations
- Production pattern application
- Multi-phase workflows
# In Cursor's terminal
bootspring agent invoke security-expert "Review auth implementation"
bootspring skill apply patterns/api-endpoint
bootspring workflow start feature-developmentTerminal Integration#
Cursor Terminal#
Cursor includes an integrated terminal. Use Bootspring directly:
# Open terminal: Ctrl+`
bootspring generate
bootspring agent invoke frontend-expert "Help with this component"Completions#
Add to your shell profile:
# Bash
eval "$(bootspring completions bash)"
# Zsh
eval "$(bootspring completions zsh)"Composer Integration#
Using Composer with Context#
When using Cursor's Composer (Cmd+I):
- Composer reads your
CLAUDE.md - Uses project patterns for generation
- Follows your coding standards
Reference Bootspring Context#
In Composer prompts:
Create a new API endpoint following the patterns in CLAUDE.md for user preferences.
Add Context References#
@CLAUDE.md Create a form component following our established patterns.
Custom Commands#
Cursor Command Palette#
Create .vscode/tasks.json (Cursor uses VS Code format):
1{
2 "version": "2.0.0",
3 "tasks": [
4 {
5 "label": "Bootspring: Generate Context",
6 "type": "shell",
7 "command": "bootspring generate",
8 "group": "build"
9 },
10 {
11 "label": "Bootspring: Invoke Agent",
12 "type": "shell",
13 "command": "bootspring agent invoke ${input:agentName} \"${input:prompt}\"",
14 "group": "none"
15 },
16 {
17 "label": "Bootspring: Quality Check",
18 "type": "shell",
19 "command": "bootspring quality pre-commit",
20 "problemMatcher": ["$eslint-stylish"]
21 }
22 ],
23 "inputs": [
24 {
25 "id": "agentName",
26 "type": "pickString",
27 "description": "Select agent",
28 "options": [
29 "frontend-expert",
30 "backend-expert",
31 "database-expert",
32 "security-expert"
33 ]
34 },
35 {
36 "id": "prompt",
37 "type": "promptString",
38 "description": "Enter your prompt"
39 }
40 ]
41}Run via: Cmd+Shift+P → "Tasks: Run Task"
Keyboard Shortcuts#
Cursor Shortcuts#
| Shortcut | Action |
|---|---|
| Cmd+K | Inline edit |
| Cmd+L | Chat panel |
| Cmd+I | Composer |
| Cmd+Shift+L | Add to chat |
Custom Bootspring Shortcuts#
Add to Cursor keybindings:
1[
2 {
3 "key": "cmd+shift+b g",
4 "command": "workbench.action.tasks.runTask",
5 "args": "Bootspring: Generate Context"
6 },
7 {
8 "key": "cmd+shift+b q",
9 "command": "workbench.action.tasks.runTask",
10 "args": "Bootspring: Quality Check"
11 }
12]Settings Synchronization#
Cursor Settings#
.vscode/settings.json:
1{
2 "editor.formatOnSave": true,
3 "editor.defaultFormatter": "esbenp.prettier-vscode",
4 "cursor.chat.defaultModel": "claude-3-opus",
5 "cursor.composer.defaultModel": "claude-3-opus"
6}Bootspring Settings#
bootspring.config.js:
1module.exports = {
2 project: {
3 name: 'my-app',
4 type: 'nextjs',
5 },
6 context: {
7 include: ['**/*.ts', '**/*.tsx'],
8 exclude: ['node_modules/**', 'dist/**'],
9 },
10 agents: {
11 enabled: ['frontend-expert', 'backend-expert'],
12 },
13};Workflow: Cursor + Bootspring#
Feature Development#
-
Plan with Bootspring
bootspring workflow start feature-development -
Design phase - Bootspring agent provides architecture
-
Implement in Cursor - Use Composer for code generation
-
Apply patterns
bootspring skill apply patterns/api-endpoint -
Quality check
bootspring quality pre-commit -
Commit - Context auto-updates
Code Review#
-
Run security review
bootspring agent invoke security-expert "Review recent changes" -
Fix issues in Cursor - Use Cmd+K for inline fixes
-
Verify with quality check
bootspring quality security
Cursor Rules Best Practices#
Reference CLAUDE.md#
# .cursorrules
Always check CLAUDE.md for:
- Project architecture and patterns
- Tech stack and dependencies
- Coding standards and conventions
- Component structure guidelines
When generating code:
1. Read CLAUDE.md first
2. Follow established patterns
3. Match existing code style
4. Use project's preferred libraries
Project-Specific Rules#
# .cursorrules
## Component Structure
- Use Server Components by default (see CLAUDE.md)
- Client Components only for interactivity
- Follow naming conventions in project
## API Routes
- See patterns in CLAUDE.md
- Use Zod for validation
- Handle errors consistently
## Testing
- Jest + React Testing Library
- Follow test patterns in __tests__/
Troubleshooting#
Context Not Updating#
# Force regeneration
bootspring generate --force
# Check for errors
bootspring generate --verboseCursor Not Reading CLAUDE.md#
- Check file exists:
ls CLAUDE.md - Verify it's not gitignored
- Reload Cursor window
- Re-index project: Cmd+Shift+P → "Cursor: Re-index"
Terminal Commands Failing#
1# Check Bootspring installation
2bootspring --version
3
4# Verify PATH
5echo $PATH
6
7# Reinstall if needed
8npm install -g bootspringConflicting AI Suggestions#
If Cursor's suggestions conflict with Bootspring patterns:
- Update
.cursorrulesto reference CLAUDE.md - Be explicit about pattern preferences
- Use Bootspring for complex generation
Performance#
Optimize Context Generation#
1// bootspring.config.js
2module.exports = {
3 context: {
4 // Limit to essential files
5 include: ['src/**/*.ts', 'src/**/*.tsx'],
6 exclude: [
7 'node_modules/**',
8 '**/*.test.ts',
9 'dist/**',
10 ],
11 maxFileSize: 50000,
12 },
13};Cursor Indexing#
Cursor indexes your project. Large contexts may slow indexing:
- Keep CLAUDE.md focused
- Use
.cursorignorefor large files - Exclude generated content
Extensions#
Recommended Extensions#
Install via Cursor's extension panel:
| Extension | Purpose |
|---|---|
| ESLint | Code quality |
| Prettier | Formatting |
| Tailwind CSS IntelliSense | Tailwind support |
| Prisma | Database schema |
Extension Settings#
{
"eslint.validate": ["typescript", "typescriptreact"],
"prettier.singleQuote": true,
"tailwindCSS.experimental.classRegex": []
}