mcpick 0.0.24 → 0.0.26
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/CHANGELOG.md +28 -0
- package/README.md +8 -2
- package/dist/{add-Qzd8i-5k.js → add-DwUPxD5U.js} +21 -35
- package/dist/{add-json-DGmsjB0O.js → add-json-Dk3C8QSR.js} +18 -34
- package/dist/atomic-write-9pfXia-x.js +22 -0
- package/dist/{backup-C7fvikFw.js → backup-Ber7st-_.js} +4 -5
- package/dist/{cache-D3jjh5dD.js → cache-BVNAOxqk.js} +4 -3
- package/dist/{cli-CZOlaqoZ.js → cli-Dfein2li.js} +22 -22
- package/dist/{clients-Bh93TGP4.js → clients-C1mWlnsn.js} +3 -3
- package/dist/{clone-MI8jJhTz.js → clone-BE904ik7.js} +3 -6
- package/dist/{dev-51esdZG9.js → dev-BW_2JDPM.js} +5 -6
- package/dist/{disable-csYAn2Vk.js → disable-CVwuJLhT.js} +18 -37
- package/dist/{enable-B5GbmhL-.js → enable-BEi8TUd1.js} +18 -37
- package/dist/{get-DacRZmwv.js → get-eDOm6sRK.js} +3 -3
- package/dist/{hooks-C_x49qap.js → hooks-DzGBYYId.js} +4 -3
- package/dist/index.js +752 -645
- package/dist/{list-BeBtsiae.js → list-CvpW_mNZ.js} +3 -5
- package/dist/{marketplace-BDC2YtvT.js → marketplace-BKGJ3UGr.js} +4 -4
- package/dist/mutation-BBMIFB8H.js +19 -0
- package/dist/{output-HtT5HCof.js → output-DGPi2IWN.js} +2 -2
- package/dist/{plugin-cache-DmLbh89d.js → plugin-cache-Dj-lS1mA.js} +177 -22
- package/dist/{plugins-Bkw-SKkZ.js → plugins-elIQYM38.js} +4 -4
- package/dist/profile-NVbTnJKI.js +163 -0
- package/dist/{reload-Bl1mYK1I.js → reload-BkVtWaf0.js} +2 -2
- package/dist/{remove-BSHgva79.js → remove-BC2vomi_.js} +18 -33
- package/dist/{reset-project-choices-BNLus9J9.js → reset-project-choices-DhJsWQx2.js} +3 -3
- package/dist/{restore-YisgARhc.js → restore-CeYSOFt8.js} +3 -5
- package/dist/{rollback-GR1RkpXW.js → rollback-g-WX6b3o.js} +3 -3
- package/dist/safe-apply-B5flt8QC.js +185 -0
- package/dist/{skills-rDTDqqZA.js → skills-zuQ5kCL1.js} +3 -3
- package/package.json +6 -6
- package/pnpm-workspace.yaml +1 -0
- package/dist/config-DE58Fik_.js +0 -176
- package/dist/dry-run-XQ32fxPT.js +0 -20
- package/dist/paths-BPISiJi4.js +0 -124
- package/dist/profile-DwJTVXiz.js +0 -161
- package/dist/redact-wBMtzbno.js +0 -88
- package/dist/rolldown-runtime-CiIaOW0V.js +0 -13
- package/dist/validation-xMlbgGCF.js +0 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# mcpick
|
|
2
2
|
|
|
3
|
+
## 0.0.26
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a991d53: Fix OpenCode MCP config serialization to match schema for
|
|
8
|
+
local, remote, environment, and profile writes.
|
|
9
|
+
|
|
10
|
+
## 0.0.25
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- dd735be: Migrate server registry storage to portable versioned MCP
|
|
15
|
+
server entries with legacy compatibility.
|
|
16
|
+
- 0a6cc35: Add subprocess integration coverage for built CLI routing,
|
|
17
|
+
mutations, rollback, errors, and redaction.
|
|
18
|
+
- efed902: Remove unsupported dry-run functionality and reframe
|
|
19
|
+
mutation safety around observability and rollback metadata.
|
|
20
|
+
- 6adad04: Preserve disabled plugin hooks during cache clear by
|
|
21
|
+
re-disabling restored marketplace hook definitions.
|
|
22
|
+
- 6ff5070: Align TUI client picker defaults with reverse-sorted
|
|
23
|
+
visible client ordering across flows.
|
|
24
|
+
- d723e32: Improve mutation output with config paths, backup metadata,
|
|
25
|
+
and structured adapter write results.
|
|
26
|
+
- 9f366cf: Save and apply portable MCP profiles across client
|
|
27
|
+
adapters.
|
|
28
|
+
- b2131bd: Align interactive profile load and save flows with
|
|
29
|
+
adapter-backed portable client profile services.
|
|
30
|
+
|
|
3
31
|
## 0.0.24
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -141,14 +141,20 @@ npx mcpick cache refresh
|
|
|
141
141
|
|
|
142
142
|
## Profiles and backups
|
|
143
143
|
|
|
144
|
-
Profiles
|
|
145
|
-
|
|
144
|
+
Profiles are portable MCP server snapshots. Claude Code plugin state
|
|
145
|
+
is preserved as optional Claude-specific profile metadata.
|
|
146
146
|
|
|
147
147
|
```bash
|
|
148
|
+
# Legacy Claude Code shortcuts still work
|
|
148
149
|
npx mcpick --profile database
|
|
149
150
|
npx mcpick --save-profile mysetup
|
|
150
151
|
npx mcpick --list-profiles
|
|
151
152
|
|
|
153
|
+
# Save/load profiles for a specific MCP client
|
|
154
|
+
npx mcpick profile save work --client vscode --scope project
|
|
155
|
+
npx mcpick profile load work --client opencode --scope project
|
|
156
|
+
npx mcpick profile load work --client pi --scope user
|
|
157
|
+
|
|
152
158
|
npx mcpick backup
|
|
153
159
|
npx mcpick restore [file]
|
|
154
160
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as output, t as error } from "./output-
|
|
4
|
-
import { t as print_dry_run } from "./dry-run-XQ32fxPT.js";
|
|
1
|
+
import { $ as validate_mcp_server, D as add_server_to_registry, F as get_client_adapter, N as add_client_server, R as resolve_client_location, c as add_mcp_via_cli } from "./index.js";
|
|
2
|
+
import { n as print_mutation_details, t as claude_mutation_context } from "./mutation-BBMIFB8H.js";
|
|
3
|
+
import { n as output, t as error } from "./output-DGPi2IWN.js";
|
|
5
4
|
import { defineCommand } from "citty";
|
|
6
5
|
//#region src/cli/commands/add.ts
|
|
7
6
|
var add_default = defineCommand({
|
|
@@ -57,11 +56,6 @@ var add_default = defineCommand({
|
|
|
57
56
|
type: "string",
|
|
58
57
|
description: "Exact config path when a client has multiple matching locations"
|
|
59
58
|
},
|
|
60
|
-
dryRun: {
|
|
61
|
-
type: "boolean",
|
|
62
|
-
description: "Preview changes without writing",
|
|
63
|
-
default: false
|
|
64
|
-
},
|
|
65
59
|
json: {
|
|
66
60
|
type: "boolean",
|
|
67
61
|
description: "Output as JSON",
|
|
@@ -78,7 +72,7 @@ var add_default = defineCommand({
|
|
|
78
72
|
const add_args = args;
|
|
79
73
|
const portable = build_portable_server(add_args, transport);
|
|
80
74
|
if (add_args.client && add_args.client !== "claude-code") {
|
|
81
|
-
await add_to_client(add_args.client, portable, add_args.scope, add_args.location, add_args.json
|
|
75
|
+
await add_to_client(add_args.client, portable, add_args.scope, add_args.location, add_args.json);
|
|
82
76
|
return;
|
|
83
77
|
}
|
|
84
78
|
const scope = add_args.scope || "local";
|
|
@@ -103,27 +97,22 @@ var add_default = defineCommand({
|
|
|
103
97
|
} catch (err) {
|
|
104
98
|
error(`Invalid server config: ${err instanceof Error ? err.message : "validation failed"}`);
|
|
105
99
|
}
|
|
106
|
-
if (add_args.dryRun) {
|
|
107
|
-
print_dry_run(build_command_preview({
|
|
108
|
-
operation: "add-server",
|
|
109
|
-
client: "claude-code",
|
|
110
|
-
scope,
|
|
111
|
-
location: "Claude Code CLI + mcpick registry",
|
|
112
|
-
command: ["claude", ...build_add_args(server, scope)]
|
|
113
|
-
}), add_args.json);
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
100
|
await add_server_to_registry(server);
|
|
117
101
|
const result = await add_mcp_via_cli(server, scope);
|
|
102
|
+
const mutation = claude_mutation_context("add", scope, [server.name]);
|
|
118
103
|
if (add_args.json) output({
|
|
119
104
|
added: server.name,
|
|
120
|
-
|
|
121
|
-
scope,
|
|
105
|
+
...mutation,
|
|
122
106
|
cli: result.success,
|
|
123
107
|
error: result.error
|
|
124
108
|
}, true);
|
|
125
|
-
else if (result.success)
|
|
126
|
-
|
|
109
|
+
else if (result.success) {
|
|
110
|
+
console.log(`Added '${server.name}' and enabled (scope: ${scope})`);
|
|
111
|
+
print_mutation_details(mutation);
|
|
112
|
+
} else {
|
|
113
|
+
console.log(`Added '${server.name}' to registry but CLI failed: ${result.error}`);
|
|
114
|
+
print_mutation_details(mutation);
|
|
115
|
+
}
|
|
127
116
|
}
|
|
128
117
|
});
|
|
129
118
|
function build_portable_server(args, transport) {
|
|
@@ -144,7 +133,7 @@ function build_portable_server(args, transport) {
|
|
|
144
133
|
if (args.description) server.description = args.description;
|
|
145
134
|
return server;
|
|
146
135
|
}
|
|
147
|
-
async function add_to_client(client, server, scope, location_path, json
|
|
136
|
+
async function add_to_client(client, server, scope, location_path, json) {
|
|
148
137
|
const adapter = get_client_adapter(client);
|
|
149
138
|
if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
|
|
150
139
|
if (scope && ![
|
|
@@ -154,18 +143,15 @@ async function add_to_client(client, server, scope, location_path, json, dry_run
|
|
|
154
143
|
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
155
144
|
try {
|
|
156
145
|
const location = resolve_client_location(adapter, scope, location_path);
|
|
157
|
-
|
|
158
|
-
print_dry_run(await preview_add_client_server(adapter, location, server), json);
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
await add_client_server(adapter, location, server);
|
|
146
|
+
const mutation = await add_client_server(adapter, location, server);
|
|
162
147
|
if (json) output({
|
|
163
148
|
added: server.name,
|
|
164
|
-
|
|
165
|
-
scope: location.scope,
|
|
166
|
-
location: location.path
|
|
149
|
+
...mutation
|
|
167
150
|
}, true);
|
|
168
|
-
else
|
|
151
|
+
else {
|
|
152
|
+
console.log(`Added '${server.name}' (${adapter.id}:${location.scope})`);
|
|
153
|
+
print_mutation_details(mutation);
|
|
154
|
+
}
|
|
169
155
|
} catch (err) {
|
|
170
156
|
error(err instanceof Error ? err.message : "Failed to add server");
|
|
171
157
|
}
|
|
@@ -181,4 +167,4 @@ function parse_key_value_pairs(input) {
|
|
|
181
167
|
//#endregion
|
|
182
168
|
export { add_default as default };
|
|
183
169
|
|
|
184
|
-
//# sourceMappingURL=add-
|
|
170
|
+
//# sourceMappingURL=add-DwUPxD5U.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as
|
|
2
|
-
import { n as
|
|
3
|
-
import { t as
|
|
1
|
+
import { F as get_client_adapter, P as add_client_server_config, R as resolve_client_location, m as mcp_add_json_via_cli } from "./index.js";
|
|
2
|
+
import { n as print_mutation_details, t as claude_mutation_context } from "./mutation-BBMIFB8H.js";
|
|
3
|
+
import { n as output, t as error } from "./output-DGPi2IWN.js";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/cli/commands/add-json.ts
|
|
6
6
|
var add_json_default = defineCommand({
|
|
@@ -32,11 +32,6 @@ var add_json_default = defineCommand({
|
|
|
32
32
|
type: "string",
|
|
33
33
|
description: "Exact config path when a client has multiple matching locations"
|
|
34
34
|
},
|
|
35
|
-
dryRun: {
|
|
36
|
-
type: "boolean",
|
|
37
|
-
description: "Preview changes without writing",
|
|
38
|
-
default: false
|
|
39
|
-
},
|
|
40
35
|
json: {
|
|
41
36
|
type: "boolean",
|
|
42
37
|
description: "Output as JSON",
|
|
@@ -52,7 +47,7 @@ var add_json_default = defineCommand({
|
|
|
52
47
|
}
|
|
53
48
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) error("JSON configuration must be an object.");
|
|
54
49
|
if (args.client && args.client !== "claude-code") {
|
|
55
|
-
await add_json_to_client(args.client, args.name, parsed, args.scope, args.location, args.json
|
|
50
|
+
await add_json_to_client(args.client, args.name, parsed, args.scope, args.location, args.json);
|
|
56
51
|
return;
|
|
57
52
|
}
|
|
58
53
|
const scope = args.scope || "local";
|
|
@@ -61,29 +56,21 @@ var add_json_default = defineCommand({
|
|
|
61
56
|
"project",
|
|
62
57
|
"user"
|
|
63
58
|
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
64
|
-
if (args.dryRun) {
|
|
65
|
-
print_dry_run(build_command_preview({
|
|
66
|
-
operation: "add-json",
|
|
67
|
-
client: "claude-code",
|
|
68
|
-
scope,
|
|
69
|
-
location: "Claude Code CLI",
|
|
70
|
-
command: ["claude", ...build_add_json_args(args.name, args.config, scope)]
|
|
71
|
-
}), args.json);
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
59
|
const result = await mcp_add_json_via_cli(args.name, args.config, scope);
|
|
60
|
+
const mutation = claude_mutation_context("add", scope, [args.name]);
|
|
75
61
|
if (args.json) output({
|
|
76
62
|
added: args.name,
|
|
77
|
-
|
|
78
|
-
scope,
|
|
63
|
+
...mutation,
|
|
79
64
|
success: result.success,
|
|
80
65
|
error: result.error
|
|
81
66
|
}, true);
|
|
82
|
-
else if (result.success)
|
|
83
|
-
|
|
67
|
+
else if (result.success) {
|
|
68
|
+
console.log(`Added '${args.name}' from JSON (scope: ${scope})`);
|
|
69
|
+
print_mutation_details(mutation);
|
|
70
|
+
} else error(result.error || "Unknown error");
|
|
84
71
|
}
|
|
85
72
|
});
|
|
86
|
-
async function add_json_to_client(client, name, config, scope, location_path, json
|
|
73
|
+
async function add_json_to_client(client, name, config, scope, location_path, json) {
|
|
87
74
|
const adapter = get_client_adapter(client);
|
|
88
75
|
if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
|
|
89
76
|
if (scope && ![
|
|
@@ -93,18 +80,15 @@ async function add_json_to_client(client, name, config, scope, location_path, js
|
|
|
93
80
|
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
94
81
|
try {
|
|
95
82
|
const location = resolve_client_location(adapter, scope, location_path);
|
|
96
|
-
|
|
97
|
-
print_dry_run(await preview_add_client_server_config(adapter, location, name, config), json);
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
await add_client_server_config(adapter, location, name, config);
|
|
83
|
+
const mutation = await add_client_server_config(adapter, location, name, config);
|
|
101
84
|
if (json) output({
|
|
102
85
|
added: name,
|
|
103
|
-
|
|
104
|
-
scope: location.scope,
|
|
105
|
-
location: location.path
|
|
86
|
+
...mutation
|
|
106
87
|
}, true);
|
|
107
|
-
else
|
|
88
|
+
else {
|
|
89
|
+
console.log(`Added '${name}' from JSON (${adapter.id}:${location.scope})`);
|
|
90
|
+
print_mutation_details(mutation);
|
|
91
|
+
}
|
|
108
92
|
} catch (err) {
|
|
109
93
|
error(err instanceof Error ? err.message : "Failed to add server");
|
|
110
94
|
}
|
|
@@ -112,4 +96,4 @@ async function add_json_to_client(client, name, config, scope, location_path, js
|
|
|
112
96
|
//#endregion
|
|
113
97
|
export { add_json_default as default };
|
|
114
98
|
|
|
115
|
-
//# sourceMappingURL=add-json-
|
|
99
|
+
//# sourceMappingURL=add-json-Dk3C8QSR.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { r as safe_json_write } from "./safe-apply-B5flt8QC.js";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
//#region src/utils/atomic-write.ts
|
|
4
|
+
/**
|
|
5
|
+
* Atomically write a JSON file with fresh-read merging.
|
|
6
|
+
*
|
|
7
|
+
* 1. Re-reads the file right before writing to pick up concurrent changes
|
|
8
|
+
* 2. Applies the merge function to the freshest data
|
|
9
|
+
* 3. Writes to a temp file, then renames (atomic on same filesystem)
|
|
10
|
+
*/
|
|
11
|
+
async function atomic_json_write(file_path, merge) {
|
|
12
|
+
let existing = {};
|
|
13
|
+
try {
|
|
14
|
+
const content = await readFile(file_path, "utf-8");
|
|
15
|
+
existing = JSON.parse(content);
|
|
16
|
+
} catch {}
|
|
17
|
+
await safe_json_write(file_path, merge(existing), 2);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { atomic_json_write as t };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=atomic-write-9pfXia-x.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as output } from "./output-HtT5HCof.js";
|
|
1
|
+
import { _ as get_plugin_backup_filename, a as get_backup_filename, i as ensure_directory_exists, o as get_backups_dir } from "./safe-apply-B5flt8QC.js";
|
|
2
|
+
import { W as read_claude_settings, X as read_claude_config } from "./index.js";
|
|
3
|
+
import { n as output } from "./output-DGPi2IWN.js";
|
|
5
4
|
import { readdir, unlink, writeFile } from "node:fs/promises";
|
|
6
5
|
import { join } from "node:path";
|
|
7
6
|
import { defineCommand } from "citty";
|
|
@@ -61,4 +60,4 @@ var backup_default = defineCommand({
|
|
|
61
60
|
//#endregion
|
|
62
61
|
export { backup_default as default };
|
|
63
62
|
|
|
64
|
-
//# sourceMappingURL=backup-
|
|
63
|
+
//# sourceMappingURL=backup-Ber7st-_.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as list_linked_plugins,
|
|
2
|
-
import { n as output, t as error } from "./output-
|
|
1
|
+
import { a as list_linked_plugins, d as scan_all_cache_keys, f as unlink_local_plugin, i as link_local_plugin, n as clear_plugin_caches, r as get_cached_plugins_info, s as read_installed_plugins, t as clean_orphaned_versions, u as refresh_all_marketplaces } from "./plugin-cache-Dj-lS1mA.js";
|
|
2
|
+
import { n as output, t as error } from "./output-DGPi2IWN.js";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
var cache_default = defineCommand({
|
|
5
5
|
meta: {
|
|
@@ -82,6 +82,7 @@ var cache_default = defineCommand({
|
|
|
82
82
|
if (args.json) output(result, true);
|
|
83
83
|
else {
|
|
84
84
|
for (const key of result.cleared) console.log(`Cleared: ${key}`);
|
|
85
|
+
if (result.redisabledHooks?.success) console.log(`Re-disabled restored hooks: ${result.redisabledHooks.success}`);
|
|
85
86
|
for (const err of result.errors) console.error(`Error: ${err}`);
|
|
86
87
|
if (result.cleared.length > 0) console.log("\nRun /reload-plugins in Claude Code or restart your session.");
|
|
87
88
|
}
|
|
@@ -223,4 +224,4 @@ var cache_default = defineCommand({
|
|
|
223
224
|
//#endregion
|
|
224
225
|
export { cache_default as default };
|
|
225
226
|
|
|
226
|
-
//# sourceMappingURL=cache-
|
|
227
|
+
//# sourceMappingURL=cache-BVNAOxqk.js.map
|
|
@@ -6,27 +6,27 @@ const main = defineCommand({
|
|
|
6
6
|
description: "Vendor-neutral MCP configuration manager with first-class Claude Code support"
|
|
7
7
|
},
|
|
8
8
|
subCommands: {
|
|
9
|
-
list: () => import("./list-
|
|
10
|
-
enable: () => import("./enable-
|
|
11
|
-
disable: () => import("./disable-
|
|
12
|
-
clients: () => import("./clients-
|
|
13
|
-
remove: () => import("./remove-
|
|
14
|
-
add: () => import("./add-
|
|
15
|
-
"add-json": () => import("./add-json-
|
|
16
|
-
clone: () => import("./clone-
|
|
17
|
-
get: () => import("./get-
|
|
18
|
-
"reset-project-choices": () => import("./reset-project-choices-
|
|
19
|
-
backup: () => import("./backup-
|
|
20
|
-
restore: () => import("./restore-
|
|
21
|
-
profile: () => import("./profile-
|
|
22
|
-
skills: () => import("./skills-
|
|
23
|
-
plugins: () => import("./plugins-
|
|
24
|
-
hooks: () => import("./hooks-
|
|
25
|
-
cache: () => import("./cache-
|
|
26
|
-
dev: () => import("./dev-
|
|
27
|
-
marketplace: () => import("./marketplace-
|
|
28
|
-
reload: () => import("./reload-
|
|
29
|
-
rollback: () => import("./rollback-
|
|
9
|
+
list: () => import("./list-CvpW_mNZ.js").then((m) => m.default),
|
|
10
|
+
enable: () => import("./enable-BEi8TUd1.js").then((m) => m.default),
|
|
11
|
+
disable: () => import("./disable-CVwuJLhT.js").then((m) => m.default),
|
|
12
|
+
clients: () => import("./clients-C1mWlnsn.js").then((m) => m.default),
|
|
13
|
+
remove: () => import("./remove-BC2vomi_.js").then((m) => m.default),
|
|
14
|
+
add: () => import("./add-DwUPxD5U.js").then((m) => m.default),
|
|
15
|
+
"add-json": () => import("./add-json-Dk3C8QSR.js").then((m) => m.default),
|
|
16
|
+
clone: () => import("./clone-BE904ik7.js").then((m) => m.default),
|
|
17
|
+
get: () => import("./get-eDOm6sRK.js").then((m) => m.default),
|
|
18
|
+
"reset-project-choices": () => import("./reset-project-choices-DhJsWQx2.js").then((m) => m.default),
|
|
19
|
+
backup: () => import("./backup-Ber7st-_.js").then((m) => m.default),
|
|
20
|
+
restore: () => import("./restore-CeYSOFt8.js").then((m) => m.default),
|
|
21
|
+
profile: () => import("./profile-NVbTnJKI.js").then((m) => m.default),
|
|
22
|
+
skills: () => import("./skills-zuQ5kCL1.js").then((m) => m.default),
|
|
23
|
+
plugins: () => import("./plugins-elIQYM38.js").then((m) => m.default),
|
|
24
|
+
hooks: () => import("./hooks-DzGBYYId.js").then((m) => m.default),
|
|
25
|
+
cache: () => import("./cache-BVNAOxqk.js").then((m) => m.default),
|
|
26
|
+
dev: () => import("./dev-BW_2JDPM.js").then((m) => m.default),
|
|
27
|
+
marketplace: () => import("./marketplace-BKGJ3UGr.js").then((m) => m.default),
|
|
28
|
+
reload: () => import("./reload-BkVtWaf0.js").then((m) => m.default),
|
|
29
|
+
rollback: () => import("./rollback-g-WX6b3o.js").then((m) => m.default)
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
/**
|
|
@@ -109,4 +109,4 @@ const run = () => runMain(main, { showUsage: show_usage_with_examples });
|
|
|
109
109
|
//#endregion
|
|
110
110
|
export { run };
|
|
111
111
|
|
|
112
|
-
//# sourceMappingURL=cli-
|
|
112
|
+
//# sourceMappingURL=cli-Dfein2li.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as output } from "./output-
|
|
1
|
+
import { I as list_client_locations } from "./index.js";
|
|
2
|
+
import { n as output } from "./output-DGPi2IWN.js";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/cli/commands/clients.ts
|
|
5
5
|
var clients_default = defineCommand({
|
|
@@ -27,4 +27,4 @@ var clients_default = defineCommand({
|
|
|
27
27
|
//#endregion
|
|
28
28
|
export { clients_default as default };
|
|
29
29
|
|
|
30
|
-
//# sourceMappingURL=clients-
|
|
30
|
+
//# sourceMappingURL=clients-C1mWlnsn.js.map
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as redact_server } from "./redact-wBMtzbno.js";
|
|
4
|
-
import { O as add_server_to_registry, f as add_mcp_via_cli } from "./index.js";
|
|
5
|
-
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
1
|
+
import { $ as validate_mcp_server, D as add_server_to_registry, J as find_server_in_scope, S as redact_server, c as add_mcp_via_cli, q as detect_server_scope } from "./index.js";
|
|
2
|
+
import { n as output, t as error } from "./output-DGPi2IWN.js";
|
|
6
3
|
import { defineCommand } from "citty";
|
|
7
4
|
//#region src/cli/commands/clone.ts
|
|
8
5
|
var clone_default = defineCommand({
|
|
@@ -84,4 +81,4 @@ var clone_default = defineCommand({
|
|
|
84
81
|
//#endregion
|
|
85
82
|
export { clone_default as default };
|
|
86
83
|
|
|
87
|
-
//# sourceMappingURL=clone-
|
|
84
|
+
//# sourceMappingURL=clone-BE904ik7.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
1
|
+
import { l as get_current_project_path, s as get_claude_config_path, u as get_dev_overrides_path, x as get_project_mcp_json_path } from "./safe-apply-B5flt8QC.js";
|
|
2
|
+
import { t as atomic_json_write } from "./atomic-write-9pfXia-x.js";
|
|
3
|
+
import { C as redact_server_base, J as find_server_in_scope, q as detect_server_scope } from "./index.js";
|
|
4
|
+
import { n as output, t as error } from "./output-DGPi2IWN.js";
|
|
6
5
|
import { readFile } from "node:fs/promises";
|
|
7
6
|
import { defineCommand } from "citty";
|
|
8
7
|
//#region src/core/dev-override.ts
|
|
@@ -262,4 +261,4 @@ var dev_default = defineCommand({
|
|
|
262
261
|
//#endregion
|
|
263
262
|
export { dev_default as default };
|
|
264
263
|
|
|
265
|
-
//# sourceMappingURL=dev-
|
|
264
|
+
//# sourceMappingURL=dev-BW_2JDPM.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
import { t as
|
|
1
|
+
import { F as get_client_adapter, O as get_all_available_servers, R as resolve_client_location, _ as remove_mcp_via_cli, z as set_client_server_enabled } from "./index.js";
|
|
2
|
+
import { n as print_mutation_details, t as claude_mutation_context } from "./mutation-BBMIFB8H.js";
|
|
3
|
+
import { n as output, t as error } from "./output-DGPi2IWN.js";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/cli/commands/disable.ts
|
|
6
6
|
var disable_default = defineCommand({
|
|
@@ -27,11 +27,6 @@ var disable_default = defineCommand({
|
|
|
27
27
|
type: "string",
|
|
28
28
|
description: "Exact config path when a client has multiple matching locations"
|
|
29
29
|
},
|
|
30
|
-
dryRun: {
|
|
31
|
-
type: "boolean",
|
|
32
|
-
description: "Preview changes without writing",
|
|
33
|
-
default: false
|
|
34
|
-
},
|
|
35
30
|
json: {
|
|
36
31
|
type: "boolean",
|
|
37
32
|
description: "Output as JSON",
|
|
@@ -40,7 +35,7 @@ var disable_default = defineCommand({
|
|
|
40
35
|
},
|
|
41
36
|
async run({ args }) {
|
|
42
37
|
if (args.client && args.client !== "claude-code") {
|
|
43
|
-
await disable_client_server(args.client, args.server, args.scope, args.location, args.json
|
|
38
|
+
await disable_client_server(args.client, args.server, args.scope, args.location, args.json);
|
|
44
39
|
return;
|
|
45
40
|
}
|
|
46
41
|
const scope = args.scope || "local";
|
|
@@ -50,27 +45,20 @@ var disable_default = defineCommand({
|
|
|
50
45
|
"user"
|
|
51
46
|
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
52
47
|
await get_all_available_servers();
|
|
53
|
-
if (args.dryRun) {
|
|
54
|
-
print_dry_run(build_command_preview({
|
|
55
|
-
operation: "disable-server",
|
|
56
|
-
client: "claude-code",
|
|
57
|
-
scope,
|
|
58
|
-
location: "Claude Code CLI",
|
|
59
|
-
command: ["claude", ...build_remove_args(args.server, scope)]
|
|
60
|
-
}), args.json);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
48
|
const result = await remove_mcp_via_cli(args.server, scope);
|
|
64
49
|
if (!result.success) error(result.error || "Failed to disable server");
|
|
50
|
+
const mutation = claude_mutation_context("disable", scope, [args.server]);
|
|
65
51
|
if (args.json) output({
|
|
66
52
|
disabled: args.server,
|
|
67
|
-
|
|
68
|
-
scope
|
|
53
|
+
...mutation
|
|
69
54
|
}, true);
|
|
70
|
-
else
|
|
55
|
+
else {
|
|
56
|
+
console.log(`Disabled '${args.server}' (scope: ${scope})`);
|
|
57
|
+
print_mutation_details(mutation);
|
|
58
|
+
}
|
|
71
59
|
}
|
|
72
60
|
});
|
|
73
|
-
async function disable_client_server(client, server, scope, location_path, json
|
|
61
|
+
async function disable_client_server(client, server, scope, location_path, json) {
|
|
74
62
|
const adapter = get_client_adapter(client);
|
|
75
63
|
if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
|
|
76
64
|
if (scope && ![
|
|
@@ -80,22 +68,15 @@ async function disable_client_server(client, server, scope, location_path, json,
|
|
|
80
68
|
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
81
69
|
try {
|
|
82
70
|
const location = resolve_client_location(adapter, scope, location_path);
|
|
83
|
-
const
|
|
84
|
-
const enabled_names = new Set(servers.filter((candidate) => candidate.disabled !== true).map((candidate) => candidate.name));
|
|
85
|
-
enabled_names.delete(server);
|
|
86
|
-
if (dry_run) {
|
|
87
|
-
print_dry_run(await preview_set_client_enabled_servers(adapter, location, [...enabled_names]), json);
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
const enabled_count = await set_client_server_enabled(adapter, location, server, false);
|
|
71
|
+
const mutation = await set_client_server_enabled(adapter, location, server, false);
|
|
91
72
|
if (json) output({
|
|
92
73
|
disabled: server,
|
|
93
|
-
|
|
94
|
-
scope: location.scope,
|
|
95
|
-
location: location.path,
|
|
96
|
-
enabledCount: enabled_count
|
|
74
|
+
...mutation
|
|
97
75
|
}, true);
|
|
98
|
-
else
|
|
76
|
+
else {
|
|
77
|
+
console.log(`Disabled '${server}' (${adapter.id}:${location.scope})`);
|
|
78
|
+
print_mutation_details(mutation);
|
|
79
|
+
}
|
|
99
80
|
} catch (err) {
|
|
100
81
|
error(err instanceof Error ? err.message : "Failed to disable server");
|
|
101
82
|
}
|
|
@@ -103,4 +84,4 @@ async function disable_client_server(client, server, scope, location_path, json,
|
|
|
103
84
|
//#endregion
|
|
104
85
|
export { disable_default as default };
|
|
105
86
|
|
|
106
|
-
//# sourceMappingURL=disable-
|
|
87
|
+
//# sourceMappingURL=disable-CVwuJLhT.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
import { t as
|
|
1
|
+
import { F as get_client_adapter, O as get_all_available_servers, R as resolve_client_location, c as add_mcp_via_cli, z as set_client_server_enabled } from "./index.js";
|
|
2
|
+
import { n as print_mutation_details, t as claude_mutation_context } from "./mutation-BBMIFB8H.js";
|
|
3
|
+
import { n as output, t as error } from "./output-DGPi2IWN.js";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/cli/commands/enable.ts
|
|
6
6
|
var enable_default = defineCommand({
|
|
@@ -27,11 +27,6 @@ var enable_default = defineCommand({
|
|
|
27
27
|
type: "string",
|
|
28
28
|
description: "Exact config path when a client has multiple matching locations"
|
|
29
29
|
},
|
|
30
|
-
dryRun: {
|
|
31
|
-
type: "boolean",
|
|
32
|
-
description: "Preview changes without writing",
|
|
33
|
-
default: false
|
|
34
|
-
},
|
|
35
30
|
json: {
|
|
36
31
|
type: "boolean",
|
|
37
32
|
description: "Output as JSON",
|
|
@@ -40,7 +35,7 @@ var enable_default = defineCommand({
|
|
|
40
35
|
},
|
|
41
36
|
async run({ args }) {
|
|
42
37
|
if (args.client && args.client !== "claude-code") {
|
|
43
|
-
await enable_client_server(args.client, args.server, args.scope, args.location, args.json
|
|
38
|
+
await enable_client_server(args.client, args.server, args.scope, args.location, args.json);
|
|
44
39
|
return;
|
|
45
40
|
}
|
|
46
41
|
const scope = args.scope || "local";
|
|
@@ -51,27 +46,20 @@ var enable_default = defineCommand({
|
|
|
51
46
|
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
52
47
|
const server = (await get_all_available_servers()).find((s) => s.name === args.server);
|
|
53
48
|
if (!server) error(`Server '${args.server}' not found in registry. Run 'mcpick list' to see available servers.`);
|
|
54
|
-
if (args.dryRun) {
|
|
55
|
-
print_dry_run(build_command_preview({
|
|
56
|
-
operation: "enable-server",
|
|
57
|
-
client: "claude-code",
|
|
58
|
-
scope,
|
|
59
|
-
location: "Claude Code CLI",
|
|
60
|
-
command: ["claude", ...build_add_args(server, scope)]
|
|
61
|
-
}), args.json);
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
49
|
const result = await add_mcp_via_cli(server, scope);
|
|
65
50
|
if (!result.success) error(result.error || "Failed to enable server");
|
|
51
|
+
const mutation = claude_mutation_context("enable", scope, [server.name]);
|
|
66
52
|
if (args.json) output({
|
|
67
53
|
enabled: server.name,
|
|
68
|
-
|
|
69
|
-
scope
|
|
54
|
+
...mutation
|
|
70
55
|
}, true);
|
|
71
|
-
else
|
|
56
|
+
else {
|
|
57
|
+
console.log(`Enabled '${server.name}' (scope: ${scope})`);
|
|
58
|
+
print_mutation_details(mutation);
|
|
59
|
+
}
|
|
72
60
|
}
|
|
73
61
|
});
|
|
74
|
-
async function enable_client_server(client, server, scope, location_path, json
|
|
62
|
+
async function enable_client_server(client, server, scope, location_path, json) {
|
|
75
63
|
const adapter = get_client_adapter(client);
|
|
76
64
|
if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
|
|
77
65
|
if (scope && ![
|
|
@@ -81,22 +69,15 @@ async function enable_client_server(client, server, scope, location_path, json,
|
|
|
81
69
|
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
82
70
|
try {
|
|
83
71
|
const location = resolve_client_location(adapter, scope, location_path);
|
|
84
|
-
const
|
|
85
|
-
const enabled_names = new Set(servers.filter((candidate) => candidate.disabled !== true).map((candidate) => candidate.name));
|
|
86
|
-
enabled_names.add(server);
|
|
87
|
-
if (dry_run) {
|
|
88
|
-
print_dry_run(await preview_set_client_enabled_servers(adapter, location, [...enabled_names]), json);
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const enabled_count = await set_client_server_enabled(adapter, location, server, true);
|
|
72
|
+
const mutation = await set_client_server_enabled(adapter, location, server, true);
|
|
92
73
|
if (json) output({
|
|
93
74
|
enabled: server,
|
|
94
|
-
|
|
95
|
-
scope: location.scope,
|
|
96
|
-
location: location.path,
|
|
97
|
-
enabledCount: enabled_count
|
|
75
|
+
...mutation
|
|
98
76
|
}, true);
|
|
99
|
-
else
|
|
77
|
+
else {
|
|
78
|
+
console.log(`Enabled '${server}' (${adapter.id}:${location.scope})`);
|
|
79
|
+
print_mutation_details(mutation);
|
|
80
|
+
}
|
|
100
81
|
} catch (err) {
|
|
101
82
|
error(err instanceof Error ? err.message : "Failed to enable server");
|
|
102
83
|
}
|
|
@@ -104,4 +85,4 @@ async function enable_client_server(client, server, scope, location_path, json,
|
|
|
104
85
|
//#endregion
|
|
105
86
|
export { enable_default as default };
|
|
106
87
|
|
|
107
|
-
//# sourceMappingURL=enable-
|
|
88
|
+
//# sourceMappingURL=enable-BEi8TUd1.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as output, t as error } from "./output-
|
|
1
|
+
import { h as mcp_get_via_cli } from "./index.js";
|
|
2
|
+
import { n as output, t as error } from "./output-DGPi2IWN.js";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/cli/commands/get.ts
|
|
5
5
|
var get_default = defineCommand({
|
|
@@ -38,4 +38,4 @@ var get_default = defineCommand({
|
|
|
38
38
|
//#endregion
|
|
39
39
|
export { get_default as default };
|
|
40
40
|
|
|
41
|
-
//# sourceMappingURL=get-
|
|
41
|
+
//# sourceMappingURL=get-eDOm6sRK.js.map
|