@quanvo99/ai-rules
v0.1.5
Published
CLI tool for managing AI agent rules across projects
Maintainers
Readme
AI Rules CLI
A command-line tool that helps developers pull curated AI agent rules from a centralized repository into their projects. No more hunting through scattered rule files - get the exact rules you need for your tech stack with a simple command.
Quick Start
# Interactive mode - walk through prompts
npx @quanvo99/ai-rules init
# Non-interactive mode - specify options directly
npx @quanvo99/ai-rules init --agent cursor --categories typescript,react-hooks --overwrite-strategy force🌐 Interactive Rule Selection
Prefer a visual interface? Use our web UI to browse, search, and select rules interactively:
👉 Open Rule Selector at https://ai-rules-setup.vercel.app/
The web interface allows you to:
- Browse all available rules with descriptions and tags
- Search rules using keywords
- Select multiple rules interactively
- Generate a non-interactive CLI command with your selections
- Copy and paste the command to install rules instantly
Example generated command:
npx @quanvo99/ai-rules init --agent cursor --categories typescript-conventions,react-hooks --overwrite-strategy forceWhat is AI Rules CLI?
AI Rules CLI solves the problem of scattered, hard-to-find AI agent rule files across different projects. Instead of manually copying rules from various sources, you can:
- Discover rules by browsing categories and tags
- Install only the rules you need for your specific project
- Choose between interactive CLI prompts or web-based selection
Supported AI Agents
- Cursor -
.cursor/rules/directory with.cursorrulesfiles - More coming soon - Windsurf, Aider, Continue, Cody, and others
Key Features
🎯 Interactive or Command-Line Driven
Choose your preferred workflow:
- Interactive CLI - Guided prompts for agent and category selection
- Non-Interactive CLI - Direct command with all options specified
- Web UI - Visual interface at https://ai-rules-setup.vercel.app/
📦 Multiple AI Agent Support
Works with:
- Cursor -
.cursor/rules/directory - More agents coming soon
⚙️ Flexible Conflict Resolution
Handle existing files your way:
prompt- Ask for each conflict (default)force- Overwrite all existing filesskip- Keep existing files, skip new ones
How It Works
- Choose Your Interface - Use the CLI in interactive mode or the web UI at https://ai-rules-setup.vercel.app/
- Select Agent - Choose your AI agent (Cursor, Windsurf, etc.)
- Pick Categories - Select rule categories that match your tech stack
- Handle Conflicts - Decide how to handle existing files (prompt, force, or skip)
- Install - Rules are automatically placed in the correct locations
Project Structure
your-project/
├── .cursor/
│ └── rules/
│ ├── typescript-strict.md
│ ├── react-server-components.md
│ └── tailwind-best-practices.md
├── .ai-rules.json # Configuration file
└── package.jsonExample Rule Categories
Languages
- TypeScript - Strict typing, best practices, advanced patterns
- JavaScript - Modern ES6+, async patterns, error handling
Frameworks
- React - Hooks, server components, performance optimization
- Next.js - App Router, Pages Router, SSR/SSG patterns
- Vue - Composition API, Nuxt.js patterns
Styling
- Tailwind CSS - Utility-first, component patterns, responsive design
- CSS Modules - Scoped styling, naming conventions
- Styled Components - CSS-in-JS patterns, theming
Database
- Prisma - Schema design, query optimization, migrations
- MongoDB - Document modeling, aggregation pipelines
- PostgreSQL - Query patterns, indexing strategies
Testing
- Jest - Unit testing, mocking, test organization
- Playwright - E2E testing, page object patterns
- Testing Library - Component testing, accessibility
Configuration
The CLI creates a .ai-rules.json file in your project root:
{
"version": "1.0.0",
"agent": "cursor",
"categories": ["typescript-conventions", "react-hooks", "meta-rules"]
}Commands
npx @quanvo99/ai-rules init
Initialize AI rules for your project. Can be used in interactive or non-interactive mode.
Interactive Mode:
npx @quanvo99/ai-rules initWalks you through:
- AI agent selection (cursor, windsurf, etc.)
- Category selection with descriptions and tags
- File conflict resolution
Non-Interactive Mode:
npx @quanvo99/ai-rules init [options]Options:
--agent <name>- Specify the AI agent (cursor, windsurf, etc.)--categories <list>- Comma-separated category IDs (use "all" for all categories)--overwrite-strategy <strategy>- Conflict resolution:prompt(default),force, orskip
Examples:
# Install specific categories for Cursor
npx @quanvo99/ai-rules init --agent cursor --categories typescript-conventions,react-hooks
# Install all categories with force overwrite
npx @quanvo99/ai-rules init --agent cursor --categories all --overwrite-strategy force
# Skip existing files
npx @quanvo99/ai-rules init --agent cursor --categories meta-rules --overwrite-strategy skipLicense
MIT License - see LICENSE for details.
Support
Made with ❤️ for the developer community
