| name | cursor-plugin-convex-rule-use-convex-dev |
| description | Always use 'npx convex dev' for development, never 'npx convex deploy' which is for production only |
| metadata | {"version":"0.1.0"} |
Use convex dev for Development
Important: When working with Convex, always use npx convex dev during development. Never use npx convex deploy unless you're deploying to production.
The Commands
npx convex dev (Development)
Use this for all development work:
- Runs a local development server
- Watches for file changes
- Auto-reloads functions and schema
- Uses a development deployment
- Safe to experiment and test
npx convex dev
npx convex deploy (Production Only!)
Only use this when deploying to production:
- Deploys to your production environment
- Used by CI/CD pipelines
- Should NOT be used during development
- Affects live users
npx convex deploy
Why This Matters
Using deploy during development can:
- ❌ Deploy untested code to production
- ❌ Affect live users
- ❌ Break production database schema
- ❌ Create production data inconsistencies
Using dev for development ensures:
- ✅ Safe, isolated development environment
- ✅ Fast iteration with auto-reload
- ✅ No risk to production
- ✅ Easy testing and debugging
Correct Workflow
Development:
npx convex dev
Deployment:
npx convex deploy
Common Patterns
Initial Setup
npm install convex
npx convex dev
Daily Development
npx convex dev
Production Deployment
npm run test
npm run build
npx convex deploy
CI/CD Pipeline
- name: Deploy to Convex
run: npx convex deploy --cmd 'npm run build'
env:
CONVEX_DEPLOY_KEY: ${{ secrets.CONVEX_DEPLOY_KEY }}
Red Flags
If you see someone suggest:
- "Just run
npx convex deploy to test" ❌ Wrong!
- "Use
deploy for development" ❌ Wrong!
- "Deploy to see if it works" ❌ Wrong!
Always use npx convex dev for development!
Documentation
When writing docs or instructions:
- ✅ Always mention
npx convex dev for development
- ✅ Clearly label
npx convex deploy as "Production only"
- ✅ Show the difference between the two
- ✅ Warn against using deploy during development