rulesync 0.60.0 → 0.62.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 CHANGED
@@ -3,9 +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://badge.fury.io/js/rulesync.svg)](https://www.npmjs.com/package/rulesync)
5
5
 
6
- A Node.js CLI tool that automatically generates configuration files for various AI development tools from unified AI rule files (`.rulesync/*.md`). Also imports existing AI tool configurations into the unified format.
7
-
8
- **English** | [日本語](./README.ja.md)
6
+ A Node.js CLI tool that automatically generates configuration files for various AI development tools from unified AI rule files. Uses the recommended `.rulesync/rules/*.md` structure, with backward compatibility for legacy `.rulesync/*.md` layouts. Also imports existing AI tool configurations into the unified format.
9
7
 
10
8
  ## Installation
11
9
 
@@ -23,11 +21,17 @@ yarn global add rulesync
23
21
 
24
22
  1. **Initialize your project:**
25
23
  ```bash
24
+ # Recommended: Use new organized structure
26
25
  npx rulesync init
26
+
27
+ # Legacy: Use backward-compatible structure
28
+ npx rulesync init --legacy
27
29
  ```
28
30
 
29
- 2. **Edit the generated rule files** in `.rulesync/` directory to match your project needs
30
-
31
+ 2. **Edit the generated rule files:**
32
+ - **Recommended**: Edit files in `.rulesync/rules/` directory
33
+ - **Legacy**: Edit files in `.rulesync/` directory
34
+
31
35
  3. **Generate tool-specific configuration files:**
32
36
  ```bash
33
37
  npx rulesync generate
@@ -38,11 +42,16 @@ yarn global add rulesync
38
42
  If you already have AI tool configurations:
39
43
 
40
44
  ```bash
41
- # Import existing configurations
45
+ # Import existing configurations (to recommended structure)
42
46
  npx rulesync import --claudecode # From CLAUDE.md
43
47
  npx rulesync import --cursor # From .cursorrules
44
48
  npx rulesync import --copilot # From .github/copilot-instructions.md
45
49
 
50
+ # Import to legacy structure (for existing projects)
51
+ npx rulesync import --claudecode --legacy
52
+ npx rulesync import --cursor --legacy
53
+ npx rulesync import --copilot --legacy
54
+
46
55
  # Generate unified configurations
47
56
  npx rulesync generate
48
57
  ```
@@ -85,24 +94,36 @@ Avoid vendor lock-in completely. If you decide to stop using rulesync, you can c
85
94
  ### 🎯 **Consistency Across Tools**
86
95
  Apply consistent rules across all AI tools, improving code quality and development experience for the entire team.
87
96
 
97
+ ### 📁 **Organized Structure**
98
+ New organized directory structure (`.rulesync/rules/`) keeps rules well-organized, while maintaining full backward compatibility with legacy layouts (`.rulesync/*.md`) for existing projects.
99
+
88
100
  ## Quick Commands
89
101
 
90
102
  ```bash
91
- # Initialize new project
103
+ # Initialize new project (recommended: organized rules structure)
92
104
  npx rulesync init
93
105
 
94
- # Add new rule file
106
+ # Initialize with legacy layout (backward compatibility)
107
+ npx rulesync init --legacy
108
+
109
+ # Add new rule file to recommended location
95
110
  npx rulesync add typescript-rules
96
111
 
112
+ # Add rule file to legacy location (for existing projects)
113
+ npx rulesync add typescript-rules --legacy
114
+
115
+ # Import existing configurations (to .rulesync/rules/ by default)
116
+ npx rulesync import --cursor
117
+
118
+ # Import to legacy location (for existing projects)
119
+ npx rulesync import --cursor --legacy
120
+
97
121
  # Validate rules
98
122
  npx rulesync validate
99
123
 
100
124
  # Generate configurations
101
125
  npx rulesync generate
102
126
 
103
- # Import from existing tools
104
- npx rulesync import --cursor
105
-
106
127
  # Watch for changes
107
128
  npx rulesync watch
108
129
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generateMcpConfig,
3
3
  generateMcpConfigurationFiles
4
- } from "./chunk-YGX4XO3M.js";
4
+ } from "./chunk-GQTMTBX4.js";
5
5
 
6
6
  // src/generators/mcp/codexcli.ts
7
7
  function generateCodexMcp(config) {
@@ -0,0 +1,12 @@
1
+ import {
2
+ cursorMcpGenerator
3
+ } from "./chunk-GQTMTBX4.js";
4
+
5
+ // src/generators/mcp/cursor.ts
6
+ var generateCursorMcp = cursorMcpGenerator.generateMcp;
7
+ var generateCursorMcpConfiguration = cursorMcpGenerator.generateMcpConfiguration;
8
+
9
+ export {
10
+ generateCursorMcp,
11
+ generateCursorMcpConfiguration
12
+ };
@@ -230,6 +230,18 @@ function generateMcpFromRegistry(tool, config) {
230
230
  }
231
231
  return generateMcpConfig(config, generatorConfig);
232
232
  }
233
+ function createMcpGenerator(toolName) {
234
+ return {
235
+ generateMcp: (config) => {
236
+ return generateMcpFromRegistry(toolName, config);
237
+ },
238
+ generateMcpConfiguration: (mcpServers, baseDir = "") => {
239
+ return generateMcpConfigurationFilesFromRegistry(toolName, mcpServers, baseDir);
240
+ }
241
+ };
242
+ }
243
+ var cursorMcpGenerator = createMcpGenerator("cursor");
244
+ var clineMcpGenerator = createMcpGenerator("cline");
233
245
  function generateMcpConfigurationFilesFromRegistry(tool, mcpServers, baseDir = "") {
234
246
  const generatorConfig = MCP_GENERATOR_REGISTRY[tool];
235
247
  if (!generatorConfig) {
@@ -247,7 +259,8 @@ function generateMcpConfigurationFilesFromRegistry(tool, mcpServers, baseDir = "
247
259
  return generateMcpConfigurationFiles(mcpServers, generatorConfig, baseDir);
248
260
  }
249
261
  function generateJunieMcpConfigurationFiles(mcpServers, baseDir = "") {
250
- const filepath = baseDir ? `${baseDir}/.junie/mcp-config.json` : ".junie/mcp-config.json";
262
+ const junieMcpPath = ".junie/mcp/mcp.json";
263
+ const filepath = baseDir ? `${baseDir}/${junieMcpPath}` : junieMcpPath;
251
264
  const config = {
252
265
  mcpServers: {}
253
266
  };
@@ -288,5 +301,7 @@ export {
288
301
  generateMcpConfigurationFiles,
289
302
  configWrappers,
290
303
  generateMcpFromRegistry,
304
+ cursorMcpGenerator,
305
+ clineMcpGenerator,
291
306
  generateMcpConfigurationFilesFromRegistry
292
307
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generateMcpConfigurationFilesFromRegistry,
3
3
  generateMcpFromRegistry
4
- } from "./chunk-YGX4XO3M.js";
4
+ } from "./chunk-GQTMTBX4.js";
5
5
 
6
6
  // src/generators/mcp/junie.ts
7
7
  function generateJunieMcp(config) {
@@ -2,7 +2,7 @@ import {
2
2
  configWrappers,
3
3
  generateMcpConfig,
4
4
  generateMcpConfigurationFiles
5
- } from "./chunk-YGX4XO3M.js";
5
+ } from "./chunk-GQTMTBX4.js";
6
6
 
7
7
  // src/generators/mcp/geminicli.ts
8
8
  function generateGeminiCliMcp(config) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generateMcpConfigurationFilesFromRegistry,
3
3
  generateMcpFromRegistry
4
- } from "./chunk-YGX4XO3M.js";
4
+ } from "./chunk-GQTMTBX4.js";
5
5
 
6
6
  // src/generators/mcp/windsurf.ts
7
7
  function generateWindsurfMcp(config) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generateMcpConfigurationFilesFromRegistry,
3
3
  generateMcpFromRegistry
4
- } from "./chunk-YGX4XO3M.js";
4
+ } from "./chunk-GQTMTBX4.js";
5
5
 
6
6
  // src/generators/mcp/claudecode.ts
7
7
  function generateClaudeMcp(config) {
@@ -0,0 +1,12 @@
1
+ import {
2
+ clineMcpGenerator
3
+ } from "./chunk-GQTMTBX4.js";
4
+
5
+ // src/generators/mcp/cline.ts
6
+ var generateClineMcp = clineMcpGenerator.generateMcp;
7
+ var generateClineMcpConfiguration = clineMcpGenerator.generateMcpConfiguration;
8
+
9
+ export {
10
+ generateClineMcp,
11
+ generateClineMcpConfiguration
12
+ };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generateClaudeMcp,
3
3
  generateClaudeMcpConfiguration
4
- } from "./chunk-GJ3NMGAT.js";
5
- import "./chunk-YGX4XO3M.js";
4
+ } from "./chunk-U4PLVMCG.js";
5
+ import "./chunk-GQTMTBX4.js";
6
6
  import "./chunk-AUUSMVCT.js";
7
7
  export {
8
8
  generateClaudeMcp,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generateClineMcp,
3
3
  generateClineMcpConfiguration
4
- } from "./chunk-QP2BI4DF.js";
5
- import "./chunk-YGX4XO3M.js";
4
+ } from "./chunk-UEAYL4NT.js";
5
+ import "./chunk-GQTMTBX4.js";
6
6
  import "./chunk-AUUSMVCT.js";
7
7
  export {
8
8
  generateClineMcp,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generateCodexMcp,
3
3
  generateCodexMcpConfiguration
4
- } from "./chunk-2TFEIJOG.js";
5
- import "./chunk-YGX4XO3M.js";
4
+ } from "./chunk-2CW2KFB3.js";
5
+ import "./chunk-GQTMTBX4.js";
6
6
  import "./chunk-AUUSMVCT.js";
7
7
  export {
8
8
  generateCodexMcp,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generateCursorMcp,
3
3
  generateCursorMcpConfiguration
4
- } from "./chunk-55OU7KJU.js";
5
- import "./chunk-YGX4XO3M.js";
4
+ } from "./chunk-4PSTOKKD.js";
5
+ import "./chunk-GQTMTBX4.js";
6
6
  import "./chunk-AUUSMVCT.js";
7
7
  export {
8
8
  generateCursorMcp,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generateGeminiCliMcp,
3
3
  generateGeminiCliMcpConfiguration
4
- } from "./chunk-7Q5JNJJW.js";
5
- import "./chunk-YGX4XO3M.js";
4
+ } from "./chunk-MDYDKNXQ.js";
5
+ import "./chunk-GQTMTBX4.js";
6
6
  import "./chunk-AUUSMVCT.js";
7
7
  export {
8
8
  generateGeminiCliMcp,