sync-agents-settings 0.2.0 → 0.3.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/.claude-plugin/plugin.json +11 -0
- package/README.md +47 -1
- package/bin/sync-agents.cjs +0 -0
- package/commands/sync-diff.md +28 -0
- package/commands/sync-instructions.md +46 -0
- package/commands/sync-list.md +19 -0
- package/commands/sync.md +40 -0
- package/dist/cli.js +1 -1
- package/dist/instructions.js +1 -1
- package/dist/instructions.js.map +1 -1
- package/package.json +5 -2
- package/skills/sync-awareness/SKILL.md +37 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sync-agents-settings",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Sync MCP server configs and instructions from Claude Code to other AI agents (Gemini, Codex, Cursor, Kiro, OpenCode)",
|
|
5
|
+
"repository": "https://github.com/Leoyang183/sync-agents-settings",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Leoyang183"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": ["mcp", "sync", "agents", "settings"]
|
|
11
|
+
}
|
package/README.md
CHANGED
|
@@ -23,6 +23,25 @@ This tool lets you configure MCP servers and write instructions once in Claude C
|
|
|
23
23
|
|
|
24
24
|
## Quick Start
|
|
25
25
|
|
|
26
|
+
### Option A: Claude Code Plugin (recommended)
|
|
27
|
+
|
|
28
|
+
Use directly inside Claude Code with slash commands:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Load the plugin for this session
|
|
32
|
+
claude --plugin-dir /path/to/sync-agents-settings
|
|
33
|
+
|
|
34
|
+
# Then use slash commands in the conversation:
|
|
35
|
+
# /sync-list — list all MCP servers
|
|
36
|
+
# /sync — sync MCP configs (with dry-run preview)
|
|
37
|
+
# /sync-diff — compare configs between agents
|
|
38
|
+
# /sync-instructions — sync CLAUDE.md to other agents
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The plugin also includes a **sync-awareness skill** that automatically suggests syncing when you edit MCP settings or CLAUDE.md files.
|
|
42
|
+
|
|
43
|
+
### Option B: CLI via npx
|
|
44
|
+
|
|
26
45
|
No installation needed — just run with `npx`:
|
|
27
46
|
|
|
28
47
|
```bash
|
|
@@ -39,7 +58,7 @@ npx sync-agents-settings sync
|
|
|
39
58
|
npx sync-agents-settings sync-instructions
|
|
40
59
|
```
|
|
41
60
|
|
|
42
|
-
|
|
61
|
+
### Option C: Global Install
|
|
43
62
|
|
|
44
63
|
```bash
|
|
45
64
|
# Global install for the `sync-agents` command
|
|
@@ -342,6 +361,33 @@ Use `--no-backup` to skip. Target directories that don't exist (CLI not installe
|
|
|
342
361
|
| Kiro CLI | `~/.kiro/steering/claude-instructions.md` | `.kiro/steering/claude-instructions.md` | Markdown + frontmatter |
|
|
343
362
|
| Cursor | Not supported (SQLite) | `.cursor/rules/claude-instructions.mdc` | MDC (Markdown + frontmatter) |
|
|
344
363
|
|
|
364
|
+
## Claude Code Plugin
|
|
365
|
+
|
|
366
|
+
This project can be used as a Claude Code plugin, providing slash commands and a contextual skill directly inside Claude Code conversations.
|
|
367
|
+
|
|
368
|
+
### Slash Commands
|
|
369
|
+
|
|
370
|
+
| Command | Description |
|
|
371
|
+
|---------|-------------|
|
|
372
|
+
| `/sync` | Sync MCP server configs to other agents (with dry-run preview and confirmation) |
|
|
373
|
+
| `/sync-list` | List all MCP servers configured in Claude Code |
|
|
374
|
+
| `/sync-diff` | Compare MCP configs between Claude and other agents |
|
|
375
|
+
| `/sync-instructions` | Sync CLAUDE.md instruction files to other agent formats |
|
|
376
|
+
|
|
377
|
+
### Sync-Awareness Skill
|
|
378
|
+
|
|
379
|
+
The plugin includes a skill that automatically detects when you're editing MCP settings (`.claude.json`, `.mcp.json`) or `CLAUDE.md` files, and suggests syncing to other agents.
|
|
380
|
+
|
|
381
|
+
### Plugin Development
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
# Validate plugin structure
|
|
385
|
+
claude plugins validate /path/to/sync-agents-settings
|
|
386
|
+
|
|
387
|
+
# Test locally (loads plugin for this session only)
|
|
388
|
+
claude --plugin-dir /path/to/sync-agents-settings
|
|
389
|
+
```
|
|
390
|
+
|
|
345
391
|
## Limitations
|
|
346
392
|
|
|
347
393
|
- **OAuth servers** (e.g. Slack with `oauth.clientId`) are synced as URL-only — you'll need to authenticate manually in each CLI
|
package/bin/sync-agents.cjs
CHANGED
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync-diff
|
|
3
|
+
description: Compare MCP server configurations between Claude Code and other AI agents
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Compare which MCP servers exist in Claude Code vs other AI agents.
|
|
7
|
+
|
|
8
|
+
## Arguments
|
|
9
|
+
|
|
10
|
+
The user may pass target names: `/sync-diff gemini`
|
|
11
|
+
If no targets specified, compare all targets (gemini, codex, opencode, kiro, cursor).
|
|
12
|
+
|
|
13
|
+
## Execution Flow
|
|
14
|
+
|
|
15
|
+
1. Parse targets from user arguments. Run:
|
|
16
|
+
`npx sync-agents-settings diff --target <targets>`
|
|
17
|
+
|
|
18
|
+
2. Present the comparison for each target:
|
|
19
|
+
- **Shared** — servers that exist in both Claude and the target
|
|
20
|
+
- **Only in Claude** — servers that could be synced to the target
|
|
21
|
+
- **Only in target** — servers that exist in the target but not in Claude
|
|
22
|
+
|
|
23
|
+
3. If there are servers "Only in Claude", suggest: "Run `/sync` to sync these servers to the target agents."
|
|
24
|
+
|
|
25
|
+
## Error Handling
|
|
26
|
+
|
|
27
|
+
- If `npx` fails: suggest `npm install -g sync-agents-settings` as fallback.
|
|
28
|
+
- Note: Codex diff shows a message to use `codex mcp list` instead (CLI limitation).
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync-instructions
|
|
3
|
+
description: Sync CLAUDE.md instruction files to other AI agents (Gemini, Codex, OpenCode, Kiro, Cursor)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Sync CLAUDE.md instruction files from Claude Code format to other AI agent formats.
|
|
7
|
+
|
|
8
|
+
## Arguments
|
|
9
|
+
|
|
10
|
+
The user may pass target names: `/sync-instructions gemini codex`
|
|
11
|
+
If no targets specified, sync to all targets.
|
|
12
|
+
|
|
13
|
+
The user may also pass flags:
|
|
14
|
+
- `--no-backup` — skip creating backup of target instruction files
|
|
15
|
+
|
|
16
|
+
## Execution Flow
|
|
17
|
+
|
|
18
|
+
1. Ask the user which scope to sync:
|
|
19
|
+
- **Global** (`~/.claude/CLAUDE.md`) — syncs to agent-specific global instruction files
|
|
20
|
+
- **Local** (`./CLAUDE.md` in current directory) — syncs to project-level instruction files
|
|
21
|
+
- **Both** (default) — syncs both global and local
|
|
22
|
+
|
|
23
|
+
2. Parse targets from user arguments. Build the dry-run command:
|
|
24
|
+
`npx sync-agents-settings sync-instructions --dry-run [--global|--local] --target <targets>`
|
|
25
|
+
Omit `--global`/`--local` if syncing both (this is the CLI default).
|
|
26
|
+
Add `--no-backup` if the user specified it.
|
|
27
|
+
|
|
28
|
+
3. Run the dry-run command. Present what will be written:
|
|
29
|
+
- Which instruction files will be created or updated
|
|
30
|
+
- Which targets will be skipped (e.g., Cursor global is unsupported — uses SQLite)
|
|
31
|
+
|
|
32
|
+
4. If any target files already exist, ask the user what to do:
|
|
33
|
+
- **Overwrite** — replace the existing file entirely
|
|
34
|
+
- **Append** — add Claude instructions after the existing content
|
|
35
|
+
- **Skip** — leave the existing file untouched
|
|
36
|
+
|
|
37
|
+
5. Run the actual command. IMPORTANT: Always pass `--on-conflict <action>` to prevent the CLI from entering interactive mode (which does not work in Claude Code's bash execution):
|
|
38
|
+
`npx sync-agents-settings sync-instructions [--global|--local] --target <targets> --on-conflict <action>`
|
|
39
|
+
Add `--no-backup` if the user specified it.
|
|
40
|
+
|
|
41
|
+
6. Present the final results: which files were synced, appended, or skipped.
|
|
42
|
+
|
|
43
|
+
## Error Handling
|
|
44
|
+
|
|
45
|
+
- If `npx` fails: suggest `npm install -g sync-agents-settings` as fallback.
|
|
46
|
+
- If CLAUDE.md source file doesn't exist: the CLI will report it. Inform the user which file is missing.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync-list
|
|
3
|
+
description: List all MCP servers configured in Claude Code with transport type and source
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
List all MCP servers that Claude Code knows about.
|
|
7
|
+
|
|
8
|
+
## Execution Flow
|
|
9
|
+
|
|
10
|
+
1. Run: `npx sync-agents-settings list`
|
|
11
|
+
|
|
12
|
+
2. Present the output to the user in a readable format:
|
|
13
|
+
- Group servers by transport type (STDIO, HTTP, SSE)
|
|
14
|
+
- Show the source of each server (config = from ~/.claude.json, plugin = from Claude plugin)
|
|
15
|
+
- Highlight any servers that require OAuth authentication
|
|
16
|
+
|
|
17
|
+
## Error Handling
|
|
18
|
+
|
|
19
|
+
- If `npx` fails: suggest `npm install -g sync-agents-settings` as fallback.
|
package/commands/sync.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync
|
|
3
|
+
description: Sync MCP server configurations from Claude Code to other AI agents (Gemini, Codex, OpenCode, Kiro, Cursor)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Sync MCP server settings from Claude Code to other AI coding agents.
|
|
7
|
+
|
|
8
|
+
## Arguments
|
|
9
|
+
|
|
10
|
+
The user may pass target names after the command: `/sync gemini codex`
|
|
11
|
+
If no targets specified, sync to all targets (gemini, codex, opencode, kiro, cursor).
|
|
12
|
+
|
|
13
|
+
The user may also pass flags:
|
|
14
|
+
- `--skip-oauth` — skip MCP servers that require OAuth authentication
|
|
15
|
+
- `--no-backup` — skip creating backup of target config files
|
|
16
|
+
|
|
17
|
+
## Execution Flow
|
|
18
|
+
|
|
19
|
+
1. Parse targets from user arguments. Build the command:
|
|
20
|
+
`npx sync-agents-settings sync --dry-run --target <targets>`
|
|
21
|
+
Add `--skip-oauth` or `--no-backup` if the user specified them.
|
|
22
|
+
|
|
23
|
+
2. Run the dry-run command using bash. This previews what will change without writing files.
|
|
24
|
+
|
|
25
|
+
3. Present the results to the user:
|
|
26
|
+
- Servers that will be **added** to each target
|
|
27
|
+
- Servers that will be **skipped** (already exist or unsupported)
|
|
28
|
+
- If all servers are skipped, inform the user and stop here.
|
|
29
|
+
|
|
30
|
+
4. Ask the user: "Proceed with sync?"
|
|
31
|
+
|
|
32
|
+
5. If confirmed, run the same command without `--dry-run`:
|
|
33
|
+
`npx sync-agents-settings sync --target <targets>`
|
|
34
|
+
|
|
35
|
+
6. Present the final results.
|
|
36
|
+
|
|
37
|
+
## Error Handling
|
|
38
|
+
|
|
39
|
+
- If `npx` fails with "command not found" or network error: suggest `npm install -g sync-agents-settings` as fallback.
|
|
40
|
+
- If the CLI exits with non-zero code: show the stderr output and suggest checking that target agent directories exist.
|
package/dist/cli.js
CHANGED
|
@@ -14,7 +14,7 @@ const program = new Command();
|
|
|
14
14
|
program
|
|
15
15
|
.name("sync-agents")
|
|
16
16
|
.description("Sync Claude Code MCP settings to Gemini CLI / Codex CLI / OpenCode / Kiro CLI")
|
|
17
|
-
.version("0.
|
|
17
|
+
.version("0.3.0");
|
|
18
18
|
program
|
|
19
19
|
.command("sync")
|
|
20
20
|
.description("Sync MCP settings from Claude Code to other CLIs")
|
package/dist/instructions.js
CHANGED
|
@@ -169,7 +169,7 @@ export async function syncInstructions(pairs, options) {
|
|
|
169
169
|
result.skipped.push(`${pair.targetLabel} (${reason}: ${pair.source})`);
|
|
170
170
|
continue;
|
|
171
171
|
}
|
|
172
|
-
|
|
172
|
+
const content = pair.transform ? pair.transform(filtered) : filtered;
|
|
173
173
|
let action = "overwrite";
|
|
174
174
|
if (existsSync(pair.target)) {
|
|
175
175
|
if (options.force) {
|
package/dist/instructions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instruct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AAC;QAED,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;YACpB,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAErD,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;gBACxB,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBACpD,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,gBAAgB,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC;gBACzE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC,CAAC;gBAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACvC,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;gBACxB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACvC,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sync-agents-settings",
|
|
3
3
|
"packageManager": "pnpm@10.32.1",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"description": "Sync MCP server configurations and instruction files from Claude Code to Gemini CLI, Codex CLI, OpenCode, Kiro CLI, and Cursor",
|
|
6
6
|
"main": "dist/cli.js",
|
|
7
7
|
"bin": {
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
13
|
"bin",
|
|
14
|
-
"!dist/__tests__"
|
|
14
|
+
"!dist/__tests__",
|
|
15
|
+
".claude-plugin",
|
|
16
|
+
"commands",
|
|
17
|
+
"skills"
|
|
15
18
|
],
|
|
16
19
|
"scripts": {
|
|
17
20
|
"dev": "tsx src/cli.ts",
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync-awareness
|
|
3
|
+
description: "Suggest syncing MCP server configurations or instruction files to other AI coding agents when the user is editing MCP settings (.claude.json, .mcp.json) or modifying CLAUDE.md files. Available commands: /sync, /sync-list, /sync-diff, /sync-instructions."
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Sync Awareness
|
|
8
|
+
|
|
9
|
+
When you detect that the user is working with MCP server configurations or CLAUDE.md instruction files, suggest syncing to other AI agents.
|
|
10
|
+
|
|
11
|
+
## When to Suggest
|
|
12
|
+
|
|
13
|
+
### MCP Config Context
|
|
14
|
+
|
|
15
|
+
If the conversation involves editing or discussing `.claude.json` or `.mcp.json` files (specifically the `mcpServers` section):
|
|
16
|
+
|
|
17
|
+
> You're working with MCP server settings. Want to sync to other AI agents? Use `/sync` to sync, or `/sync-diff` to check differences first.
|
|
18
|
+
|
|
19
|
+
### CLAUDE.md Context
|
|
20
|
+
|
|
21
|
+
If the conversation involves editing or discussing `CLAUDE.md` files:
|
|
22
|
+
|
|
23
|
+
> You're updating CLAUDE.md. Want to sync instructions to other AI agents? Use `/sync-instructions` to sync.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **Suggest only once** per relevant context. Do not repeat the suggestion if the user has already seen it or dismissed it.
|
|
28
|
+
- **Never auto-execute** sync commands. Only suggest them.
|
|
29
|
+
- **Keep it brief** — one or two sentences maximum.
|
|
30
|
+
- **Do not suggest** if the user is already using one of the sync commands.
|
|
31
|
+
|
|
32
|
+
## Available Commands
|
|
33
|
+
|
|
34
|
+
- `/sync` — Sync MCP server configs to other agents
|
|
35
|
+
- `/sync-list` — List all MCP servers in Claude Code
|
|
36
|
+
- `/sync-diff` — Compare MCP configs between Claude and other agents
|
|
37
|
+
- `/sync-instructions` — Sync CLAUDE.md to other agent instruction formats
|