@quanvo99/ai-rules 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +67 -105
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,72 +5,78 @@ A command-line tool that helps developers pull curated AI agent rules from a cen
5
5
  ## Quick Start
6
6
 
7
7
  ```bash
8
- # Initialize rules for your project (no installation needed!)
8
+ # Interactive mode - walk through prompts
9
9
  npx @quanvo99/ai-rules init
10
10
 
11
- # Add specific rule categories
12
- npx @quanvo99/ai-rules add typescript react
11
+ # Non-interactive mode - specify options directly
12
+ npx @quanvo99/ai-rules init --agent cursor --categories typescript,react-hooks --overwrite-strategy force
13
+ ```
14
+
15
+ ## 🌐 Interactive Rule Selection
16
+
17
+ **Prefer a visual interface?** Use our web UI to browse, search, and select rules interactively:
18
+
19
+ 👉 **[Open Rule Selector at https://ai-rules-setup.vercel.app/](https://ai-rules-setup.vercel.app/)**
20
+
21
+ The web interface allows you to:
13
22
 
14
- # Update to latest rules
15
- npx @quanvo99/ai-rules update
23
+ - Browse all available rules with descriptions and tags
24
+ - Search rules using keywords
25
+ - Select multiple rules interactively
26
+ - Generate a non-interactive CLI command with your selections
27
+ - Copy and paste the command to install rules instantly
28
+
29
+ Example generated command:
30
+
31
+ ```bash
32
+ npx @quanvo99/ai-rules init --agent cursor --categories typescript-conventions,react-hooks --overwrite-strategy force
16
33
  ```
17
34
 
18
35
  ## What is AI Rules CLI?
19
36
 
20
37
  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:
21
38
 
22
- - **Discover** rules by tech stack using natural language search
39
+ - **Discover** rules by browsing categories and tags
23
40
  - **Install** only the rules you need for your specific project
24
- - **Update** to the latest rule versions with a single command
25
- - **Refine** your selection through intelligent questioning
41
+ - **Choose** between interactive CLI prompts or web-based selection
26
42
 
27
43
  ## Supported AI Agents
28
44
 
29
45
  - **Cursor** - `.cursor/rules/` directory with `.cursorrules` files
30
- - **Windsurf** - `.windsurf/rules/` directory with `.windsurfrules` files
31
- - **More coming soon** - Aider, Continue, Cody, and others
46
+ - **More coming soon** - Windsurf, Aider, Continue, Cody, and others
32
47
 
33
48
  ## Key Features
34
49
 
35
- ### 🎯 Smart Rule Discovery
36
-
37
- Use natural language to find relevant rules:
38
-
39
- ```bash
40
- npx @quanvo99/ai-rules search "nextjs 15 server components tailwind"
41
- ```
50
+ ### 🎯 Interactive or Command-Line Driven
42
51
 
43
- ### 🔍 Interactive Refinement
52
+ Choose your preferred workflow:
44
53
 
45
- Get personalized recommendations through guided questions:
54
+ - **Interactive CLI** - Guided prompts for agent and category selection
55
+ - **Non-Interactive CLI** - Direct command with all options specified
56
+ - **Web UI** - Visual interface at https://ai-rules-setup.vercel.app/
46
57
 
47
- - "Are you using App Router or Pages Router?"
48
- - "What's your primary data fetching strategy?"
49
- - "Do you prefer Tailwind or styled-components?"
58
+ ### 📦 Multiple AI Agent Support
50
59
 
51
- ### 📦 Easy Management
60
+ Works with:
52
61
 
53
- ```bash
54
- # See what's installed
55
- npx @quanvo99/ai-rules status
62
+ - **Cursor** - `.cursor/rules/` directory
63
+ - More agents coming soon
56
64
 
57
- # Add more rules
58
- npx @quanvo99/ai-rules add nextjs database
65
+ ### ⚙️ Flexible Conflict Resolution
59
66
 
60
- # Remove unused rules
61
- npx @quanvo99/ai-rules remove old-framework
67
+ Handle existing files your way:
62
68
 
63
- # Update everything
64
- npx @quanvo99/ai-rules update
65
- ```
69
+ - `prompt` - Ask for each conflict (default)
70
+ - `force` - Overwrite all existing files
71
+ - `skip` - Keep existing files, skip new ones
66
72
 
67
73
  ## How It Works
68
74
 
69
- 1. **Initialize** - Choose your AI agent and tech stack
70
- 2. **Discover** - Search for relevant rules using natural language
71
- 3. **Refine** - Answer questions to get personalized recommendations
72
- 4. **Install** - Rules are automatically placed in the correct locations
73
- 5. **Update** - Keep your rules current with the latest versions
75
+ 1. **Choose Your Interface** - Use the CLI in interactive mode or the web UI at https://ai-rules-setup.vercel.app/
76
+ 2. **Select Agent** - Choose your AI agent (Cursor, Windsurf, etc.)
77
+ 3. **Pick Categories** - Select rule categories that match your tech stack
78
+ 4. **Handle Conflicts** - Decide how to handle existing files (prompt, force, or skip)
79
+ 5. **Install** - Rules are automatically placed in the correct locations
74
80
 
75
81
  ## Project Structure
76
82
 
@@ -85,7 +91,7 @@ your-project/
85
91
  └── package.json
86
92
  ```
87
93
 
88
- ## Available Rule Categories
94
+ ## Example Rule Categories
89
95
 
90
96
  ### Languages
91
97
 
@@ -122,19 +128,9 @@ The CLI creates a `.ai-rules.json` file in your project root:
122
128
 
123
129
  ```json
124
130
  {
131
+ "version": "1.0.0",
125
132
  "agent": "cursor",
126
- "rules": [
127
- {
128
- "id": "typescript-strict",
129
- "category": "typescript",
130
- "installedAt": "2024-01-15T10:30:00Z",
131
- "source": "github.com/votrungquan1999/AI-rules-setup"
132
- }
133
- ],
134
- "preferences": {
135
- "autoUpdate": false,
136
- "conflictResolution": "prompt"
137
- }
133
+ "categories": ["typescript-conventions", "react-hooks", "meta-rules"]
138
134
  }
139
135
  ```
140
136
 
@@ -142,77 +138,43 @@ The CLI creates a `.ai-rules.json` file in your project root:
142
138
 
143
139
  ### `npx @quanvo99/ai-rules init`
144
140
 
145
- Interactive setup wizard that guides you through:
146
-
147
- - AI agent selection
148
- - Tech stack identification
149
- - Rule discovery and selection
150
- - Installation configuration
141
+ Initialize AI rules for your project. Can be used in interactive or non-interactive mode.
151
142
 
152
- ### `npx @quanvo99/ai-rules add <categories...>`
153
-
154
- Add specific rule categories to your project:
143
+ **Interactive Mode:**
155
144
 
156
145
  ```bash
157
- npx @quanvo99/ai-rules add typescript react nextjs
158
- ```
159
-
160
- ### `npx @quanvo99/ai-rules remove <categories...>`
161
-
162
- Remove rule categories from your project:
163
-
164
- ```bash
165
- npx @quanvo99/ai-rules remove old-framework
146
+ npx @quanvo99/ai-rules init
166
147
  ```
167
148
 
168
- ### `npx @quanvo99/ai-rules update`
169
-
170
- Update all installed rules to their latest versions:
171
-
172
- ```bash
173
- npx @quanvo99/ai-rules update
174
- ```
149
+ Walks you through:
175
150
 
176
- ### `npx @quanvo99/ai-rules list [--filter <tag>]`
151
+ - AI agent selection (cursor, windsurf, etc.)
152
+ - Category selection with descriptions and tags
153
+ - File conflict resolution
177
154
 
178
- List available rule categories with optional filtering:
155
+ **Non-Interactive Mode:**
179
156
 
180
157
  ```bash
181
- npx @quanvo99/ai-rules list --filter frontend
158
+ npx @quanvo99/ai-rules init [options]
182
159
  ```
183
160
 
184
- ### `npx @quanvo99/ai-rules status`
185
-
186
- Show currently installed rules and their status:
187
-
188
- ```bash
189
- npx @quanvo99/ai-rules status
190
- ```
161
+ **Options:**
191
162
 
192
- ### `npx @quanvo99/ai-rules search "<query>"`
163
+ - `--agent <name>` - Specify the AI agent (cursor, windsurf, etc.)
164
+ - `--categories <list>` - Comma-separated category IDs (use "all" for all categories)
165
+ - `--overwrite-strategy <strategy>` - Conflict resolution: `prompt` (default), `force`, or `skip`
193
166
 
194
- Search for rules using natural language:
167
+ **Examples:**
195
168
 
196
169
  ```bash
197
- npx @quanvo99/ai-rules search "nextjs 15 server components with tailwind"
198
- ```
199
-
200
- ### `npx @quanvo99/ai-rules refine`
201
-
202
- Re-run the refinement process for better rule selection:
170
+ # Install specific categories for Cursor
171
+ npx @quanvo99/ai-rules init --agent cursor --categories typescript-conventions,react-hooks
203
172
 
204
- ```bash
205
- npx @quanvo99/ai-rules refine
206
- ```
173
+ # Install all categories with force overwrite
174
+ npx @quanvo99/ai-rules init --agent cursor --categories all --overwrite-strategy force
207
175
 
208
- ## Environment Variables
209
-
210
- You can configure the API endpoint if needed:
211
-
212
- ```bash
213
- # Set custom API URL (optional)
214
- export AI_RULES_API_URL=https://your-api-domain.com
215
- npx @quanvo99/ai-rules init
176
+ # Skip existing files
177
+ npx @quanvo99/ai-rules init --agent cursor --categories meta-rules --overwrite-strategy skip
216
178
  ```
217
179
 
218
180
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quanvo99/ai-rules",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "CLI tool for managing AI agent rules across projects",
5
5
  "main": "dist/index.js",
6
6
  "bin": {