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 +32 -11
- package/dist/{chunk-2TFEIJOG.js → chunk-2CW2KFB3.js} +1 -1
- package/dist/chunk-4PSTOKKD.js +12 -0
- package/dist/{chunk-YGX4XO3M.js → chunk-GQTMTBX4.js} +16 -1
- package/dist/{chunk-5BYJMDCI.js → chunk-M7NL7G7A.js} +1 -1
- package/dist/{chunk-7Q5JNJJW.js → chunk-MDYDKNXQ.js} +1 -1
- package/dist/{chunk-ZOVBWPWK.js → chunk-NETSYSMD.js} +1 -1
- package/dist/{chunk-GJ3NMGAT.js → chunk-U4PLVMCG.js} +1 -1
- package/dist/chunk-UEAYL4NT.js +12 -0
- package/dist/{claudecode-W56JJONQ.js → claudecode-YTEFACCT.js} +2 -2
- package/dist/{cline-SEVFH54V.js → cline-CKNUDEA3.js} +2 -2
- package/dist/{codexcli-Q34DZAEO.js → codexcli-7SDGYI7D.js} +2 -2
- package/dist/{cursor-PT2RUL4U.js → cursor-YJGH7W24.js} +2 -2
- package/dist/{geminicli-AUNY2MDS.js → geminicli-E7KZTZ2G.js} +2 -2
- package/dist/index.cjs +463 -370
- package/dist/index.js +434 -348
- package/dist/{junie-YL5UL6FE.js → junie-5LEQU4BO.js} +2 -2
- package/dist/{windsurf-RLTNFHLL.js → windsurf-4P6HEUBV.js} +2 -2
- package/package.json +2 -2
- package/dist/chunk-55OU7KJU.js +0 -17
- package/dist/chunk-QP2BI4DF.js +0 -17
package/README.md
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
[](https://github.com/dyoshikawa/rulesync/actions/workflows/ci.yml)
|
|
4
4
|
[](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
|
|
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
|
|
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
|
-
#
|
|
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
|
|
|
@@ -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
|
|
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
|
};
|
|
@@ -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
|
generateGeminiCliMcp,
|
|
3
3
|
generateGeminiCliMcpConfiguration
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-MDYDKNXQ.js";
|
|
5
|
+
import "./chunk-GQTMTBX4.js";
|
|
6
6
|
import "./chunk-AUUSMVCT.js";
|
|
7
7
|
export {
|
|
8
8
|
generateGeminiCliMcp,
|