A CLI tool to help initialize and manage Cursor Editor rules for your projects.
This tool makes it easy to set up and manage .cursor/rules
configuration for Cursor editor. It provides:
- Pre-defined templates for various languages (Python, Go, etc.)
- Pre-defined templates for frameworks (React, etc.)
- Ability to create custom rule templates
- Interactive CLI interface
# Install directly
brew install fireharp/tap/cursor-rules
# Or, tap first and then install
brew tap fireharp/tap
brew install cursor-rules
go install github.com/fireharp/cursor-rules/cmd/cursor-rules@latest
This project uses Task as a task runner. First, install Task.
Then you can run:
# Build the binary
task build
# Run the application
task run
# Run tests
task test
# Install the binary
task install
# Clean build artifacts
task clean
git clone https://github.com/fireharp/cursor-rules.git
cd cursor-rules
go build -o cursor-rules ./cmd/cursor-rules
Navigate to your project directory and run:
cursor-rules
The tool will:
- Create a
.cursor/rules
directory if it doesn't exist - Check for any existing templates
- Show available template categories
- Prompt you to select language templates
- Prompt you to select framework templates
- Offer to create a general rules template
- Offer to create custom templates
Templates tailored for specific programming languages, including:
- Python
- Go
- (more coming soon)
Templates tailored for specific frameworks, including:
- React
- (more coming soon)
A general template with common coding rules that apply to most projects.
You can create your own templates with custom rules that fit your specific needs.
- Clone the repository
- Make your changes
- Run tests with
task test
- Build and test locally with
task run
To add more templates:
- Fork the repository
- Add your templates to the
pkg/templates/templates.go
file - Make sure tests pass with
task test
- Submit a pull request
MIT License