@bonesofspring/ai-rules 0.1.2 → 0.1.31
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.
- package/README.md +32 -0
- package/bin/cli.js +6 -0
- package/package.json +2 -1
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @bonesofspring/ai-rules
|
|
2
|
+
|
|
3
|
+
Presets for Cursor and Claude Code: rules, commands, plus for Claude `CLAUDE.md` and `skills` / `agents` / `hooks` when the preset includes them. Install from npm into a project so you don’t have to copy files out of the repo by hand.
|
|
4
|
+
|
|
5
|
+
Node 18+.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# from the project root
|
|
9
|
+
npx @bonesofspring/ai-rules init cursor --preset next
|
|
10
|
+
npx @bonesofspring/ai-rules init claude --preset next
|
|
11
|
+
npx @bonesofspring/ai-rules clean cursor
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Global: `npm i -g @bonesofspring/ai-rules`, then `ai-rules ...`.
|
|
15
|
+
|
|
16
|
+
`init` merges into the current directory: dirs are created, matching files are **overwritten**. `--preset` and the subcommand can be in either order, e.g. `--preset=next init cursor`.
|
|
17
|
+
|
|
18
|
+
`clean cursor` / `clean claude` removes what this CLI installs: for Cursor, the entire `.cursor` directory; for Claude, `.claude/rules`, `.claude/commands`, `skills`, `agents`, `hooks`, and `CLAUDE.md` when present. Anything else under `.claude` is left alone.
|
|
19
|
+
|
|
20
|
+
Where things go on `init`:
|
|
21
|
+
|
|
22
|
+
| | Cursor | Claude |
|
|
23
|
+
|---|--------|--------|
|
|
24
|
+
| rules | `.cursor/rules` | `.claude/rules` |
|
|
25
|
+
| commands | `.cursor/commands` | `.claude/commands` |
|
|
26
|
+
| other | — | root `CLAUDE.md` → `.claude/CLAUDE.md`; folders `skills`, `agents`, `hooks` → under `.claude/` with the same names |
|
|
27
|
+
|
|
28
|
+
The package currently ships the **`next`** preset (Next.js stack and whatever else is bundled there). Other preset names: see `presets/` in the [repo](https://github.com/bonesofspring/ai-rules). Name is a single path segment, no `/` or `..`.
|
|
29
|
+
|
|
30
|
+
Help: `ai-rules --help`.
|
|
31
|
+
|
|
32
|
+
MIT.
|
package/bin/cli.js
CHANGED
|
@@ -36,6 +36,7 @@ Usage:
|
|
|
36
36
|
|
|
37
37
|
Notes:
|
|
38
38
|
init merges into existing target folders; same-named files are overwritten.
|
|
39
|
+
clean cursor removes the entire .cursor directory (if present).
|
|
39
40
|
Flags may appear before or after the subcommand (e.g. --preset next init cursor).
|
|
40
41
|
|
|
41
42
|
Examples:
|
|
@@ -217,6 +218,11 @@ function cmdClean(tool) {
|
|
|
217
218
|
process.exit(1);
|
|
218
219
|
}
|
|
219
220
|
const cwd = process.cwd();
|
|
221
|
+
if (tool === 'cursor') {
|
|
222
|
+
removeDirIfExists(path.join(cwd, '.cursor'));
|
|
223
|
+
console.log('Removed .cursor (if present)');
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
220
226
|
removeDirIfExists(path.join(cwd, cfg.rulesDir));
|
|
221
227
|
removeDirIfExists(path.join(cwd, cfg.commandsDir));
|
|
222
228
|
if (tool === 'claude' && cfg.optionalClaudeDirs) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonesofspring/ai-rules",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
4
4
|
"description": "Presets of Cursor and Claude rules/commands for Revy Ross personal use",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Revy Ross",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"ai-rules": "./bin/cli.js"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
|
+
"README.md",
|
|
22
23
|
"bin",
|
|
23
24
|
"presets"
|
|
24
25
|
],
|