rulesync 6.4.0 → 6.6.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 +135 -65
- package/dist/index.cjs +2962 -1001
- package/dist/index.js +2949 -988
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -36,8 +36,19 @@ rulesync --help
|
|
|
36
36
|
|
|
37
37
|
Download pre-built binaries from the [latest release](https://github.com/dyoshikawa/rulesync/releases/latest). These binaries are built using [Bun's single-file executable bundler](https://bun.sh/docs/bundler/executables).
|
|
38
38
|
|
|
39
|
+
**Quick Install (Linux/macOS - No sudo required):**
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
curl -fsSL https://github.com/dyoshikawa/rulesync/releases/latest/download/install.sh | bash
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Options:
|
|
46
|
+
|
|
47
|
+
- Install specific version: `curl -fsSL https://github.com/dyoshikawa/rulesync/releases/latest/download/install.sh | bash -s -- v6.4.0`
|
|
48
|
+
- Custom directory: `RULESYNC_HOME=~/.local curl -fsSL https://github.com/dyoshikawa/rulesync/releases/latest/download/install.sh | bash`
|
|
49
|
+
|
|
39
50
|
<details>
|
|
40
|
-
<summary>
|
|
51
|
+
<summary>Manual installation (requires sudo)</summary>
|
|
41
52
|
|
|
42
53
|
#### Linux (x64)
|
|
43
54
|
|
|
@@ -133,6 +144,7 @@ Rulesync supports both **generation** and **import** for All of the major AI cod
|
|
|
133
144
|
| Tool | rules | ignore | mcp | commands | subagents | skills | hooks |
|
|
134
145
|
| ------------------ | :---: | :----: | :------: | :------: | :-------: | :----: | :---: |
|
|
135
146
|
| AGENTS.md | ✅ | | | 🎮 | 🎮 | 🎮 | |
|
|
147
|
+
| AgentsSkills | | | | | | ✅ | |
|
|
136
148
|
| Claude Code | ✅ 🌏 | ✅ | ✅ 🌏 📦 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ |
|
|
137
149
|
| Codex CLI | ✅ 🌏 | | 🌏 | 🌏 | 🎮 | ✅ 🌏 | |
|
|
138
150
|
| Gemini CLI | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | 🎮 | 🎮 | |
|
|
@@ -201,6 +213,11 @@ npx rulesync init
|
|
|
201
213
|
# Import existing configurations (to .rulesync/rules/ by default)
|
|
202
214
|
npx rulesync import --targets claudecode --features rules,ignore,mcp,commands,subagents,skills
|
|
203
215
|
|
|
216
|
+
# Fetch configurations from a Git repository
|
|
217
|
+
npx rulesync fetch owner/repo
|
|
218
|
+
npx rulesync fetch owner/repo@v1.0.0 --features rules,commands
|
|
219
|
+
npx rulesync fetch https://github.com/owner/repo --conflict skip
|
|
220
|
+
|
|
204
221
|
# Generate all features for all tools (new preferred syntax)
|
|
205
222
|
npx rulesync generate --targets "*" --features "*"
|
|
206
223
|
|
|
@@ -214,8 +231,113 @@ npx rulesync generate --targets "*" --features rules
|
|
|
214
231
|
# Generate simulated commands and subagents
|
|
215
232
|
npx rulesync generate --targets copilot,cursor,codexcli --features commands,subagents --simulate-commands --simulate-subagents
|
|
216
233
|
|
|
234
|
+
# Preview changes without writing files (dry-run mode)
|
|
235
|
+
npx rulesync generate --dry-run --targets claudecode --features rules
|
|
236
|
+
|
|
237
|
+
# Check if files are up to date (for CI/CD pipelines)
|
|
238
|
+
npx rulesync generate --check --targets "*" --features "*"
|
|
239
|
+
|
|
217
240
|
# Add generated files to .gitignore
|
|
218
241
|
npx rulesync gitignore
|
|
242
|
+
|
|
243
|
+
# Update rulesync to the latest version (single-binary installs)
|
|
244
|
+
npx rulesync update
|
|
245
|
+
|
|
246
|
+
# Check for updates without installing
|
|
247
|
+
npx rulesync update --check
|
|
248
|
+
|
|
249
|
+
# Force update even if already at latest version
|
|
250
|
+
npx rulesync update --force
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Preview Modes
|
|
254
|
+
|
|
255
|
+
Rulesync provides two preview modes for the `generate` command that allow you to see what changes would be made without actually writing files:
|
|
256
|
+
|
|
257
|
+
### `--dry-run`
|
|
258
|
+
|
|
259
|
+
Preview changes without writing any files. Shows what would be written or deleted with a `[PREVIEW]` prefix.
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
npx rulesync generate --dry-run --targets claudecode --features rules
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### `--check`
|
|
266
|
+
|
|
267
|
+
Same as `--dry-run`, but exits with code 1 if files are not up to date. This is useful for CI/CD pipelines to verify that generated files are committed.
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
# In your CI pipeline
|
|
271
|
+
npx rulesync generate --check --targets "*" --features "*"
|
|
272
|
+
echo $? # 0 if up to date, 1 if changes needed
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
> [!NOTE]
|
|
276
|
+
> `--dry-run` and `--check` cannot be used together.
|
|
277
|
+
|
|
278
|
+
## Fetch Command (In Development)
|
|
279
|
+
|
|
280
|
+
The `fetch` command allows you to fetch configuration files directly from a Git repository (GitHub/GitLab).
|
|
281
|
+
|
|
282
|
+
> [!NOTE]
|
|
283
|
+
> This feature is in development and may change in future releases.
|
|
284
|
+
|
|
285
|
+
**Note:** The fetch command searches for feature directories (`rules/`, `commands/`, `skills/`, `subagents/`, etc.) directly at the specified path, without requiring a `.rulesync/` directory structure. This allows fetching from external repositories like `vercel-labs/agent-skills` or `anthropics/skills`.
|
|
286
|
+
|
|
287
|
+
### Source Formats
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
# Full URL format
|
|
291
|
+
npx rulesync fetch https://github.com/owner/repo
|
|
292
|
+
npx rulesync fetch https://github.com/owner/repo/tree/branch
|
|
293
|
+
npx rulesync fetch https://github.com/owner/repo/tree/branch/path/to/subdir
|
|
294
|
+
npx rulesync fetch https://gitlab.com/owner/repo # GitLab (planned)
|
|
295
|
+
|
|
296
|
+
# Prefix format
|
|
297
|
+
npx rulesync fetch github:owner/repo
|
|
298
|
+
npx rulesync fetch gitlab:owner/repo # GitLab (planned)
|
|
299
|
+
|
|
300
|
+
# Shorthand format (defaults to GitHub)
|
|
301
|
+
npx rulesync fetch owner/repo
|
|
302
|
+
npx rulesync fetch owner/repo@ref # Specify branch/tag/commit
|
|
303
|
+
npx rulesync fetch owner/repo:path # Specify subdirectory
|
|
304
|
+
npx rulesync fetch owner/repo@ref:path # Both ref and path
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Options
|
|
308
|
+
|
|
309
|
+
| Option | Description | Default |
|
|
310
|
+
| ----------------------- | ------------------------------------------------------------------------------------------ | -------------------------------- |
|
|
311
|
+
| `--target, -t <target>` | Target format to interpret files as (e.g., 'rulesync', 'claudecode') | `rulesync` |
|
|
312
|
+
| `--features <features>` | Comma-separated features to fetch (rules, commands, subagents, skills, ignore, mcp, hooks) | `*` (all) |
|
|
313
|
+
| `--output <dir>` | Output directory relative to project root | `.rulesync` |
|
|
314
|
+
| `--conflict <strategy>` | Conflict resolution: `overwrite` or `skip` | `overwrite` |
|
|
315
|
+
| `--ref <ref>` | Git ref (branch/tag/commit) to fetch from | Default branch |
|
|
316
|
+
| `--path <path>` | Subdirectory in the repository | `.` (root) |
|
|
317
|
+
| `--token <token>` | Git provider token for private repositories | `GITHUB_TOKEN` or `GH_TOKEN` env |
|
|
318
|
+
|
|
319
|
+
### Examples
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# Fetch skills from external repositories
|
|
323
|
+
npx rulesync fetch vercel-labs/agent-skills --features skills
|
|
324
|
+
npx rulesync fetch anthropics/skills --features skills
|
|
325
|
+
|
|
326
|
+
# Fetch all features from a public repository
|
|
327
|
+
npx rulesync fetch dyoshikawa/rulesync --path .rulesync
|
|
328
|
+
|
|
329
|
+
# Fetch only rules and commands from a specific tag
|
|
330
|
+
npx rulesync fetch owner/repo@v1.0.0 --features rules,commands
|
|
331
|
+
|
|
332
|
+
# Fetch from a private repository (uses GITHUB_TOKEN env var)
|
|
333
|
+
export GITHUB_TOKEN=ghp_xxxx
|
|
334
|
+
npx rulesync fetch owner/private-repo
|
|
335
|
+
|
|
336
|
+
# Preserve existing files (skip conflicts)
|
|
337
|
+
npx rulesync fetch owner/repo --conflict skip
|
|
338
|
+
|
|
339
|
+
# Fetch from a monorepo subdirectory
|
|
340
|
+
npx rulesync fetch owner/repo:packages/my-package
|
|
219
341
|
```
|
|
220
342
|
|
|
221
343
|
## Configuration
|
|
@@ -248,7 +370,7 @@ Example:
|
|
|
248
370
|
"targets": ["cursor", "claudecode", "geminicli", "opencode", "codexcli"],
|
|
249
371
|
|
|
250
372
|
// Features to generate. You can specify "*" to generate all features.
|
|
251
|
-
"features": ["rules", "ignore", "mcp", "commands", "subagents"],
|
|
373
|
+
"features": ["rules", "ignore", "mcp", "commands", "subagents", "hooks"],
|
|
252
374
|
|
|
253
375
|
// Base directories for generation.
|
|
254
376
|
// Basically, you can specify a `["."]` only.
|
|
@@ -628,7 +750,7 @@ Simulated commands, subagents and skills allow you to generate simulated feature
|
|
|
628
750
|
Use the skill your-skill to achieve something.
|
|
629
751
|
```
|
|
630
752
|
|
|
631
|
-
## Modular MCP (
|
|
753
|
+
## Modular MCP (Deprecated)
|
|
632
754
|
|
|
633
755
|
Rulesync supports compressing tokens consumed by MCP servers [d-kimuson/modular-mcp](https://github.com/d-kimuson/modular-mcp) for context saving. When enabled with `--modular-mcp`, it additionally generates `modular-mcp.json`.
|
|
634
756
|
|
|
@@ -773,74 +895,22 @@ So, in this case, approximately 92% reduction in MCP tools consumption!
|
|
|
773
895
|
|
|
774
896
|
</details>
|
|
775
897
|
|
|
776
|
-
##
|
|
777
|
-
|
|
778
|
-
Rulesync provides an MCP (Model Context Protocol) server that enables AI agents to manage your Rulesync files. This allows AI agents to discover, read, create, update, and delete files dynamically.
|
|
779
|
-
|
|
780
|
-
> [!NOTE]
|
|
781
|
-
> The MCP server exposes the only one tool to minimize your agent's token usage. Approximately less than 1k tokens for the tool definition.
|
|
782
|
-
|
|
783
|
-
### Available Tools
|
|
784
|
-
|
|
785
|
-
The Rulesync MCP server provides the following tools:
|
|
786
|
-
|
|
787
|
-
<details>
|
|
788
|
-
<summary>Rules Management</summary>
|
|
789
|
-
|
|
790
|
-
- `list` - List all rule files
|
|
791
|
-
- `get` - Get a specific rule file
|
|
792
|
-
- `put` - Create or update a rule file
|
|
793
|
-
- `delete` - Delete a rule file
|
|
794
|
-
|
|
795
|
-
</details>
|
|
796
|
-
|
|
797
|
-
<details>
|
|
798
|
-
<summary>Commands Management</summary>
|
|
898
|
+
## Official Skills
|
|
799
899
|
|
|
800
|
-
|
|
801
|
-
- `get` - Get a specific command file
|
|
802
|
-
- `put` - Create or update a command file
|
|
803
|
-
- `delete` - Delete a command file
|
|
804
|
-
|
|
805
|
-
</details>
|
|
900
|
+
Rulesync provides official skills that you can install using the fetch command:
|
|
806
901
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
- `list` - List all subagent files
|
|
811
|
-
- `get` - Get a specific subagent file
|
|
812
|
-
- `put` - Create or update a subagent file
|
|
813
|
-
- `delete` - Delete a subagent file
|
|
814
|
-
|
|
815
|
-
</details>
|
|
816
|
-
|
|
817
|
-
<details>
|
|
818
|
-
<summary>Skills Management</summary>
|
|
819
|
-
|
|
820
|
-
- `list` - List all skill directories
|
|
821
|
-
- `get` - Get a specific skill (SKILL.md and other files)
|
|
822
|
-
- `put` - Create or update a skill directory
|
|
823
|
-
- `delete` - Delete a skill directory
|
|
824
|
-
|
|
825
|
-
</details>
|
|
826
|
-
|
|
827
|
-
<details>
|
|
828
|
-
<summary>Ignore Files Management</summary>
|
|
902
|
+
```bash
|
|
903
|
+
npx rulesync fetch dyoshikawa/rulesync --features skills
|
|
904
|
+
```
|
|
829
905
|
|
|
830
|
-
|
|
831
|
-
- `putIgnoreFile` - Create or update the ignore file
|
|
832
|
-
- `deleteIgnoreFile` - Delete the ignore file
|
|
906
|
+
This will install the Rulesync documentation skill to your project.
|
|
833
907
|
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
<details>
|
|
837
|
-
<summary>MCP Configuration Management</summary>
|
|
908
|
+
## Rulesync MCP Server
|
|
838
909
|
|
|
839
|
-
|
|
840
|
-
- `putMcpFile` - Create or update the MCP configuration file
|
|
841
|
-
- `deleteMcpFile` - Delete the MCP configuration file
|
|
910
|
+
Rulesync provides an MCP (Model Context Protocol) server that enables AI agents to manage your Rulesync files. This allows AI agents to discover, read, create, update, and delete files dynamically.
|
|
842
911
|
|
|
843
|
-
|
|
912
|
+
> [!NOTE]
|
|
913
|
+
> The MCP server exposes the only one tool to minimize your agent's token usage. Approximately less than 1k tokens for the tool definition.
|
|
844
914
|
|
|
845
915
|
### Usage
|
|
846
916
|
|