Disclaimer: This project is not officially associated with or endorsed by Cursor. It is a community-driven initiative to enhance the Cursor experience.
Hey Cursor community!
I’m excited to share a new tool that will make your Cursor experience even better: Cursor Rules CLI!
What is Cursor Rules CLI?
Cursor Rules CLI is a simple yet powerful tool that helps you find and install the right Cursor rules for your project. It automatically scans your codebase to identify the libraries and frameworks you’re using, then suggests and installs matching MDC (Markdown Cursor) rules to enhance your coding experience.
Why You’ll Love It
Auto-detection: Automatically identifies libraries in your project
Direct specification: Specify libraries manually if you prefer
One-click installation: Downloads and installs rules directly into Cursor
User-friendly interface: Colorful, intuitive CLI experience
Custom repositories: Works with your own rule repositories
Privacy-focused: All scanning happens locally on your machine
Getting Started in Seconds
# Install with uv (recommended)
uv add cursor-rules
# Or use pip if you prefer
pip install cursor-rules
# Scan your project and install matching rules
cursor-rules
That’s it! The tool will scan your project, find the best rules, and install them automatically.
Power User Options
Want more control? We’ve got you covered:
# Preview without installing
cursor-rules --dry-run
# Specify libraries directly (skips scanning)
cursor-rules --libraries "react,tailwind,typescript"
# Scan a specific project directory
cursor-rules -d /path/to/my/project
# Replace existing rules
cursor-rules --force
How the Rules Were Created
The MDC rules powering this tool were created using a sophisticated two-step process:
-
Semantic Search with Exa: We used Exa to perform semantic web searches for each library, gathering the most relevant best practices, common patterns, and expert recommendations.
-
LLM Enhancement: The search results were then processed by an LLM (primarily Gemini) to create detailed, structured content optimized for Cursor’s MDC format.
This approach ensures that each rule contains high-quality, up-to-date information that will genuinely improve your coding experience.
Behind the Scenes
The entire project is built with efficiency in mind:
- Parallel processing for generating rules
- Smart retry system that focuses on failed libraries
- Progress tracking to allow resuming interrupted runs
- Configurable API rate limits and processing parameters
Contributing
This is just the beginning! We’d love your help to make Cursor Rules CLI even better:
- Try it out and share your feedback
- Suggest new libraries to add
- Create and share your own custom rules
- Help us test the custom repository feature
What’s Next?
We can work on:
- Libraries with version rules (next14, next15, etc)
- Extension?
- Support for more frameworks and libraries
Get Involved
- GitHub: awesome-cursor-rules-mdc/cursor-rules-cli
- Issues/Feedback: GitHub Issues
Try it today and let us know what you think! We’re excited to see how Cursor Rules CLI enhances your development workflow.
Happy coding!