Skip to content

Commit 867edb1

Browse files
committed
fix: fixed issue #2 about readme
1 parent e1cc263 commit 867edb1

File tree

1 file changed

+41
-30
lines changed

1 file changed

+41
-30
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# @weorbitant/cursor-rules
1+
# @orbitant/cursor-rules
22

3-
A Node.js package for generating and managing Cursor IDE rules from templates. This package allows you to easily copy predefined Cursor rules to your project's `.cursor/rules` directory.
3+
A Node.js package for generating and managing Cursor IDE rules and commands from templates. This package allows you to easily copy predefined Cursor rules to your project's `.cursor/rules` directory and commands to your `.cursor/commands` directory.
44

55
## πŸš€ Features
66

77
- **Template-based Rule Generation**: Copy Cursor rules from predefined templates
8-
- **Selective File Management**: Only manages files from this package, preserving user's custom rules
8+
- **Template-based Command Generation**: Copy Cursor commands from predefined templates
9+
- **Selective File Management**: Only manages files from this package, preserving user's custom rules and commands
910
- **CLI Interface**: Easy-to-use command-line interface
1011
- **Safe Operations**: Non-destructive clean operations that preserve user files
1112
- **Smart Directory Management**: Automatically handles directory creation and cleanup
@@ -15,41 +16,41 @@ A Node.js package for generating and managing Cursor IDE rules from templates. T
1516
Install as a dev dependency in your project:
1617

1718
```bash
18-
npm install --save-dev @weorbitant/cursor-rules
19+
npm install --save-dev @orbitant/cursor-rules
1920
```
2021

2122
## 🎯 Usage
2223

2324
### Available Commands
2425

25-
#### Copy Rules
26-
Copy all rule templates to your project's `.cursor/rules` directory:
26+
#### Apply Rules and Commands
27+
Apply all rule and command templates to your project's `.cursor/` directory:
2728

2829
```bash
29-
npx @weorbitant/cursor-rules copy
30+
npx @orbitant/cursor-rules apply
3031
```
3132

3233
#### List Templates
3334
View all available rule templates:
3435

3536
```bash
36-
npx @weorbitant/cursor-rules list
37+
npx @orbitant/cursor-rules list
3738
```
3839

39-
#### Clean Rules
40-
Remove only the rules that were copied from this package (preserves user's custom rules):
40+
#### Clean Rules and Commands
41+
Remove only the rules and commands that were copied from this package (preserves user's custom files):
4142

4243
```bash
43-
npx @weorbitant/cursor-rules copy
44+
npx @orbitant/cursor-rules clean
4445
```
4546

4647
#### Show Help
4748
Display available commands and usage information:
4849

4950
```bash
50-
npx @weorbitant/cursor-rules
51+
npx @orbitant/cursor-rules
5152
# or
52-
npx @weorbitant/cursor-rules --help
53+
npx @orbitant/cursor-rules --help
5354
```
5455

5556
### Package.json Scripts
@@ -59,9 +60,9 @@ Add to your `package.json` for easy access:
5960
```json
6061
{
6162
"scripts": {
62-
"cursor:rules": "npx @weorbitant/cursor-rules copy",
63-
"cursor:rules:list": "npx @weorbitant/cursor-rules list",
64-
"cursor:rules:clean": "npx @weorbitant/cursor-rules clean"
63+
"cursor:rules": "npx @orbitant/cursor-rules apply",
64+
"cursor:rules:list": "npx @orbitant/cursor-rules list",
65+
"cursor:rules:clean": "npx @orbitant/cursor-rules clean"
6566
}
6667
}
6768
```
@@ -73,17 +74,21 @@ npm run cursor:rules
7374

7475
## πŸ“ Available Templates
7576

76-
This package includes the following Cursor rule templates:
77+
This package includes the following Cursor rule and command templates:
7778

79+
### Rules (.cursor/rules/)
7880
1. **readme-async-messaging.mdc** - Auto-update README with async messaging architecture
7981
2. **readme-config.mdc** - Auto-update README with configuration section
80-
3. **readme-content.mdc** - Auto-update README with content management rules
81-
4. **readme-data-model.mdc** - Auto-update README with data model documentation
82+
3. **readme-data-model.mdc** - Auto-update README with data model documentation
83+
4. **readme-summary.mdc** - Auto-update README with summary section
84+
85+
### Commands (.cursor/commands/)
86+
1. **update-docs.md** - Command to update project documentation
8287

8388
## πŸ”§ How It Works
8489

85-
1. **Template Discovery**: Scans the `templates/rules/` directory for `.mdc` files
86-
2. **Destination Management**: Creates `.cursor/rules/` directory if it doesn't exist
90+
1. **Template Discovery**: Scans the `templates/rules/` directory for `.mdc` files and `templates/commands/` directory for `.md` files
91+
2. **Destination Management**: Creates `.cursor/rules/` and `.cursor/commands/` directories if they don't exist
8792
3. **File Copying**: Copies each template file, preserving directory structure
8893
4. **Safe Cleanup**: Only removes files that were originally copied from this package
8994

@@ -96,50 +101,56 @@ This package includes the following Cursor rule templates:
96101

97102
## πŸ“‹ Example Output
98103

99-
### Copy Command
104+
### Apply Command
100105
```
101106
πŸš€ WeOrbitant Cursor Rules Generator
102107
================================
103108
βœ… Created directory: .cursor/rules
104-
πŸ“ Found 4 template files:
109+
βœ… Created directory: .cursor/commands
110+
πŸ“ Found 4 rule template files:
105111
βœ… Copied: readme-data-model.mdc
106-
βœ… Copied: readme-content.mdc
112+
βœ… Copied: readme-summary.mdc
107113
βœ… Copied: readme-config.mdc
108114
βœ… Copied: readme-async-messaging.mdc
115+
πŸ“ Found 1 command template files:
116+
βœ… Copied: update-docs.md
109117
110118
πŸŽ‰ Successfully copied 4 rule files to .cursor/rules/
111-
You can now use these rules in your Cursor IDE!
119+
πŸŽ‰ Successfully copied 1 command file to .cursor/commands/
120+
You can now use these rules and commands in your Cursor IDE!
112121
```
113122

114123
### Clean Command
115124
```
116125
🧹 Cleaning WeOrbitant Cursor Rules
117126
================================
118127
βœ… Removed: readme-data-model.mdc
119-
βœ… Removed: readme-content.mdc
128+
βœ… Removed: readme-summary.mdc
120129
βœ… Removed: readme-config.mdc
121130
βœ… Removed: readme-async-messaging.mdc
131+
βœ… Removed: update-docs.md
122132
πŸ“ Directory .cursor/rules kept (contains other files)
133+
πŸ“ Directory .cursor/commands kept (contains other files)
123134
124135
πŸŽ‰ Cleanup complete!
125-
β€’ Removed: 4 files
136+
β€’ Removed: 5 files
126137
β€’ Not found: 0 files
127138
```
128139

129140
## πŸ”— Integration
130141

131142
### With Cursor IDE
132143

133-
After running the copy command, your Cursor IDE will automatically detect the rules in `.cursor/rules/` and apply them to your project.
144+
After running the apply command, your Cursor IDE will automatically detect the rules in `.cursor/rules/` and commands in `.cursor/commands/`, making them available for use in your project.
134145

135146
### With CI/CD
136147

137-
Add to your CI/CD pipeline to ensure consistent rules across environments:
148+
Add to your CI/CD pipeline to ensure consistent rules and commands across environments:
138149

139150
```yaml
140151
# GitHub Actions example
141152
- name: Setup Cursor Rules
142-
run: npx @weorbitant/cursor-rules copy
153+
run: npx @orbitant/cursor-rules apply
143154
```
144155
145156
## πŸ§ͺ Testing

0 commit comments

Comments
Β (0)