cursor-rules-cli
A CLI for boostrapping Cursor AI rules in your project
Install / Use
npx skills add gabimoncha/cursor-rules-cliInstalls into whichever agent you are using.
.cursorrules
Cursor IDE rules (legacy)
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Skill content
View source on GitHubCursor Rules CLI
Made with ❤️ in Cursor IDE, dogfooding
cursor-rules
A command-line tool for managing AI-assisted guidance in your projects through Cursor IDE rules.
<img src="https://github.com/user-attachments/assets/7ace785a-fb5f-4537-963c-68eea490def1" width="80%" height="80%"/>What are Cursor Rules?
Cursor rules are markdown files with structured metadata that provide AI with instructions on how to interact with your codebase. These rules enhance the AI's understanding of:
- Project structure and organization
- Coding conventions and patterns
- Task management approaches
- Best practices specific to your codebase
Features
- 🚀 Rule Installation: Easily add Cursor rules to any project
- 📋 Template Rules: Includes default rule templates for common use cases
- 💬 Interactive Setup: Guided setup process using command-line prompts
- 🔍 Security Scan: Detect and fix vulnerable rule files with
scancommand - ⌨️ Shell Autocompletion: One-command tab-completion powered by
tabtab - 📊 Repomix Integration: Packs repository in a single file for AI analysis
- 📁 Project Structure: Creates standardized rule organization
Installation
# Global install
bun add -g @gabimoncha/cursor-rules
# Project install
bun add -d @gabimoncha/cursor-rules
# (works with npm, pnpm & yarn too)
Usage
cursor-rules -v # show version
cursor-rules -h # show help
# start the setup process
cursor-rules init [options]
Options:
-f, --force # overwrites already existing rules if filenames match
-r, --repomix # packs entire repository in a single file for AI analysis
-o, --overwrite # overwrite existing rules
# packs entire repository in a single file for AI analysis
cursor-rules repomix
# scan and check all files in the specified path
cursor-rules scan [options]
Options:
-p, --path <path> # path to scan (default: ".")
-f, --filter <filter> # filter allowing only directories and files that contain the string (similar to node test)
-P, --pattern <pattern> # regex pattern to apply to the scanned files (default: "\.cursorrules|.*\.mdc")
-s, --sanitize # (recommended) sanitize the files that are vulnerable
# list all rules
cursor-rules list
# setup shell completion
cursor-rules completion --install
Options:
-i, --install # install tab autocompletion
-u, --uninstall # uninstall tab autocompletion
Default Rule Templates
The CLI provides three default templates:
- cursor-rules.md: Guidelines for adding and organizing AI rules
- task-list.md: Framework for tracking project progress with task lists
- project-structure.md: Template for documenting project structure
- use-bun-instead-of-node.md: Use Bun instead of Node.js, npm, pnpm, or vite
Awesome Rules Templates
The CLI also provides rules from awesome-cursorrules repository
How Cursor Rules Work
- Cursor IDE detects rules in
.cursor/rulesdirectory or project root - AI assistant reads these rules to understand project context
- When requesting assistance, AI follows guidelines in your rules
- Results in more contextually appropriate and project-aware responses
Documentation
For more detailed documentation, visit:
Development
# Clone the repository
git clone https://github.com/gabimoncha/cursor-rules-cli.git
cd cursor-rules-cli
# Install dependencies
bun install
# Run the CLI locally
bun --cwd cli prepare
bun --cwd cli prompt
License
MIT
Acknowledgements
- Idea inspired by Elie Steinbock OSS Cursor rules announcement
- Codebase inspired from and using repomix
Related Skills
career-ops
72.4kOpen-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)
ai-job-search
43.6kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.6kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
guizang-ppt-skill
26.7kAI-agent Skill for generating polished HTML slide decks: editorial magazine and Swiss layouts, image prompts, social covers, and a WebGL/low-power presentation runtime.
