rulesync 3.23.6 → 3.25.0
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 +89 -33
- package/dist/index.cjs +1923 -485
- package/dist/index.js +1923 -485
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="images/logo.jpg" alt="Rulesync Logo" width="600">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# Rulesync
|
|
2
6
|
|
|
3
7
|
[](https://github.com/dyoshikawa/rulesync/actions/workflows/ci.yml)
|
|
@@ -7,7 +11,7 @@
|
|
|
7
11
|
[](https://github.com/hesreallyhim/awesome-claude-code)
|
|
8
12
|
[](https://github.com/Piebald-AI/awesome-gemini-cli)
|
|
9
13
|
|
|
10
|
-
A Node.js CLI tool that automatically generates configuration files for various AI development tools from unified AI rule files. Features selective generation, comprehensive import/export capabilities, and supports major AI development tools with rules, commands, MCP, ignore files,
|
|
14
|
+
A Node.js CLI tool that automatically generates configuration files for various AI development tools from unified AI rule files. Features selective generation, comprehensive import/export capabilities, and supports major AI development tools with rules, commands, MCP, ignore files, subagents and skills.
|
|
11
15
|
|
|
12
16
|
> [!NOTE]
|
|
13
17
|
> If you are interested in Rulesync latest news, please follow the maintainer's X(Twitter) account:
|
|
@@ -130,28 +134,28 @@ npx rulesync generate --targets "*" --features "*"
|
|
|
130
134
|
|
|
131
135
|
Rulesync supports both **generation** and **import** for All of the major AI coding tools:
|
|
132
136
|
|
|
133
|
-
| Tool | rules | ignore | mcp | commands | subagents |
|
|
134
|
-
|
|
135
|
-
| AGENTS.md | ✅ | | | 🎮 | 🎮 |
|
|
136
|
-
| Claude Code | ✅ 🌏 | ✅ | ✅ 🌏 📦 | ✅ 🌏 | ✅ 🌏 |
|
|
137
|
-
| Codex CLI | ✅ 🌏 | | 🌏 | 🌏 | 🎮 |
|
|
138
|
-
| Gemini CLI | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | 🎮 |
|
|
139
|
-
| GitHub Copilot | ✅ | | ✅ | ✅ | 🎮 |
|
|
140
|
-
| Cursor | ✅ | ✅ | ✅ | ✅ 🌏 | 🎮 |
|
|
141
|
-
| OpenCode | ✅ | | | | |
|
|
142
|
-
| Cline | ✅ | ✅ | ✅ | | |
|
|
143
|
-
| Roo Code | ✅ | ✅ | ✅ | ✅ | 🎮 |
|
|
144
|
-
| Qwen Code | ✅ | ✅ | | | |
|
|
145
|
-
| Kiro IDE | ✅ | ✅ | | | |
|
|
146
|
-
| Amazon Q Developer CLI | ✅ | | ✅ | | |
|
|
147
|
-
| JetBrains Junie | ✅ | ✅ | | | |
|
|
148
|
-
| AugmentCode | ✅ | ✅ | | | |
|
|
149
|
-
| Windsurf | ✅ | ✅ | | | |
|
|
150
|
-
| Warp | ✅ | | | | |
|
|
137
|
+
| Tool | rules | ignore | mcp | commands | subagents | skills |
|
|
138
|
+
|------------------------|:-----:|:------:|:-----:|:--------:|:---------:|:------:|
|
|
139
|
+
| AGENTS.md | ✅ | | | 🎮 | 🎮 | 🎮 |
|
|
140
|
+
| Claude Code | ✅ 🌏 | ✅ | ✅ 🌏 📦 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 |
|
|
141
|
+
| Codex CLI | ✅ 🌏 | | 🌏 | 🌏 | 🎮 | 🎮 |
|
|
142
|
+
| Gemini CLI | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | 🎮 | 🎮 |
|
|
143
|
+
| GitHub Copilot | ✅ | | ✅ | ✅ | 🎮 | 🎮 |
|
|
144
|
+
| Cursor | ✅ | ✅ | ✅ | ✅ 🌏 | 🎮 | 🎮 |
|
|
145
|
+
| OpenCode | ✅ | | | | | |
|
|
146
|
+
| Cline | ✅ | ✅ | ✅ | | | |
|
|
147
|
+
| Roo Code | ✅ | ✅ | ✅ | ✅ | 🎮 | |
|
|
148
|
+
| Qwen Code | ✅ | ✅ | | | | |
|
|
149
|
+
| Kiro IDE | ✅ | ✅ | | | | |
|
|
150
|
+
| Amazon Q Developer CLI | ✅ | | ✅ | | | |
|
|
151
|
+
| JetBrains Junie | ✅ | ✅ | | | | |
|
|
152
|
+
| AugmentCode | ✅ | ✅ | | | | |
|
|
153
|
+
| Windsurf | ✅ | ✅ | | | | |
|
|
154
|
+
| Warp | ✅ | | | | | |
|
|
151
155
|
|
|
152
156
|
* ✅: Supports project mode
|
|
153
157
|
* 🌏: Supports global mode
|
|
154
|
-
* 🎮: Supports simulated commands/subagents (Project mode only)
|
|
158
|
+
* 🎮: Supports simulated commands/subagents/skills (Project mode only)
|
|
155
159
|
* 📦: Supports modular MCP (Experimental)
|
|
156
160
|
|
|
157
161
|
## Why Rulesync?
|
|
@@ -184,7 +188,7 @@ Simulated commands and subagents allow you to generate simulated commands and su
|
|
|
184
188
|
npx rulesync init
|
|
185
189
|
|
|
186
190
|
# Import existing configurations (to .rulesync/rules/ by default)
|
|
187
|
-
npx rulesync import --targets claudecode --features rules,ignore,mcp,commands,subagents
|
|
191
|
+
npx rulesync import --targets claudecode --features rules,ignore,mcp,commands,subagents,skills
|
|
188
192
|
|
|
189
193
|
# Generate all features for all tools (new preferred syntax)
|
|
190
194
|
npx rulesync generate --targets "*" --features "*"
|
|
@@ -231,8 +235,9 @@ Example:
|
|
|
231
235
|
|
|
232
236
|
// Advanced options
|
|
233
237
|
"global": false, // Generate for global(user scope) configuration files
|
|
234
|
-
"
|
|
235
|
-
"
|
|
238
|
+
"simulateCommands": false, // Generate simulated commands
|
|
239
|
+
"simulateSubagents": false, // Generate simulated subagents
|
|
240
|
+
"simulateSkills": false, // Generate simulated skills
|
|
236
241
|
"modularMcp": false // Enable modular-mcp for context compression (experimental, Claude Code only)
|
|
237
242
|
|
|
238
243
|
// Deprecated experimental options (for backward compatibility)
|
|
@@ -254,13 +259,13 @@ root: true # true that is less than or equal to one file for overview such as `A
|
|
|
254
259
|
targets: ["*"] # * = all, or specific tools
|
|
255
260
|
description: "Rulesync project overview and development guidelines for unified AI rules management CLI tool"
|
|
256
261
|
globs: ["**/*"] # file patterns to match (e.g., ["*.md", "*.txt"])
|
|
257
|
-
agentsmd: # agentsmd and codexcli specific
|
|
262
|
+
agentsmd: # agentsmd and codexcli specific parameters
|
|
258
263
|
# Support for using nested AGENTS.md files for subprojects in a large monorepo.
|
|
259
264
|
# This option is available only if root is false.
|
|
260
265
|
# If subprojectPath is provided, the file is located in `${subprojectPath}/AGENTS.md`.
|
|
261
266
|
# If subprojectPath is not provided and root is false, the file is located in `.agents/memories/*.md`.
|
|
262
267
|
subprojectPath: "path/to/subproject"
|
|
263
|
-
cursor: # cursor specific
|
|
268
|
+
cursor: # cursor specific parameters
|
|
264
269
|
alwaysApply: true
|
|
265
270
|
description: "Rulesync project overview and development guidelines for unified AI rules management CLI tool"
|
|
266
271
|
globs: ["*"]
|
|
@@ -304,7 +309,7 @@ description: >- # subagent description
|
|
|
304
309
|
This is the general-purpose planner. The user asks the agent to plan to
|
|
305
310
|
suggest a specification, implement a new feature, refactor the codebase, or
|
|
306
311
|
fix a bug. This agent can be called by the user explicitly only.
|
|
307
|
-
claudecode: # for claudecode-specific
|
|
312
|
+
claudecode: # for claudecode-specific parameters
|
|
308
313
|
model: inherit # opus, sonnet, haiku or inherit
|
|
309
314
|
---
|
|
310
315
|
|
|
@@ -315,6 +320,37 @@ Based on the user's instruction, create a plan while analyzing the related files
|
|
|
315
320
|
Attention, again, you are just the planner, so though you can read any files and run any commands for analysis, please don't write any code.
|
|
316
321
|
```
|
|
317
322
|
|
|
323
|
+
### `.rulesync/skills/*/SKILL.md`
|
|
324
|
+
|
|
325
|
+
Example:
|
|
326
|
+
|
|
327
|
+
```md
|
|
328
|
+
---
|
|
329
|
+
name: example-skill # skill name
|
|
330
|
+
description: >- # skill description
|
|
331
|
+
A sample skill that demonstrates the skill format
|
|
332
|
+
targets: ["*"] # * = all, or specific tools
|
|
333
|
+
claudecode: # for claudecode-specific parameters
|
|
334
|
+
allowed-tools:
|
|
335
|
+
- "Bash"
|
|
336
|
+
- "Read"
|
|
337
|
+
- "Write"
|
|
338
|
+
- "Grep"
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
This is the skill body content.
|
|
342
|
+
|
|
343
|
+
You can provide instructions, context, or any information that helps the AI agent understand and execute this skill effectively.
|
|
344
|
+
|
|
345
|
+
The skill can include:
|
|
346
|
+
- Step-by-step instructions
|
|
347
|
+
- Code examples
|
|
348
|
+
- Best practices
|
|
349
|
+
- Any relevant context
|
|
350
|
+
|
|
351
|
+
Skills are directory-based and can include additional files alongside SKILL.md.
|
|
352
|
+
```
|
|
353
|
+
|
|
318
354
|
### `.rulesync/mcp.json`
|
|
319
355
|
|
|
320
356
|
Example:
|
|
@@ -404,20 +440,21 @@ Currently, supports rules and commands generation for Claude Code. Import for gl
|
|
|
404
440
|
> * `rules/*.md` only supports single file has `root: true`, and frontmatter parameters without `root` are ignored.
|
|
405
441
|
> * Only Claude Code is supported for global mode commands.
|
|
406
442
|
|
|
407
|
-
## Simulate Commands and
|
|
443
|
+
## Simulate Commands, Subagents and Skills
|
|
408
444
|
|
|
409
|
-
Simulated commands and
|
|
445
|
+
Simulated commands, subagents and skills allow you to generate simulated features for copilot, cursor, codexcli and etc. This is useful for shortening your prompts.
|
|
410
446
|
|
|
411
|
-
1. Prepare `.rulesync/commands/*.md` and `.rulesync/
|
|
412
|
-
2. Generate simulated commands and
|
|
447
|
+
1. Prepare `.rulesync/commands/*.md`, `.rulesync/subagents/*.md` and `.rulesync/skills/*/SKILL.md` for your purposes.
|
|
448
|
+
2. Generate simulated commands, subagents and skills for specific tools that are included in copilot, cursor, codexcli and etc.
|
|
413
449
|
```bash
|
|
414
450
|
npx rulesync generate \
|
|
415
451
|
--targets copilot,cursor,codexcli \
|
|
416
|
-
--features commands,subagents \
|
|
452
|
+
--features commands,subagents,skills \
|
|
417
453
|
--simulated-commands \
|
|
418
|
-
--simulated-subagents
|
|
454
|
+
--simulated-subagents \
|
|
455
|
+
--simulated-skills
|
|
419
456
|
```
|
|
420
|
-
3. Use simulated commands and
|
|
457
|
+
3. Use simulated commands, subagents and skills in your prompts.
|
|
421
458
|
- Prompt examples:
|
|
422
459
|
```txt
|
|
423
460
|
# Execute simulated commands. By the way, `s/` stands for `simulate/`.
|
|
@@ -425,6 +462,9 @@ Simulated commands and subagents allow you to generate simulated commands and su
|
|
|
425
462
|
|
|
426
463
|
# Execute simulated subagents
|
|
427
464
|
Call your-subagent to achieve something.
|
|
465
|
+
|
|
466
|
+
# Use simulated skills
|
|
467
|
+
Use the skill your-skill to achieve something.
|
|
428
468
|
```
|
|
429
469
|
|
|
430
470
|
## Modular MCP (Experimental)
|
|
@@ -674,6 +714,22 @@ pnpm cicheck # Run code style check, type check, and tests
|
|
|
674
714
|
# Manual test using current code
|
|
675
715
|
pnpm dev generate -t claudecode -f "*"
|
|
676
716
|
pnpm dev import -t claudecode -f "*"
|
|
717
|
+
|
|
718
|
+
# Once you create .rulesync/rules/my-language.md and `pnpm dev generate`, you can use coding agents with your language.
|
|
719
|
+
# Japanese setting example:
|
|
720
|
+
cat << 'EOF' > .rulesync/rules/my-language.md
|
|
721
|
+
---
|
|
722
|
+
root: false
|
|
723
|
+
targets: ['*']
|
|
724
|
+
description: "It's a rule about language. If the rule file exists, you must always follow this."
|
|
725
|
+
globs: ["**/*"]
|
|
726
|
+
---
|
|
727
|
+
|
|
728
|
+
I'm a Japanese developer. So you must always answer in Japanese. On the other hand, reasoning(thinking) should be in English to improve token efficiency.
|
|
729
|
+
|
|
730
|
+
However, this project is for English speaking people. So when you write any code, comments, documentation, commit messages, PR title and PR descriptions, you must always use English.
|
|
731
|
+
EOF
|
|
732
|
+
pnpm dev generate
|
|
677
733
|
```
|
|
678
734
|
|
|
679
735
|
## FAQ
|