rulesync 1.2.6 → 2.0.1

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 (4) hide show
  1. package/README.md +53 -9
  2. package/dist/index.cjs +639 -377
  3. package/dist/index.js +641 -379
  4. package/package.json +12 -12
package/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  [![CI](https://github.com/dyoshikawa/rulesync/actions/workflows/ci.yml/badge.svg)](https://github.com/dyoshikawa/rulesync/actions/workflows/ci.yml)
4
4
  [![npm version](https://img.shields.io/npm/v/rulesync)](https://www.npmjs.com/package/rulesync)
5
5
  [![npm downloads](https://img.shields.io/npm/dt/rulesync)](https://www.npmjs.com/package/rulesync)
6
+ [![DeepWiki](https://img.shields.io/badge/DeepWiki-dyoshikawa%2Frulesync-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/dyoshikawa/rulesync)
6
7
 
7
8
  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, and subagents. Uses the recommended `.rulesync/rules/*.md` structure, with full backward compatibility for legacy `.rulesync/*.md` layouts.
8
9
 
@@ -31,10 +32,8 @@ rulesync --help
31
32
  ## Getting Started
32
33
 
33
34
  ```bash
34
- # Create necessary directories and sample rule files
35
+ # Create necessary directories, sample rule files, and configuration file
35
36
  npx rulesync init
36
- # Create a new configuration file
37
- npx rulesync config --init
38
37
  ```
39
38
 
40
39
  On the other hand, if you already have AI tool configurations:
@@ -59,8 +58,8 @@ Rulesync supports both **generation** and **import** for All of the major AI cod
59
58
  | Tool | rules | ignore | mcp | commands | subagents |
60
59
  |------------------------|:-----:|:------:|:-----:|:--------:|:---------:|
61
60
  | AGENTS.md | ✅ | | | | |
62
- | Claude Code | ✅ | ✅ | ✅ | ✅ | ✅ |
63
- | Codex CLI | ✅ | ✅ | | 🎮 | 🎮 |
61
+ | Claude Code | ✅ 🌏 | ✅ | ✅ | ✅ | ✅ |
62
+ | Codex CLI | ✅ 🌏 | ✅ | | 🎮 | 🎮 |
64
63
  | Gemini CLI | ✅ | ✅ | | ✅ | 🎮 |
65
64
  | GitHub Copilot | ✅ | | ✅ | 🎮 | 🎮 |
66
65
  | Cursor | ✅ | ✅ | ✅ | ✅ | 🎮 |
@@ -75,8 +74,9 @@ Rulesync supports both **generation** and **import** for All of the major AI cod
75
74
  | Windsurf | ✅ | ✅ | | | |
76
75
  | Warp | ✅ | | | | |
77
76
 
78
-
79
- 🎮: Simulated Commands/Subagents (Experimental Feature)
77
+ ✅: Supports project mode
78
+ 🌏: Supports global mode (Experimental Feature)
79
+ 🎮: Supports Simulated Commands/Subagents (Experimental Feature)
80
80
 
81
81
  ## Why Rulesync?
82
82
 
@@ -95,6 +95,9 @@ Avoid lock-in completely. If you decide to stop using Rulesync, you can continue
95
95
  ### 🎯 **Consistency Across Tools**
96
96
  Apply consistent rules across all AI tools, improving code quality and development experience for the entire team.
97
97
 
98
+ ### 🌏 **Global Mode**
99
+ You can use global mode via Rulesync by enabling `--experimental-global` option.
100
+
98
101
  ### 🎮 **Simulated Commands and Subagents**
99
102
  Simulated commands and subagents are experimental features that allow you to generate simulated commands and subagents for copilot, cursor and codexcli. This is useful for shortening your prompts.
100
103
 
@@ -151,6 +154,7 @@ Example:
151
154
  "verbose": false,
152
155
 
153
156
  // Experimental features
157
+ "experimentalGlobal": false,
154
158
  "experimentalSimulateCommands": false,
155
159
  "experimentalSimulateSubagents": false
156
160
  }
@@ -219,7 +223,7 @@ description: >- # subagent description
219
223
  suggest a specification, implement a new feature, refactor the codebase, or
220
224
  fix a bug. This agent can be called by the user explicitly only.
221
225
  claudecode: # for claudecode-specific rules
222
- model: opus # opus, sonnet, haiku or inherit
226
+ model: inherit # opus, sonnet, haiku or inherit
223
227
  ---
224
228
 
225
229
  You are the planner for any tasks.
@@ -275,7 +279,47 @@ tmp/
275
279
  credentials/
276
280
  ```
277
281
 
278
- ## Simulate Commands and Subagents
282
+ ## Global Mode(Experimental Feature)
283
+
284
+ You can use global mode via Rulesync by enabling `--experimental-global` option. It can also be called as user scope mode.
285
+
286
+ Currently, only supports rules generation. Import for global files is still not supported.
287
+
288
+ 1. Create an any name directory. For example, if you prefer `~/.aiglobal`, run the following command.
289
+ ```bash
290
+ mkdir -p ~/.aiglobal
291
+ ```
292
+ 2. Initialize files for global files in the directory.
293
+ ```bash
294
+ cd ~/.aiglobal
295
+ npx rulesync init
296
+ ```
297
+ 3. Edit `~/.aiglobal/rulesync.jsonc` to enable global mode.
298
+ ```jsonc
299
+ {
300
+ "experimentalGlobal": true
301
+ }
302
+ ```
303
+ 4. Edit `~/.aiglobal/.rulesync/rules/overview.md` to your preferences.
304
+ ```md
305
+ ---
306
+ root: true
307
+ ---
308
+ # The Project Overview
309
+ ...
310
+ ```
311
+ 5. Generate rules for global settings.
312
+ ```bash
313
+ # Run in the `~/.aiglobal` directory
314
+ npx rulesync generate
315
+ ```
316
+
317
+ > [!WARNING]
318
+ > Currently, when in the directory enabled global mode:
319
+ > * `rulesync.jsonc` only supports `global`, `features`, `delete` and `verbose`. `Features` can be set `"rules"` only. Other parameters are ignored.
320
+ > * `rules/*.md` only supports single file has `root: true`, and frontmatter parameters without `root` are ignored.
321
+
322
+ ## Simulate Commands and Subagents(Experimental Feature)
279
323
 
280
324
  Simulated commands and subagents are experimental features that allow you to generate simulated commands and subagents for copilot, cursor, codexcli and etc. This is useful for shortening your prompts.
281
325