sync-agents-settings 0.4.0 â 0.4.2
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/marketplace.json +31 -0
- package/.claude-plugin/plugin.json +2 -2
- package/README.md +81 -32
- package/dist/backup.d.ts +1 -1
- package/dist/backup.js +7 -3
- package/dist/backup.js.map +1 -1
- package/dist/cli.js +51 -10
- package/dist/cli.js.map +1 -1
- package/dist/doctor.d.ts +1 -0
- package/dist/doctor.js +41 -29
- package/dist/doctor.js.map +1 -1
- package/dist/fix.d.ts +1 -0
- package/dist/fix.js +3 -0
- package/dist/fix.js.map +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +14 -0
- package/dist/instructions.js.map +1 -1
- package/dist/paths.d.ts +3 -0
- package/dist/paths.js +4 -0
- package/dist/paths.js.map +1 -1
- package/dist/reconcile.d.ts +1 -0
- package/dist/reconcile.js +11 -3
- package/dist/reconcile.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/writers/vibe.d.ts +7 -0
- package/dist/writers/vibe.js +87 -0
- package/dist/writers/vibe.js.map +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sync-agents-settings",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "Leoyang183"
|
|
5
|
+
},
|
|
6
|
+
"plugins": [
|
|
7
|
+
{
|
|
8
|
+
"name": "sync-agents-settings",
|
|
9
|
+
"source": "./",
|
|
10
|
+
"description": "Sync MCP server configs and instructions from Claude Code to other AI agents (Gemini, Codex, Cursor, Kiro, OpenCode, Kimi, Vibe, Aider)",
|
|
11
|
+
"version": "0.4.2",
|
|
12
|
+
"author": {
|
|
13
|
+
"name": "Leoyang183"
|
|
14
|
+
},
|
|
15
|
+
"repository": "https://github.com/Leoyang183/sync-agents-settings",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"keywords": ["mcp", "sync", "agents", "settings"],
|
|
18
|
+
"commands": [
|
|
19
|
+
"./commands/sync.md",
|
|
20
|
+
"./commands/sync-list.md",
|
|
21
|
+
"./commands/sync-diff.md",
|
|
22
|
+
"./commands/sync-instructions.md",
|
|
23
|
+
"./commands/sync-doctor.md",
|
|
24
|
+
"./commands/sync-validate.md",
|
|
25
|
+
"./commands/sync-reconcile.md",
|
|
26
|
+
"./commands/report-schema.md"
|
|
27
|
+
],
|
|
28
|
+
"skills": ["./skills/"]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sync-agents-settings",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "Sync MCP server configs and instructions from Claude Code to other AI agents (Gemini, Codex, Cursor, Kiro, OpenCode)",
|
|
3
|
+
"version": "0.4.2",
|
|
4
|
+
"description": "Sync MCP server configs and instructions from Claude Code to other AI agents (Gemini, Codex, Cursor, Kiro, OpenCode, Kimi, Vibe)",
|
|
5
5
|
"repository": "https://github.com/Leoyang183/sync-agents-settings",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Leoyang183"
|
package/README.md
CHANGED
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
[](https://prettier.io/)
|
|
12
12
|
[](https://github.com/Leoyang183/sync-agents-settings/actions/workflows/ci.yml)
|
|
13
13
|
|
|
14
|
-
Sync MCP server configurations and instruction files (CLAUDE.md) from **Claude Code** to **Gemini CLI**, **Codex CLI**, **OpenCode**, **Kiro CLI**, **Cursor**, **Kimi CLI**, and **Aider CLI**.
|
|
14
|
+
Sync MCP server configurations and instruction files (CLAUDE.md) from **Claude Code** to **Gemini CLI**, **Codex CLI**, **OpenCode**, **Kiro CLI**, **Cursor**, **Kimi CLI**, **Vibe CLI** (Mistral), and **Aider CLI**.
|
|
15
15
|
|
|
16
16
|
**README translations:** [đšđŧ įšéĢ䏿](docs/i18n/README.zh-tw.md) | [đ¨đŗ įŽäŊ䏿](docs/i18n/README.zh-cn.md) | [đ¯đĩ æĨæŦčĒ](docs/i18n/README.ja.md) | [đ°đˇ íęĩė´](docs/i18n/README.ko.md)
|
|
17
17
|
**Support matrix:** [CLI compatibility matrix](docs/compatibility-matrix.md)
|
|
18
18
|
|
|
19
19
|
## Why
|
|
20
20
|
|
|
21
|
-
If you use Claude Code as your primary AI coding agent but also switch between other agents (Gemini CLI, Codex CLI, OpenCode, Kiro, Cursor, Kimi CLI) to take advantage of their free tiers or different models, you know the pain â every tool has its own MCP config format, and setting them up one by one is tedious. Same goes for instruction files â CLAUDE.md, GEMINI.md, AGENTS.md all need the same content but in different formats.
|
|
21
|
+
If you use Claude Code as your primary AI coding agent but also switch between other agents (Gemini CLI, Codex CLI, OpenCode, Kiro, Cursor, Kimi CLI, Vibe CLI) to take advantage of their free tiers or different models, you know the pain â every tool has its own MCP config format, and setting them up one by one is tedious. Same goes for instruction files â CLAUDE.md, GEMINI.md, AGENTS.md all need the same content but in different formats.
|
|
22
22
|
|
|
23
23
|
This tool lets you configure MCP servers and write instructions once in Claude Code, then sync everywhere with a single command.
|
|
24
24
|
|
|
@@ -26,21 +26,24 @@ This tool lets you configure MCP servers and write instructions once in Claude C
|
|
|
26
26
|
|
|
27
27
|
### Option A: Claude Code Plugin (recommended)
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Install as a Claude Code plugin via marketplace:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
#
|
|
33
|
-
claude
|
|
32
|
+
# 1. Add the marketplace
|
|
33
|
+
claude plugin marketplace add Leoyang183/sync-agents-settings
|
|
34
34
|
|
|
35
|
-
#
|
|
36
|
-
|
|
35
|
+
# 2. Install the plugin
|
|
36
|
+
claude plugin install sync-agents-settings
|
|
37
|
+
|
|
38
|
+
# Then use slash commands in any conversation:
|
|
37
39
|
# /sync â sync MCP configs (with dry-run preview)
|
|
38
|
-
# /sync-
|
|
39
|
-
# /sync-
|
|
40
|
-
# /sync-
|
|
41
|
-
# /sync-
|
|
42
|
-
# /
|
|
43
|
-
# /sync-instructions
|
|
40
|
+
# /sync-list â list all MCP servers
|
|
41
|
+
# /sync-diff â compare configs between agents
|
|
42
|
+
# /sync-doctor â detect config drift and parse errors
|
|
43
|
+
# /sync-validate â validate schema and target capabilities
|
|
44
|
+
# /sync-reconcile â validate + detect drift + sync only missing
|
|
45
|
+
# /sync-instructions â sync CLAUDE.md to other agents
|
|
46
|
+
# /report-schema â print or write report JSON schema markdown
|
|
44
47
|
```
|
|
45
48
|
|
|
46
49
|
The plugin also includes a **sync-awareness skill** that automatically suggests syncing when you edit MCP settings or CLAUDE.md files.
|
|
@@ -84,6 +87,7 @@ sync-agents sync --target opencode
|
|
|
84
87
|
sync-agents sync --target kiro
|
|
85
88
|
sync-agents sync --target cursor
|
|
86
89
|
sync-agents sync --target kimi
|
|
90
|
+
sync-agents sync --target vibe
|
|
87
91
|
|
|
88
92
|
# Sync to Codex project-level config
|
|
89
93
|
sync-agents sync --target codex --codex-home ./my-project/.codex
|
|
@@ -172,7 +176,7 @@ sync-agents sync-instructions --global
|
|
|
172
176
|
sync-agents sync-instructions --local
|
|
173
177
|
|
|
174
178
|
# Sync to specific targets
|
|
175
|
-
sync-agents sync-instructions --target gemini codex kimi aider
|
|
179
|
+
sync-agents sync-instructions --target gemini codex kimi vibe aider
|
|
176
180
|
|
|
177
181
|
# Auto-overwrite without prompts (for CI)
|
|
178
182
|
sync-agents sync-instructions --on-conflict overwrite
|
|
@@ -209,7 +213,8 @@ pnpm test # Run tests
|
|
|
209
213
|
~/.claude/plugins/ âââ â
|
|
210
214
|
âââ Kiro Writer ââ ~/.kiro/settings/mcp.json
|
|
211
215
|
âââ Cursor Writer ââ ~/.cursor/mcp.json
|
|
212
|
-
|
|
216
|
+
âââ Kimi Writer ââ ~/.kimi/mcp.json
|
|
217
|
+
âââ Vibe Writer ââ ~/.vibe/config.toml
|
|
213
218
|
```
|
|
214
219
|
|
|
215
220
|
| Stage | Description |
|
|
@@ -221,6 +226,7 @@ pnpm test # Run tests
|
|
|
221
226
|
| **Kiro Writer** | Same format as Claude, `${VAR:-default}` â expanded |
|
|
222
227
|
| **Cursor Writer** | Same format as Claude, `${VAR:-default}` â expanded |
|
|
223
228
|
| **Kimi Writer** | Same format as Claude, `${VAR:-default}` â expanded |
|
|
229
|
+
| **Vibe Writer** | JSON â TOML `[[mcp_servers]]` array-of-tables, explicit `transport` field, `${VAR:-default}` â expanded |
|
|
224
230
|
|
|
225
231
|
### Instruction Sync (`sync-instructions`)
|
|
226
232
|
|
|
@@ -231,11 +237,12 @@ Syncs CLAUDE.md instruction files to each target's native format:
|
|
|
231
237
|
âââ ~/.codex/AGENTS.md (plain copy)
|
|
232
238
|
~/.claude/CLAUDE.md (+ ~/.claude/rules/*.md) ââ expand @imports âââŧââ ~/.config/opencode/AGENTS.md (plain copy)
|
|
233
239
|
âââ ~/.kimi/AGENTS.md (plain copy)
|
|
240
|
+
âââ ~/.vibe/AGENTS.md (plain copy)
|
|
234
241
|
âââ ~/.kiro/steering/claude-instructions.md (+ inclusion: always)
|
|
235
242
|
âââ â Cursor global not supported (SQLite)
|
|
236
243
|
|
|
237
244
|
âââ ./GEMINI.md (plain copy)
|
|
238
|
-
âââ ./AGENTS.md (Codex + OpenCode + Kimi share)
|
|
245
|
+
âââ ./AGENTS.md (Codex + OpenCode + Kimi + Vibe share)
|
|
239
246
|
./.claude/CLAUDE.md (fallback: ./CLAUDE.md) + ./.claude/rules/*.md ââ expand @imports âââŧââ .kiro/steering/claude-instructions.md (+ inclusion: always)
|
|
240
247
|
âââ .cursor/rules/claude-instructions.mdc (+ alwaysApply: true)
|
|
241
248
|
```
|
|
@@ -245,7 +252,8 @@ Syncs CLAUDE.md instruction files to each target's native format:
|
|
|
245
252
|
| Gemini | `~/.gemini/GEMINI.md` | `./GEMINI.md` | Plain copy (expand standalone `@import` lines) |
|
|
246
253
|
| Codex | `~/.codex/AGENTS.md` | `./AGENTS.md` | Plain copy (expand standalone `@import` lines) |
|
|
247
254
|
| OpenCode | `~/.config/opencode/AGENTS.md` | `./AGENTS.md` (shared with Codex) | Plain copy (expand standalone `@import` lines) |
|
|
248
|
-
| Kimi | `~/.kimi/AGENTS.md` | `./AGENTS.md` (shared with Codex/OpenCode) | Plain copy (expand standalone `@import` lines) |
|
|
255
|
+
| Kimi | `~/.kimi/AGENTS.md` | `./AGENTS.md` (shared with Codex/OpenCode/Vibe) | Plain copy (expand standalone `@import` lines) |
|
|
256
|
+
| Vibe | `~/.vibe/AGENTS.md` | `./AGENTS.md` (shared with Codex/OpenCode/Kimi) | Plain copy (expand standalone `@import` lines) |
|
|
249
257
|
| Aider | `~/.aider/CONVENTIONS.md` | `.aider/CONVENTIONS.md` | Plain copy + upsert `read` entry in `.aider.conf.yml` |
|
|
250
258
|
| Kiro | `~/.kiro/steering/claude-instructions.md` | `.kiro/steering/claude-instructions.md` | Add `inclusion: always` frontmatter |
|
|
251
259
|
| Cursor | Not supported (SQLite) | `.cursor/rules/claude-instructions.mdc` | Add `alwaysApply: true` frontmatter |
|
|
@@ -391,15 +399,38 @@ Writes to **`~/.kimi/mcp.json`** by default. Use `--kimi-home <path>` to sync to
|
|
|
391
399
|
|
|
392
400
|
Same format as Claude Code. `${VAR:-default}` syntax in URLs is auto-expanded during sync.
|
|
393
401
|
|
|
402
|
+
### Target: Vibe CLI (Mistral)
|
|
403
|
+
|
|
404
|
+
Writes to **`~/.vibe/config.toml`** by default. Use `--vibe-home <path>` to sync to a custom base directory (for example, project-level `.vibe/`).
|
|
405
|
+
|
|
406
|
+
Key format differences:
|
|
407
|
+
- Uses TOML `[[mcp_servers]]` (array of tables) â each entry has a `name` and explicit `transport` field
|
|
408
|
+
- Claude `"http"` â Vibe `"streamable-http"`, Claude `"sse"` â Vibe `"http"`
|
|
409
|
+
- `command` is a string (not array), `env` is a TOML sub-table
|
|
410
|
+
- `${VAR:-default}` syntax in URLs is auto-expanded during sync
|
|
411
|
+
|
|
412
|
+
```toml
|
|
413
|
+
[[mcp_servers]]
|
|
414
|
+
name = "context7"
|
|
415
|
+
transport = "stdio"
|
|
416
|
+
command = "npx"
|
|
417
|
+
args = ["-y", "@upstash/context7-mcp"]
|
|
418
|
+
|
|
419
|
+
[[mcp_servers]]
|
|
420
|
+
name = "supabase"
|
|
421
|
+
transport = "streamable-http"
|
|
422
|
+
url = "https://mcp.supabase.com/mcp"
|
|
423
|
+
```
|
|
424
|
+
|
|
394
425
|
## Transport Type Mapping
|
|
395
426
|
|
|
396
|
-
| Claude Code | Gemini CLI | Codex CLI | OpenCode | Kiro CLI | Cursor | Kimi CLI |
|
|
397
|
-
|
|
398
|
-
| `command` + `args` (stdio) | `command` + `args` | `command` + `args` | `type: "local"`, `command: [cmd, ...args]` | same as Claude | same as Claude | same as Claude |
|
|
399
|
-
| `type: "http"` + `url` | `httpUrl` | `url` | `type: "remote"`, `url` | same as Claude | same as Claude | same as Claude |
|
|
400
|
-
| `type: "sse"` + `url` | `url` | `url` | `type: "remote"`, `url` | same as Claude | same as Claude | same as Claude |
|
|
401
|
-
| `env` | `env` | `env` | `environment` | `env` | `env` | `env` |
|
|
402
|
-
| `oauth` | skipped | skipped | skipped | skipped | skipped | skipped |
|
|
427
|
+
| Claude Code | Gemini CLI | Codex CLI | OpenCode | Kiro CLI | Cursor | Kimi CLI | Vibe CLI |
|
|
428
|
+
|------------|-----------|----------|----------|----------|--------|----------|----------|
|
|
429
|
+
| `command` + `args` (stdio) | `command` + `args` | `command` + `args` | `type: "local"`, `command: [cmd, ...args]` | same as Claude | same as Claude | same as Claude | `transport: "stdio"`, `command` + `args` + `name` |
|
|
430
|
+
| `type: "http"` + `url` | `httpUrl` | `url` | `type: "remote"`, `url` | same as Claude | same as Claude | same as Claude | `transport: "streamable-http"`, `url` + `name` |
|
|
431
|
+
| `type: "sse"` + `url` | `url` | `url` | `type: "remote"`, `url` | same as Claude | same as Claude | same as Claude | `transport: "http"`, `url` + `name` |
|
|
432
|
+
| `env` | `env` | `env` | `environment` | `env` | `env` | `env` | `env` |
|
|
433
|
+
| `oauth` | skipped | skipped | skipped | skipped | skipped | skipped | skipped |
|
|
403
434
|
|
|
404
435
|
## Backup
|
|
405
436
|
|
|
@@ -422,8 +453,10 @@ Every sync automatically backs up all affected config files to `~/.sync-agents-b
|
|
|
422
453
|
â âââ mcp.json # â ~/.kiro/settings/mcp.json
|
|
423
454
|
âââ .cursor/
|
|
424
455
|
â âââ mcp.json # â ~/.cursor/mcp.json
|
|
425
|
-
|
|
426
|
-
|
|
456
|
+
âââ .kimi/
|
|
457
|
+
â âââ mcp.json # â ~/.kimi/mcp.json
|
|
458
|
+
âââ .vibe/
|
|
459
|
+
âââ config.toml # â ~/.vibe/config.toml
|
|
427
460
|
```
|
|
428
461
|
|
|
429
462
|
Use `--no-backup` to skip. Target directories that don't exist (CLI not installed) will be skipped with a warning, not created.
|
|
@@ -448,6 +481,8 @@ Use `--no-backup` to skip. Target directories that don't exist (CLI not installe
|
|
|
448
481
|
| Cursor (project) | `.cursor/mcp.json` in project root | JSON |
|
|
449
482
|
| Kimi CLI (global) | `~/.kimi/mcp.json` | JSON |
|
|
450
483
|
| Kimi CLI (project) | `.kimi/mcp.json` (use `--kimi-home ./.kimi`) | JSON |
|
|
484
|
+
| Vibe CLI (global) | `~/.vibe/config.toml` | TOML |
|
|
485
|
+
| Vibe CLI (project) | `.vibe/config.toml` (use `--vibe-home ./.vibe`) | TOML |
|
|
451
486
|
|
|
452
487
|
### Instruction Files
|
|
453
488
|
|
|
@@ -458,12 +493,25 @@ Use `--no-backup` to skip. Target directories that don't exist (CLI not installe
|
|
|
458
493
|
| Codex CLI | `~/.codex/AGENTS.md` | `./AGENTS.md` | Markdown |
|
|
459
494
|
| OpenCode | `~/.config/opencode/AGENTS.md` | `./AGENTS.md` | Markdown |
|
|
460
495
|
| Kimi CLI | `~/.kimi/AGENTS.md` | `./AGENTS.md` | Markdown |
|
|
496
|
+
| Vibe CLI | `~/.vibe/AGENTS.md` | `./AGENTS.md` | Markdown |
|
|
461
497
|
| Kiro CLI | `~/.kiro/steering/claude-instructions.md` | `.kiro/steering/claude-instructions.md` | Markdown + frontmatter |
|
|
462
498
|
| Cursor | Not supported (SQLite) | `.cursor/rules/claude-instructions.mdc` | MDC (Markdown + frontmatter) |
|
|
463
499
|
|
|
464
500
|
## Claude Code Plugin
|
|
465
501
|
|
|
466
|
-
This project
|
|
502
|
+
This project is both a Claude Code **plugin** and **marketplace**, providing slash commands and a contextual skill directly inside Claude Code conversations.
|
|
503
|
+
|
|
504
|
+
### Installation
|
|
505
|
+
|
|
506
|
+
```bash
|
|
507
|
+
# From GitHub (remote â clones the repo)
|
|
508
|
+
claude plugin marketplace add Leoyang183/sync-agents-settings
|
|
509
|
+
claude plugin install sync-agents-settings
|
|
510
|
+
|
|
511
|
+
# Or from local path (symlink â reflects local changes instantly)
|
|
512
|
+
claude plugin marketplace add /path/to/sync-agents-settings
|
|
513
|
+
claude plugin install sync-agents-settings
|
|
514
|
+
```
|
|
467
515
|
|
|
468
516
|
### Slash Commands
|
|
469
517
|
|
|
@@ -472,7 +520,11 @@ This project can be used as a Claude Code plugin, providing slash commands and a
|
|
|
472
520
|
| `/sync` | Sync MCP server configs to other agents (with dry-run preview and confirmation) |
|
|
473
521
|
| `/sync-list` | List all MCP servers configured in Claude Code |
|
|
474
522
|
| `/sync-diff` | Compare MCP configs between Claude and other agents |
|
|
523
|
+
| `/sync-doctor` | Detect MCP config drift between Claude and targets |
|
|
524
|
+
| `/sync-validate` | Validate MCP schema and target capability compatibility |
|
|
525
|
+
| `/sync-reconcile` | Validate + detect drift + sync only missing servers |
|
|
475
526
|
| `/sync-instructions` | Sync CLAUDE.md instruction files to other agent formats |
|
|
527
|
+
| `/report-schema` | Print or write report JSON schema markdown |
|
|
476
528
|
|
|
477
529
|
### Sync-Awareness Skill
|
|
478
530
|
|
|
@@ -481,11 +533,8 @@ The plugin includes a skill that automatically detects when you're editing MCP s
|
|
|
481
533
|
### Plugin Development
|
|
482
534
|
|
|
483
535
|
```bash
|
|
484
|
-
# Validate plugin structure
|
|
485
|
-
claude
|
|
486
|
-
|
|
487
|
-
# Test locally (loads plugin for this session only)
|
|
488
|
-
claude --plugin-dir /path/to/sync-agents-settings
|
|
536
|
+
# Validate plugin/marketplace structure
|
|
537
|
+
claude plugin validate /path/to/sync-agents-settings
|
|
489
538
|
```
|
|
490
539
|
|
|
491
540
|
## Limitations
|
package/dist/backup.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function createBackup(filePaths: string[]): string;
|
|
2
|
-
export declare function getFilesToBackup(targets: string[], codexConfigPath?: string, kimiConfigPath?: string): string[];
|
|
2
|
+
export declare function getFilesToBackup(targets: string[], codexConfigPath?: string, kimiConfigPath?: string, vibeConfigPath?: string): string[];
|
package/dist/backup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, copyFileSync } from "node:fs";
|
|
1
|
+
import { existsSync, mkdirSync, copyFileSync, chmodSync } from "node:fs";
|
|
2
2
|
import { join, dirname } from "node:path";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { PATHS } from "./paths.js";
|
|
@@ -12,8 +12,9 @@ export function createBackup(filePaths) {
|
|
|
12
12
|
// Preserve original path structure relative to home
|
|
13
13
|
const relativePath = filePath.startsWith(home) ? filePath.slice(home.length + 1) : filePath;
|
|
14
14
|
const dest = join(backupDir, relativePath);
|
|
15
|
-
mkdirSync(dirname(dest), { recursive: true });
|
|
15
|
+
mkdirSync(dirname(dest), { recursive: true, mode: 0o700 });
|
|
16
16
|
copyFileSync(filePath, dest);
|
|
17
|
+
chmodSync(dest, 0o600);
|
|
17
18
|
backedUp++;
|
|
18
19
|
console.log(` Backed up: ${filePath}`);
|
|
19
20
|
}
|
|
@@ -23,7 +24,7 @@ export function createBackup(filePaths) {
|
|
|
23
24
|
}
|
|
24
25
|
return backupDir;
|
|
25
26
|
}
|
|
26
|
-
export function getFilesToBackup(targets, codexConfigPath, kimiConfigPath) {
|
|
27
|
+
export function getFilesToBackup(targets, codexConfigPath, kimiConfigPath, vibeConfigPath) {
|
|
27
28
|
const files = [PATHS.claudeJson, PATHS.claudeSettings];
|
|
28
29
|
if (targets.includes("gemini")) {
|
|
29
30
|
files.push(PATHS.geminiSettings);
|
|
@@ -43,6 +44,9 @@ export function getFilesToBackup(targets, codexConfigPath, kimiConfigPath) {
|
|
|
43
44
|
if (targets.includes("cursor")) {
|
|
44
45
|
files.push(PATHS.cursorMcpConfig);
|
|
45
46
|
}
|
|
47
|
+
if (targets.includes("vibe")) {
|
|
48
|
+
files.push(vibeConfigPath ?? PATHS.vibeConfig);
|
|
49
|
+
}
|
|
46
50
|
return files;
|
|
47
51
|
}
|
|
48
52
|
//# sourceMappingURL=backup.js.map
|
package/dist/backup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backup.js","sourceRoot":"","sources":["../src/backup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"backup.js","sourceRoot":"","sources":["../src/backup.ts"],"names":[],"mappings":"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"}
|
package/dist/cli.js
CHANGED
|
@@ -9,6 +9,7 @@ import { writeToOpenCode } from "./writers/opencode.js";
|
|
|
9
9
|
import { writeToKiro } from "./writers/kiro.js";
|
|
10
10
|
import { writeToCursor } from "./writers/cursor.js";
|
|
11
11
|
import { writeToKimi, resolveKimiMcpConfigPath } from "./writers/kimi.js";
|
|
12
|
+
import { writeToVibe, resolveVibeConfigPath } from "./writers/vibe.js";
|
|
12
13
|
import { createBackup, getFilesToBackup } from "./backup.js";
|
|
13
14
|
import { PATHS } from "./paths.js";
|
|
14
15
|
import { runDoctor } from "./doctor.js";
|
|
@@ -24,17 +25,18 @@ import { syncInstructions, getGlobalSyncPairs, getLocalSyncPairs, getUnsupported
|
|
|
24
25
|
const program = new Command();
|
|
25
26
|
program
|
|
26
27
|
.name("sync-agents")
|
|
27
|
-
.description("Sync Claude Code MCP settings to Gemini CLI / Codex CLI / OpenCode / Kiro CLI")
|
|
28
|
-
.version("0.
|
|
28
|
+
.description("Sync Claude Code MCP settings to Gemini CLI / Codex CLI / OpenCode / Kiro CLI / Vibe CLI")
|
|
29
|
+
.version("0.4.2");
|
|
29
30
|
program
|
|
30
31
|
.command("sync")
|
|
31
32
|
.description("Sync MCP settings from Claude Code to other CLIs")
|
|
32
|
-
.option("-t, --target <targets...>", "sync targets (gemini, codex, opencode, kiro, cursor, kimi, aider)", ["gemini", "codex", "opencode", "kiro", "cursor", "kimi", "aider"])
|
|
33
|
+
.option("-t, --target <targets...>", "sync targets (gemini, codex, opencode, kiro, cursor, kimi, vibe, aider)", ["gemini", "codex", "opencode", "kiro", "cursor", "kimi", "vibe", "aider"])
|
|
33
34
|
.option("--dry-run", "preview mode, no files will be written", false)
|
|
34
35
|
.option("--no-backup", "skip backup")
|
|
35
36
|
.option("--skip-oauth", "skip MCP servers that require OAuth", false)
|
|
36
37
|
.option("--codex-home <path>", "Codex config directory (default: ~/.codex, or specify project-level .codex/)")
|
|
37
38
|
.option("--kimi-home <path>", "Kimi config directory (default: ~/.kimi, or specify project-level .kimi/)")
|
|
39
|
+
.option("--vibe-home <path>", "Vibe config directory (default: ~/.vibe, or specify project-level .vibe/)")
|
|
38
40
|
.option("--report <format>", "output format: text or json", "text")
|
|
39
41
|
.option("-v, --verbose", "show detailed output", false)
|
|
40
42
|
.action(async (opts) => {
|
|
@@ -45,6 +47,7 @@ program
|
|
|
45
47
|
const skipOAuth = opts.skipOauth;
|
|
46
48
|
const codexHome = opts.codexHome;
|
|
47
49
|
const kimiHome = opts.kimiHome;
|
|
50
|
+
const vibeHome = opts.vibeHome;
|
|
48
51
|
const reportFormat = opts.report;
|
|
49
52
|
const jsonReport = reportFormat === "json";
|
|
50
53
|
if (reportFormat !== "text" && reportFormat !== "json") {
|
|
@@ -85,11 +88,12 @@ program
|
|
|
85
88
|
// 2. Backup
|
|
86
89
|
const codexConfigPath = resolveCodexConfigPath(codexHome);
|
|
87
90
|
const kimiConfigPath = resolveKimiMcpConfigPath(kimiHome);
|
|
91
|
+
const vibeConfigPath = resolveVibeConfigPath(vibeHome);
|
|
88
92
|
if (!skipBackup && !dryRun) {
|
|
89
93
|
if (!jsonReport) {
|
|
90
94
|
console.log("đž Backing up config files...");
|
|
91
95
|
}
|
|
92
|
-
const backupDir = createBackup(getFilesToBackup(targets, codexConfigPath, kimiConfigPath));
|
|
96
|
+
const backupDir = createBackup(getFilesToBackup(targets, codexConfigPath, kimiConfigPath, vibeConfigPath));
|
|
93
97
|
if (!jsonReport) {
|
|
94
98
|
console.log(` Backup directory: ${backupDir}\n`);
|
|
95
99
|
}
|
|
@@ -154,6 +158,19 @@ program
|
|
|
154
158
|
printResult(result.added, result.skipped);
|
|
155
159
|
}
|
|
156
160
|
}
|
|
161
|
+
else if (target === "vibe") {
|
|
162
|
+
const result = writeToVibe(servers, dryRun, vibeHome);
|
|
163
|
+
targetReports.push({
|
|
164
|
+
target,
|
|
165
|
+
added: result.added,
|
|
166
|
+
skipped: result.skipped,
|
|
167
|
+
configPath: result.configPath,
|
|
168
|
+
});
|
|
169
|
+
if (!jsonReport) {
|
|
170
|
+
console.log(` Target: ${result.configPath}`);
|
|
171
|
+
printResult(result.added, result.skipped);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
157
174
|
if (!jsonReport) {
|
|
158
175
|
console.log();
|
|
159
176
|
}
|
|
@@ -214,7 +231,7 @@ program
|
|
|
214
231
|
program
|
|
215
232
|
.command("diff")
|
|
216
233
|
.description("Compare MCP settings between Claude Code and other CLIs")
|
|
217
|
-
.option("-t, --target <targets...>", "comparison targets (gemini, codex, opencode, kiro, cursor, kimi)", ["gemini", "codex", "opencode", "kiro", "cursor", "kimi"])
|
|
234
|
+
.option("-t, --target <targets...>", "comparison targets (gemini, codex, opencode, kiro, cursor, kimi, vibe)", ["gemini", "codex", "opencode", "kiro", "cursor", "kimi", "vibe"])
|
|
218
235
|
.option("--kimi-home <path>", "Kimi config directory (default: ~/.kimi, or specify project-level .kimi/)")
|
|
219
236
|
.option("--report <format>", "output format: text or json", "text")
|
|
220
237
|
.action((opts) => {
|
|
@@ -254,6 +271,19 @@ program
|
|
|
254
271
|
note: codexNote,
|
|
255
272
|
});
|
|
256
273
|
}
|
|
274
|
+
else if (target === "vibe") {
|
|
275
|
+
const vibeNote = "use 'vibe' to view (TOML array format)";
|
|
276
|
+
if (!jsonReport) {
|
|
277
|
+
console.log(` Vibe: ${vibeNote}`);
|
|
278
|
+
}
|
|
279
|
+
targetReports.push({
|
|
280
|
+
target: "vibe",
|
|
281
|
+
shared: [],
|
|
282
|
+
onlyInSource: [],
|
|
283
|
+
onlyInTarget: [],
|
|
284
|
+
note: vibeNote,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
257
287
|
else if (Object.hasOwn(diffConfigs, target)) {
|
|
258
288
|
const { path, key } = diffConfigs[target];
|
|
259
289
|
const names = readExistingServerNames(path, key);
|
|
@@ -280,7 +310,7 @@ program
|
|
|
280
310
|
program
|
|
281
311
|
.command("doctor")
|
|
282
312
|
.description("Detect MCP config drift between Claude Code and target CLIs")
|
|
283
|
-
.option("-t, --target <targets...>", "doctor targets (gemini, codex, opencode, kiro, cursor, kimi)", ["gemini", "codex", "opencode", "kiro", "cursor", "kimi"])
|
|
313
|
+
.option("-t, --target <targets...>", "doctor targets (gemini, codex, opencode, kiro, cursor, kimi, vibe)", ["gemini", "codex", "opencode", "kiro", "cursor", "kimi", "vibe"])
|
|
284
314
|
.option("--skip-oauth", "ignore OAuth-only Claude servers", false)
|
|
285
315
|
.option("--fix", "auto-run reconcile when drift is detected", false)
|
|
286
316
|
.option("--dry-run", "when used with --fix, preview without writing", false)
|
|
@@ -288,6 +318,7 @@ program
|
|
|
288
318
|
.option("--report <format>", "output format: text or json", "text")
|
|
289
319
|
.option("--codex-home <path>", "Codex config directory (default: ~/.codex, or specify project-level .codex/)")
|
|
290
320
|
.option("--kimi-home <path>", "Kimi config directory (default: ~/.kimi, or specify project-level .kimi/)")
|
|
321
|
+
.option("--vibe-home <path>", "Vibe config directory (default: ~/.vibe, or specify project-level .vibe/)")
|
|
291
322
|
.action((opts) => {
|
|
292
323
|
const targets = opts.target;
|
|
293
324
|
const skipOAuth = opts.skipOauth;
|
|
@@ -297,6 +328,7 @@ program
|
|
|
297
328
|
const reportFormat = opts.report;
|
|
298
329
|
const codexHome = opts.codexHome;
|
|
299
330
|
const kimiHome = opts.kimiHome;
|
|
331
|
+
const vibeHome = opts.vibeHome;
|
|
300
332
|
const jsonReport = reportFormat === "json";
|
|
301
333
|
if (reportFormat !== "text" && reportFormat !== "json") {
|
|
302
334
|
console.error(`Invalid --report: ${reportFormat}. Use "text" or "json".`);
|
|
@@ -315,6 +347,7 @@ program
|
|
|
315
347
|
skipOAuth,
|
|
316
348
|
codexHome,
|
|
317
349
|
kimiHome,
|
|
350
|
+
vibeHome,
|
|
318
351
|
});
|
|
319
352
|
if (fixed.status === "failed") {
|
|
320
353
|
if (fixed.reason === "doctor_parse") {
|
|
@@ -335,7 +368,7 @@ program
|
|
|
335
368
|
console.log("â
Auto-fix completed via reconcile.");
|
|
336
369
|
return;
|
|
337
370
|
}
|
|
338
|
-
const report = runDoctor(targets, { skipOAuth, codexHome, kimiHome });
|
|
371
|
+
const report = runDoctor(targets, { skipOAuth, codexHome, kimiHome, vibeHome });
|
|
339
372
|
if (jsonReport) {
|
|
340
373
|
console.log(formatDoctorReport(report));
|
|
341
374
|
if (report.hasErrors)
|
|
@@ -381,7 +414,7 @@ program
|
|
|
381
414
|
program
|
|
382
415
|
.command("validate")
|
|
383
416
|
.description("Validate MCP schema and target capability compatibility")
|
|
384
|
-
.option("-t, --target <targets...>", "validation targets (gemini, codex, opencode, kiro, cursor, kimi)", ["gemini", "codex", "opencode", "kiro", "cursor", "kimi"])
|
|
417
|
+
.option("-t, --target <targets...>", "validation targets (gemini, codex, opencode, kiro, cursor, kimi, vibe)", ["gemini", "codex", "opencode", "kiro", "cursor", "kimi", "vibe"])
|
|
385
418
|
.option("--skip-oauth", "ignore OAuth-only Claude servers", false)
|
|
386
419
|
.option("--fix", "auto-run reconcile after validation passes", false)
|
|
387
420
|
.option("--dry-run", "when used with --fix, preview without writing", false)
|
|
@@ -389,6 +422,7 @@ program
|
|
|
389
422
|
.option("--report <format>", "output format: text or json", "text")
|
|
390
423
|
.option("--codex-home <path>", "Codex config directory (used by --fix for reconcile)")
|
|
391
424
|
.option("--kimi-home <path>", "Kimi config directory (used by --fix for reconcile)")
|
|
425
|
+
.option("--vibe-home <path>", "Vibe config directory (used by --fix for reconcile)")
|
|
392
426
|
.action((opts) => {
|
|
393
427
|
const targets = opts.target;
|
|
394
428
|
const skipOAuth = opts.skipOauth;
|
|
@@ -398,6 +432,7 @@ program
|
|
|
398
432
|
const reportFormat = opts.report;
|
|
399
433
|
const codexHome = opts.codexHome;
|
|
400
434
|
const kimiHome = opts.kimiHome;
|
|
435
|
+
const vibeHome = opts.vibeHome;
|
|
401
436
|
const jsonReport = reportFormat === "json";
|
|
402
437
|
if (reportFormat !== "text" && reportFormat !== "json") {
|
|
403
438
|
console.error(`Invalid --report: ${reportFormat}. Use "text" or "json".`);
|
|
@@ -453,6 +488,7 @@ program
|
|
|
453
488
|
skipOAuth,
|
|
454
489
|
codexHome,
|
|
455
490
|
kimiHome,
|
|
491
|
+
vibeHome,
|
|
456
492
|
});
|
|
457
493
|
if (fixed.status === "failed") {
|
|
458
494
|
if (fixed.reason === "doctor_parse") {
|
|
@@ -476,12 +512,13 @@ program
|
|
|
476
512
|
program
|
|
477
513
|
.command("reconcile")
|
|
478
514
|
.description("Validate + detect drift + sync only missing MCP servers")
|
|
479
|
-
.option("-t, --target <targets...>", "reconcile targets (gemini, codex, opencode, kiro, cursor, kimi)", ["gemini", "codex", "opencode", "kiro", "cursor", "kimi"])
|
|
515
|
+
.option("-t, --target <targets...>", "reconcile targets (gemini, codex, opencode, kiro, cursor, kimi, vibe)", ["gemini", "codex", "opencode", "kiro", "cursor", "kimi", "vibe"])
|
|
480
516
|
.option("--dry-run", "preview mode, no files will be written", false)
|
|
481
517
|
.option("--no-backup", "skip backup")
|
|
482
518
|
.option("--skip-oauth", "ignore OAuth-only Claude servers", false)
|
|
483
519
|
.option("--codex-home <path>", "Codex config directory (default: ~/.codex, or specify project-level .codex/)")
|
|
484
520
|
.option("--kimi-home <path>", "Kimi config directory (default: ~/.kimi, or specify project-level .kimi/)")
|
|
521
|
+
.option("--vibe-home <path>", "Vibe config directory (default: ~/.vibe, or specify project-level .vibe/)")
|
|
485
522
|
.option("--report <format>", "output format: text or json", "text")
|
|
486
523
|
.action((opts) => {
|
|
487
524
|
const targets = opts.target;
|
|
@@ -490,6 +527,7 @@ program
|
|
|
490
527
|
const skipOAuth = opts.skipOauth;
|
|
491
528
|
const codexHome = opts.codexHome;
|
|
492
529
|
const kimiHome = opts.kimiHome;
|
|
530
|
+
const vibeHome = opts.vibeHome;
|
|
493
531
|
const reportFormat = opts.report;
|
|
494
532
|
const jsonReport = reportFormat === "json";
|
|
495
533
|
if (reportFormat !== "text" && reportFormat !== "json") {
|
|
@@ -505,6 +543,7 @@ program
|
|
|
505
543
|
skipOAuth,
|
|
506
544
|
codexHome,
|
|
507
545
|
kimiHome,
|
|
546
|
+
vibeHome,
|
|
508
547
|
});
|
|
509
548
|
if (jsonReport) {
|
|
510
549
|
console.log(formatReconcileReport(result));
|
|
@@ -560,7 +599,7 @@ program
|
|
|
560
599
|
program
|
|
561
600
|
.command("sync-instructions")
|
|
562
601
|
.description("Sync CLAUDE.md instruction files to other AI agent formats")
|
|
563
|
-
.option("-t, --target <targets...>", "sync targets (gemini, codex, opencode, kiro, cursor, kimi)", ["gemini", "codex", "opencode", "kiro", "cursor", "kimi"])
|
|
602
|
+
.option("-t, --target <targets...>", "sync targets (gemini, codex, opencode, kiro, cursor, kimi, vibe)", ["gemini", "codex", "opencode", "kiro", "cursor", "kimi", "vibe"])
|
|
564
603
|
.option("--global", "sync global config (~/.claude/CLAUDE.md)", false)
|
|
565
604
|
.option("--local", "sync project-level CLAUDE.md in current directory (prefers ./.claude/CLAUDE.md, falls back to ./CLAUDE.md)", false)
|
|
566
605
|
.option("--dry-run", "preview mode, no files will be written", false)
|
|
@@ -732,6 +771,8 @@ function getTargetLabel(target) {
|
|
|
732
771
|
return "OpenCode";
|
|
733
772
|
if (target === "kimi")
|
|
734
773
|
return "Kimi";
|
|
774
|
+
if (target === "vibe")
|
|
775
|
+
return "Vibe";
|
|
735
776
|
return target.toUpperCase();
|
|
736
777
|
}
|
|
737
778
|
program.parse();
|