make it more readable

This commit is contained in:
sanjeed5
2025-03-03 23:13:29 +05:30
parent f4e495b2e0
commit 30ae9c6391
+32 -114
View File
@@ -1,153 +1,71 @@
# Cursor Rules CLI # Cursor Rules CLI
A simple tool that helps you find and install the right Cursor rules for your project. It looks at what libraries and frameworks you're using and suggests matching rules. A simple tool that helps you find and install the right Cursor rules for your project. It scans your project to identify libraries and frameworks you're using and suggests matching rules.
## What does it do? ## Features
- 🔍 Looks at your project and figures out what libraries you're using - 🔍 Auto-detects libraries in your project
- 📝 Lets you directly specify libraries if you know what you want - 📝 Supports direct library specification
- 📥 Downloads and installs the right rules into your Cursor - 📥 Downloads and installs rules into Cursor
- 🎨 Shows everything in a nice, colorful interface - 🎨 Provides a colorful, user-friendly interface
- 🔀 Works with custom rule repositories too - 🔀 Works with custom rule repositories
- 🔒 100% privacy-focused (all scanning happens locally)
## Getting Started ## Installation
### Quick Install
```bash ```bash
pip install cursor-rules pip install cursor-rules
``` ```
### Running it ## Basic Usage
The easiest way to use it:
```bash ```bash
# Just run this in your project folder # Scan current project and install matching rules
cursor-rules cursor-rules
```
This will: # Specify libraries directly (skips project scanning)
1. Look at your project
2. Show you what rules match your project
3. Let you choose which ones to install
4. Install them for you
### I know what rules I want
If you already know what libraries you want rules for:
```bash
# Just list them with commas
cursor-rules --libraries "react,tailwind,typescript" cursor-rules --libraries "react,tailwind,typescript"
```
This will: # Scan a specific project directory
1. Skip scanning your project directory
2. Only match rules for the libraries you specified
3. Let you choose which ones to install
4. Install them for you
### Common Use Cases
```bash
# Looking at a specific project folder
cursor-rules -d /path/to/my/project cursor-rules -d /path/to/my/project
# Just want to see what it would do (without installing anything)
cursor-rules --dry-run
# Want to replace existing rules
cursor-rules --force
# Want to see more details about what's happening
cursor-rules -v
``` ```
## Making it Work Your Way ## Common Options
| Option | Description |
|--------|-------------|
| `--dry-run` | Preview without installing anything |
| `--force` | Replace existing rules |
| `-v, --verbose` | Show detailed output |
| `--quick-scan` | Faster scan (checks package files only) |
| `--max-results N` | Show top N results (default: 20) |
## Custom Repositories (not tested yet)
### Want to see fewer/more results?
```bash ```bash
# Show only 5 results # Use rules from your own repository
cursor-rules --max-results 5
# Only show really good matches
cursor-rules --min-score 0.8
```
### Skip Project Scanning
```bash
# Directly specify libraries (skips project scanning)
cursor-rules --libraries "react,vue,django"
# Useful when you know exactly what you need
cursor-rules --libraries "pytorch,pandas,matplotlib" --force
```
### Quick Scan vs Deep Scan
```bash
# Do a quick scan (faster but might miss some things)
cursor-rules --quick-scan
```
### Using Your Own Rules Repository
Have your own collection of rules? You can use those instead:
```bash
# Use rules from your repository
cursor-rules --custom-repo your-username/your-repo cursor-rules --custom-repo your-username/your-repo
# Make it remember your repository for next time # Save repository setting for future use
cursor-rules --custom-repo your-username/your-repo --save-config cursor-rules --custom-repo your-username/your-repo --save-config
``` ```
### Saving Your Preferences ## Configuration
```bash ```bash
# See what settings you're using # View current settings
cursor-rules --show-config cursor-rules --show-config
# Save your current settings for all projects # Save settings globally
cursor-rules --save-config cursor-rules --save-config
# Save settings just for this project # Save settings for current project only
cursor-rules --save-project-config cursor-rules --save-project-config
``` ```
## Need More Help? ## Full Options Reference
Run this to see all available options: Run `cursor-rules --help` to see all available options.
```bash
cursor-rules --help
```
This will show you all the options:
```
Options:
-h, --help Show this help message and exit
-d DIRECTORY, --directory DIRECTORY
Project directory to scan (default: current directory)
--dry-run Show what would be done without making changes
--force Force overwrite existing rules
--source SOURCE Base URL for downloading rules
--custom-repo CUSTOM_REPO
GitHub username/repo for a forked repository (e.g., 'username/repo')
--set-repo Set custom repository without running scan
--rules-json RULES_JSON
Path to custom rules.json file
--save-config Save current settings as default configuration
--save-project-config
Save current settings as project-specific configuration
--show-config Show current configuration
--quick-scan Perform a quick scan (only check package files, not imports)
--max-results MAX_RESULTS
Maximum number of rules to display (default: 20)
--min-score MIN_SCORE
Minimum relevance score for rules (0-1, default: 0.5)
--libraries LIBRARIES
Comma-separated list of libraries to match directly (e.g., 'react,vue,django').
When specified, project scanning is skipped.
-v, --verbose Enable verbose output
```
## License ## License