rulesync 0.49.0 → 0.51.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.ja.md +3 -2
- package/README.md +90 -2
- package/dist/{augmentcode-KTXT5GMO.js → augmentcode-ICLQ2NEZ.js} +2 -2
- package/dist/{chunk-YVRWBSCK.js → chunk-4MZXYV5H.js} +1 -1
- package/dist/{chunk-XHNIEO22.js → chunk-AREA26HF.js} +1 -1
- package/dist/{chunk-MCADLVGY.js → chunk-FFW6TGCM.js} +1 -1
- package/dist/{chunk-QNHGYRJT.js → chunk-IXCMY24P.js} +1 -1
- package/dist/{chunk-6TAURCQP.js → chunk-OPZOVKIL.js} +1 -1
- package/dist/{chunk-R5HFWJ5L.js → chunk-QUJMXHNR.js} +1 -1
- package/dist/{chunk-6MFEIYHN.js → chunk-TTHBLXOB.js} +1 -1
- package/dist/{chunk-IBJGN3JQ.js → chunk-USKQYIZ2.js} +11 -3
- package/dist/chunk-Y26DXTAT.js +90 -0
- package/dist/{chunk-G5LLOIO4.js → chunk-Y2XH4E5R.js} +1 -1
- package/dist/{claudecode-OE4TSKPS.js → claudecode-SRXYHIJE.js} +2 -2
- package/dist/{cline-CWLQS5CV.js → cline-IJW27CUU.js} +2 -2
- package/dist/{copilot-PVZDRAU5.js → copilot-ARYIWVJ7.js} +2 -2
- package/dist/{cursor-ZZV7AY6H.js → cursor-FCS74IAH.js} +2 -2
- package/dist/{geminicli-RSXOWFEN.js → geminicli-VOPV6DXZ.js} +2 -2
- package/dist/index.cjs +1374 -549
- package/dist/index.js +1254 -484
- package/dist/junie-A2Y2WZI4.js +9 -0
- package/dist/{kiro-YRKVCDIQ.js → kiro-MHIK4UBV.js} +2 -2
- package/dist/{roo-HCRGELWQ.js → roo-VG4IUNTE.js} +2 -2
- package/package.json +17 -16
package/README.ja.md
CHANGED
|
@@ -67,8 +67,9 @@ yarn global add rulesync
|
|
|
67
67
|
npx rulesync import --cursor # .cursorrulesと.cursor/rules/*.mdcから
|
|
68
68
|
npx rulesync import --copilot # .github/copilot-instructions.mdから
|
|
69
69
|
npx rulesync import --cline # .cline/instructions.mdから
|
|
70
|
-
npx rulesync import --augmentcode
|
|
71
|
-
npx rulesync import --
|
|
70
|
+
npx rulesync import --augmentcode # .augment/rules/*.mdから
|
|
71
|
+
npx rulesync import --augmentcode-legacy # .augment-guidelines(レガシー形式)から
|
|
72
|
+
npx rulesync import --roo # .roo/instructions.mdから
|
|
72
73
|
npx rulesync import --geminicli # GEMINI.mdと.gemini/memories/*.mdから
|
|
73
74
|
```
|
|
74
75
|
|
package/README.md
CHANGED
|
@@ -67,8 +67,9 @@ If you already have AI tool configurations, you can import them into rulesync fo
|
|
|
67
67
|
npx rulesync import --cursor # From .cursorrules and .cursor/rules/*.mdc
|
|
68
68
|
npx rulesync import --copilot # From .github/copilot-instructions.md
|
|
69
69
|
npx rulesync import --cline # From .cline/instructions.md
|
|
70
|
-
npx rulesync import --augmentcode
|
|
71
|
-
npx rulesync import --
|
|
70
|
+
npx rulesync import --augmentcode # From .augment/rules/*.md
|
|
71
|
+
npx rulesync import --augmentcode-legacy # From .augment-guidelines (legacy format)
|
|
72
|
+
npx rulesync import --roo # From .roo/instructions.md
|
|
72
73
|
npx rulesync import --geminicli # From GEMINI.md and .gemini/memories/*.md
|
|
73
74
|
```
|
|
74
75
|
|
|
@@ -243,6 +244,89 @@ npx rulesync generate --base-dir ./apps/web,./apps/api,./packages/shared
|
|
|
243
244
|
- `--verbose`: Show detailed output during generation process
|
|
244
245
|
- `--copilot`, `--cursor`, `--cline`, `--claudecode`, `--augmentcode`, `--roo`, `--geminicli`, `--kiro`: Generate only for specified tools
|
|
245
246
|
- `--base-dir <paths>`: Generate configuration files in specified base directories (comma-separated for multiple paths). Useful for monorepo setups where you want to generate tool-specific configurations in different project directories.
|
|
247
|
+
- `--config <path>`: Use a specific configuration file
|
|
248
|
+
- `--no-config`: Disable configuration file loading
|
|
249
|
+
|
|
250
|
+
### Configuration Files
|
|
251
|
+
|
|
252
|
+
rulesync supports configuration files to avoid repetitive command-line arguments. The configuration is loaded from (in order of precedence):
|
|
253
|
+
|
|
254
|
+
1. Path specified with `--config` flag
|
|
255
|
+
2. `rulesync.jsonc` (JSONC format with comments)
|
|
256
|
+
3. `rulesync.ts` (TypeScript format)
|
|
257
|
+
4. `rulesync.config.ts`
|
|
258
|
+
5. `rulesync.config.jsonc`
|
|
259
|
+
6. `package.json` (in a `"rulesync"` field)
|
|
260
|
+
|
|
261
|
+
#### Configuration File Examples
|
|
262
|
+
|
|
263
|
+
**JSONC format (`rulesync.jsonc`):**
|
|
264
|
+
```jsonc
|
|
265
|
+
{
|
|
266
|
+
// List of tools to generate configurations for
|
|
267
|
+
"targets": ["copilot", "cursor", "claudecode"],
|
|
268
|
+
|
|
269
|
+
// Tools to exclude from generation (overrides targets)
|
|
270
|
+
"exclude": ["roo"],
|
|
271
|
+
|
|
272
|
+
// Custom output paths for specific tools
|
|
273
|
+
"outputPaths": {
|
|
274
|
+
"copilot": ".github/copilot-instructions.md"
|
|
275
|
+
},
|
|
276
|
+
|
|
277
|
+
// Base directory or directories for generation
|
|
278
|
+
"baseDir": "./packages",
|
|
279
|
+
|
|
280
|
+
// Delete existing files before generating
|
|
281
|
+
"delete": false,
|
|
282
|
+
|
|
283
|
+
// Enable verbose output
|
|
284
|
+
"verbose": true
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**TypeScript format (`rulesync.ts`):**
|
|
289
|
+
```typescript
|
|
290
|
+
import type { ConfigOptions } from "rulesync";
|
|
291
|
+
|
|
292
|
+
const config: ConfigOptions = {
|
|
293
|
+
targets: ["copilot", "cursor", "claudecode"],
|
|
294
|
+
exclude: ["roo"],
|
|
295
|
+
outputPaths: {
|
|
296
|
+
copilot: ".github/copilot-instructions.md"
|
|
297
|
+
},
|
|
298
|
+
baseDir: "./packages",
|
|
299
|
+
delete: false,
|
|
300
|
+
verbose: true
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
export default config;
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
#### Configuration Options
|
|
307
|
+
|
|
308
|
+
- `targets`: Array of tools to generate configurations for (overrides default targets)
|
|
309
|
+
- `exclude`: Array of tools to exclude from generation
|
|
310
|
+
- `outputPaths`: Custom output paths for specific tools
|
|
311
|
+
- `baseDir`: Base directory or array of directories for generation
|
|
312
|
+
- `delete`: Delete existing files before generating (default: false)
|
|
313
|
+
- `verbose`: Enable verbose output (default: false)
|
|
314
|
+
- `aiRulesDir`: Directory containing rule files (default: ".rulesync")
|
|
315
|
+
- `watch`: Watch configuration with `enabled`, `interval`, and `ignore` options
|
|
316
|
+
|
|
317
|
+
#### Managing Configuration
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
# Show current configuration
|
|
321
|
+
npx rulesync config
|
|
322
|
+
|
|
323
|
+
# Initialize a configuration file
|
|
324
|
+
npx rulesync config --init
|
|
325
|
+
|
|
326
|
+
# Initialize with specific format
|
|
327
|
+
npx rulesync config --init --format jsonc # Default, supports comments
|
|
328
|
+
npx rulesync config --init --format ts # TypeScript with type safety
|
|
329
|
+
```
|
|
246
330
|
|
|
247
331
|
### 4. Import Existing Configurations
|
|
248
332
|
|
|
@@ -328,6 +412,10 @@ npx rulesync watch
|
|
|
328
412
|
|
|
329
413
|
# Add generated files to .gitignore
|
|
330
414
|
npx rulesync gitignore
|
|
415
|
+
|
|
416
|
+
# Show or manage configuration
|
|
417
|
+
npx rulesync config
|
|
418
|
+
npx rulesync config --init # Create configuration file
|
|
331
419
|
```
|
|
332
420
|
|
|
333
421
|
## Configuration File Structure
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateAugmentcodeMcp,
|
|
3
3
|
generateAugmentcodeMcpConfiguration
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-OPZOVKIL.js";
|
|
5
|
+
import "./chunk-USKQYIZ2.js";
|
|
6
6
|
export {
|
|
7
7
|
generateAugmentcodeMcp,
|
|
8
8
|
generateAugmentcodeMcpConfiguration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/types/tool-targets.ts
|
|
2
2
|
import { z } from "zod/mini";
|
|
3
|
-
var
|
|
3
|
+
var ALL_TOOL_TARGETS = [
|
|
4
4
|
"augmentcode",
|
|
5
5
|
"augmentcode-legacy",
|
|
6
6
|
"copilot",
|
|
@@ -9,11 +9,17 @@ var ToolTargetSchema = z.enum([
|
|
|
9
9
|
"claudecode",
|
|
10
10
|
"roo",
|
|
11
11
|
"geminicli",
|
|
12
|
-
"kiro"
|
|
13
|
-
|
|
12
|
+
"kiro",
|
|
13
|
+
"junie"
|
|
14
|
+
];
|
|
15
|
+
var ToolTargetSchema = z.enum(ALL_TOOL_TARGETS);
|
|
14
16
|
var ToolTargetsSchema = z.array(ToolTargetSchema);
|
|
15
17
|
var WildcardTargetSchema = z.tuple([z.literal("*")]);
|
|
16
18
|
var RulesyncTargetsSchema = z.union([ToolTargetsSchema, WildcardTargetSchema]);
|
|
19
|
+
function isToolTarget(target) {
|
|
20
|
+
if (!target) return false;
|
|
21
|
+
return ALL_TOOL_TARGETS.some((validTarget) => validTarget === target);
|
|
22
|
+
}
|
|
17
23
|
|
|
18
24
|
// src/utils/mcp-helpers.ts
|
|
19
25
|
function shouldIncludeServer(server, targetTool) {
|
|
@@ -34,8 +40,10 @@ function shouldIncludeServer(server, targetTool) {
|
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
export {
|
|
43
|
+
ALL_TOOL_TARGETS,
|
|
37
44
|
ToolTargetSchema,
|
|
38
45
|
ToolTargetsSchema,
|
|
39
46
|
RulesyncTargetsSchema,
|
|
47
|
+
isToolTarget,
|
|
40
48
|
shouldIncludeServer
|
|
41
49
|
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
shouldIncludeServer
|
|
3
|
+
} from "./chunk-USKQYIZ2.js";
|
|
4
|
+
|
|
5
|
+
// src/generators/mcp/junie.ts
|
|
6
|
+
function generateJunieMcp(config) {
|
|
7
|
+
const junieConfig = {
|
|
8
|
+
mcpServers: {}
|
|
9
|
+
};
|
|
10
|
+
for (const [serverName, server] of Object.entries(config.mcpServers)) {
|
|
11
|
+
if (!shouldIncludeServer(server, "junie")) continue;
|
|
12
|
+
const junieServer = {
|
|
13
|
+
name: serverName
|
|
14
|
+
};
|
|
15
|
+
if (server.command) {
|
|
16
|
+
junieServer.command = server.command;
|
|
17
|
+
if (server.args) junieServer.args = server.args;
|
|
18
|
+
} else if (server.url || server.httpUrl) {
|
|
19
|
+
if (server.httpUrl) {
|
|
20
|
+
junieServer.httpUrl = server.httpUrl;
|
|
21
|
+
} else if (server.url) {
|
|
22
|
+
junieServer.url = server.url;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (server.env) {
|
|
26
|
+
junieServer.env = server.env;
|
|
27
|
+
}
|
|
28
|
+
if (server.cwd) {
|
|
29
|
+
junieServer.workingDirectory = server.cwd;
|
|
30
|
+
}
|
|
31
|
+
if (server.timeout !== void 0) {
|
|
32
|
+
junieServer.timeout = server.timeout;
|
|
33
|
+
}
|
|
34
|
+
if (server.trust !== void 0) {
|
|
35
|
+
junieServer.trust = server.trust;
|
|
36
|
+
}
|
|
37
|
+
if (server.transport) {
|
|
38
|
+
if (String(server.transport) === "streamable-http") {
|
|
39
|
+
junieServer.transport = "http";
|
|
40
|
+
} else if (server.transport === "stdio" || server.transport === "http" || server.transport === "sse") {
|
|
41
|
+
junieServer.transport = server.transport;
|
|
42
|
+
}
|
|
43
|
+
} else if (server.command) {
|
|
44
|
+
junieServer.transport = "stdio";
|
|
45
|
+
}
|
|
46
|
+
junieConfig.mcpServers[serverName] = junieServer;
|
|
47
|
+
}
|
|
48
|
+
return JSON.stringify(junieConfig, null, 2);
|
|
49
|
+
}
|
|
50
|
+
function generateJunieMcpConfiguration(mcpServers, baseDir = "") {
|
|
51
|
+
const filepath = baseDir ? `${baseDir}/.junie/mcp-config.json` : ".junie/mcp-config.json";
|
|
52
|
+
const config = {
|
|
53
|
+
mcpServers: {}
|
|
54
|
+
};
|
|
55
|
+
for (const [serverName, server] of Object.entries(mcpServers)) {
|
|
56
|
+
if (!shouldIncludeServer(server, "junie")) {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
const { targets: _, transport, cwd, ...serverConfig } = server;
|
|
60
|
+
const junieServer = {
|
|
61
|
+
...serverConfig,
|
|
62
|
+
name: serverName
|
|
63
|
+
};
|
|
64
|
+
if (cwd) {
|
|
65
|
+
junieServer.workingDirectory = cwd;
|
|
66
|
+
}
|
|
67
|
+
if (transport) {
|
|
68
|
+
if (String(transport) === "streamable-http") {
|
|
69
|
+
junieServer.transport = "http";
|
|
70
|
+
} else if (transport === "stdio" || transport === "http" || transport === "sse") {
|
|
71
|
+
junieServer.transport = transport;
|
|
72
|
+
}
|
|
73
|
+
} else if (serverConfig.command) {
|
|
74
|
+
junieServer.transport = "stdio";
|
|
75
|
+
}
|
|
76
|
+
config.mcpServers[serverName] = junieServer;
|
|
77
|
+
}
|
|
78
|
+
return [
|
|
79
|
+
{
|
|
80
|
+
filepath,
|
|
81
|
+
content: `${JSON.stringify(config, null, 2)}
|
|
82
|
+
`
|
|
83
|
+
}
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
generateJunieMcp,
|
|
89
|
+
generateJunieMcpConfiguration
|
|
90
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateGeminiCliMcp,
|
|
3
3
|
generateGeminiCliMcpConfiguration
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-IXCMY24P.js";
|
|
5
|
+
import "./chunk-USKQYIZ2.js";
|
|
6
6
|
export {
|
|
7
7
|
generateGeminiCliMcp,
|
|
8
8
|
generateGeminiCliMcpConfiguration
|