mcpick 0.0.23 → 0.0.24
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 +9 -0
- package/dist/{add-LJQa2my2.js → add-Qzd8i-5k.js} +24 -4
- package/dist/{add-json-TEdYweZ5.js → add-json-DGmsjB0O.js} +24 -4
- package/dist/{backup-kyS5IVIr.js → backup-C7fvikFw.js} +3 -3
- package/dist/{cache-DTfzTsEE.js → cache-D3jjh5dD.js} +2 -2
- package/dist/{cli-By-0nYNQ.js → cli-CZOlaqoZ.js} +22 -22
- package/dist/{clients-qMozizys.js → clients-Bh93TGP4.js} +2 -2
- package/dist/{clone-BVhYjRGO.js → clone-MI8jJhTz.js} +3 -3
- package/dist/{config-DzMmTJYL.js → config-DE58Fik_.js} +2 -2
- package/dist/{dev-Cst8WkQ-.js → dev-51esdZG9.js} +3 -3
- package/dist/{disable-BaOs9lrm.js → disable-csYAn2Vk.js} +27 -4
- package/dist/dry-run-XQ32fxPT.js +20 -0
- package/dist/{enable--3mjSmTq.js → enable-B5GbmhL-.js} +27 -4
- package/dist/{get-CjhNWyRj.js → get-DacRZmwv.js} +2 -2
- package/dist/{hooks-DFmxgD0t.js → hooks-C_x49qap.js} +2 -2
- package/dist/index.js +197 -61
- package/dist/{list-D5CkCXpP.js → list-BeBtsiae.js} +3 -3
- package/dist/{marketplace-C3EGyIG0.js → marketplace-BDC2YtvT.js} +3 -3
- package/dist/{plugin-cache-BSgB42wa.js → plugin-cache-DmLbh89d.js} +2 -2
- package/dist/{plugins-Dn2mPFKm.js → plugins-Bkw-SKkZ.js} +3 -3
- package/dist/profile-DwJTVXiz.js +161 -0
- package/dist/{reload-257iU7Z7.js → reload-Bl1mYK1I.js} +1 -1
- package/dist/{remove-26XFzkPd.js → remove-BSHgva79.js} +24 -4
- package/dist/{reset-project-choices-D2F04LfC.js → reset-project-choices-BNLus9J9.js} +2 -2
- package/dist/{restore-BYYsoNqF.js → restore-YisgARhc.js} +3 -3
- package/dist/{rollback-CPdaME91.js → rollback-GR1RkpXW.js} +2 -2
- package/dist/{skills-DfWk9mpk.js → skills-rDTDqqZA.js} +2 -2
- package/package.json +1 -1
- package/dist/profile-Dq3ORPil.js +0 -119
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { a as get_claude_settings_path, g as get_profile_path, i as get_claude_config_path } from "./paths-BPISiJi4.js";
|
|
2
|
+
import { s as read_claude_config } from "./config-DE58Fik_.js";
|
|
3
|
+
import { K as build_json_change_preview, Z as read_claude_settings, i as save_current_claude_profile, n as list_profiles, r as load_profile, t as apply_profile_to_claude } from "./index.js";
|
|
4
|
+
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
5
|
+
import { t as print_dry_run } from "./dry-run-XQ32fxPT.js";
|
|
6
|
+
import { defineCommand } from "citty";
|
|
7
|
+
var profile_default = defineCommand({
|
|
8
|
+
meta: {
|
|
9
|
+
name: "profile",
|
|
10
|
+
description: "Manage profiles (MCP servers + plugins)"
|
|
11
|
+
},
|
|
12
|
+
subCommands: {
|
|
13
|
+
list: defineCommand({
|
|
14
|
+
meta: {
|
|
15
|
+
name: "list",
|
|
16
|
+
description: "List all saved profiles"
|
|
17
|
+
},
|
|
18
|
+
args: { json: {
|
|
19
|
+
type: "boolean",
|
|
20
|
+
description: "Output as JSON",
|
|
21
|
+
default: false
|
|
22
|
+
} },
|
|
23
|
+
async run({ args }) {
|
|
24
|
+
const profiles = await list_profiles();
|
|
25
|
+
if (args.json) output(profiles, true);
|
|
26
|
+
else {
|
|
27
|
+
if (profiles.length === 0) {
|
|
28
|
+
console.log("No profiles found.");
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
for (const p of profiles) {
|
|
32
|
+
const parts = [`${p.serverCount} servers`];
|
|
33
|
+
if (p.pluginCount > 0) parts.push(`${p.pluginCount} plugins`);
|
|
34
|
+
console.log(`${p.name} (${parts.join(", ")})`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}),
|
|
39
|
+
load: defineCommand({
|
|
40
|
+
meta: {
|
|
41
|
+
name: "load",
|
|
42
|
+
description: "Load and apply a saved profile"
|
|
43
|
+
},
|
|
44
|
+
args: {
|
|
45
|
+
name: {
|
|
46
|
+
type: "positional",
|
|
47
|
+
description: "Profile name",
|
|
48
|
+
required: true
|
|
49
|
+
},
|
|
50
|
+
dryRun: {
|
|
51
|
+
type: "boolean",
|
|
52
|
+
description: "Preview changes without writing",
|
|
53
|
+
default: false
|
|
54
|
+
},
|
|
55
|
+
json: {
|
|
56
|
+
type: "boolean",
|
|
57
|
+
description: "Output as JSON",
|
|
58
|
+
default: false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
async run({ args }) {
|
|
62
|
+
try {
|
|
63
|
+
if (args.dryRun) {
|
|
64
|
+
const profile = await load_profile(args.name);
|
|
65
|
+
const previews = [build_json_change_preview({
|
|
66
|
+
operation: "profile-load",
|
|
67
|
+
client: "claude-code",
|
|
68
|
+
scope: "user",
|
|
69
|
+
location: get_claude_config_path(),
|
|
70
|
+
before: await read_claude_config(),
|
|
71
|
+
after: profile.config
|
|
72
|
+
})];
|
|
73
|
+
if (profile.enabledPlugins) previews.push(build_json_change_preview({
|
|
74
|
+
operation: "profile-load-plugins",
|
|
75
|
+
client: "claude-code",
|
|
76
|
+
scope: "user",
|
|
77
|
+
location: get_claude_settings_path(),
|
|
78
|
+
before: await read_claude_settings(),
|
|
79
|
+
after: { enabledPlugins: profile.enabledPlugins }
|
|
80
|
+
}));
|
|
81
|
+
if (args.json) output(previews, true);
|
|
82
|
+
else for (const preview of previews) print_dry_run(preview, false);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const result = await apply_profile_to_claude(args.name);
|
|
86
|
+
if (args.json) output({
|
|
87
|
+
profile: result.profile,
|
|
88
|
+
servers: result.serverCount,
|
|
89
|
+
plugins: result.pluginCount
|
|
90
|
+
}, true);
|
|
91
|
+
else {
|
|
92
|
+
const parts = [`${result.serverCount} servers`];
|
|
93
|
+
if (result.pluginCount > 0) parts.push(`${result.pluginCount} plugins`);
|
|
94
|
+
console.log(`Profile '${result.profile}' applied (${parts.join(", ")})`);
|
|
95
|
+
}
|
|
96
|
+
} catch (err) {
|
|
97
|
+
error(err instanceof Error ? err.message : "Failed to load profile");
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}),
|
|
101
|
+
save: defineCommand({
|
|
102
|
+
meta: {
|
|
103
|
+
name: "save",
|
|
104
|
+
description: "Save current config as a profile"
|
|
105
|
+
},
|
|
106
|
+
args: {
|
|
107
|
+
name: {
|
|
108
|
+
type: "positional",
|
|
109
|
+
description: "Profile name",
|
|
110
|
+
required: true
|
|
111
|
+
},
|
|
112
|
+
dryRun: {
|
|
113
|
+
type: "boolean",
|
|
114
|
+
description: "Preview changes without writing",
|
|
115
|
+
default: false
|
|
116
|
+
},
|
|
117
|
+
json: {
|
|
118
|
+
type: "boolean",
|
|
119
|
+
description: "Output as JSON",
|
|
120
|
+
default: false
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
async run({ args }) {
|
|
124
|
+
try {
|
|
125
|
+
if (args.dryRun) {
|
|
126
|
+
const config = await read_claude_config();
|
|
127
|
+
const settings = await read_claude_settings();
|
|
128
|
+
const profile_data = { mcpServers: config.mcpServers || {} };
|
|
129
|
+
if (settings.enabledPlugins) profile_data.enabledPlugins = settings.enabledPlugins;
|
|
130
|
+
print_dry_run(build_json_change_preview({
|
|
131
|
+
operation: "profile-save",
|
|
132
|
+
client: "claude-code",
|
|
133
|
+
scope: "user",
|
|
134
|
+
location: get_profile_path(args.name),
|
|
135
|
+
before: {},
|
|
136
|
+
after: profile_data
|
|
137
|
+
}), args.json);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const result = await save_current_claude_profile(args.name);
|
|
141
|
+
if (args.json) output({
|
|
142
|
+
profile: result.profile,
|
|
143
|
+
servers: result.serverCount,
|
|
144
|
+
plugins: result.pluginCount
|
|
145
|
+
}, true);
|
|
146
|
+
else {
|
|
147
|
+
const parts = [`${result.serverCount} servers`];
|
|
148
|
+
if (result.pluginCount > 0) parts.push(`${result.pluginCount} plugins`);
|
|
149
|
+
console.log(`Profile '${result.profile}' saved (${parts.join(", ")})`);
|
|
150
|
+
}
|
|
151
|
+
} catch (err) {
|
|
152
|
+
error(err instanceof Error ? err.message : "Failed to save profile");
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
})
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
//#endregion
|
|
159
|
+
export { profile_default as default };
|
|
160
|
+
|
|
161
|
+
//# sourceMappingURL=profile-DwJTVXiz.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as preview_remove_client_server, G as build_command_preview, H as remove_client_server, I as get_client_adapter, M as read_server_registry, N as write_server_registry, U as resolve_client_location, h as build_remove_args, k as get_all_available_servers, w as remove_mcp_via_cli } from "./index.js";
|
|
2
2
|
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
3
|
+
import { t as print_dry_run } from "./dry-run-XQ32fxPT.js";
|
|
3
4
|
import { defineCommand } from "citty";
|
|
4
5
|
//#region src/cli/commands/remove.ts
|
|
5
6
|
var remove_default = defineCommand({
|
|
@@ -26,6 +27,11 @@ var remove_default = defineCommand({
|
|
|
26
27
|
type: "string",
|
|
27
28
|
description: "Exact config path when a client has multiple matching locations"
|
|
28
29
|
},
|
|
30
|
+
dryRun: {
|
|
31
|
+
type: "boolean",
|
|
32
|
+
description: "Preview changes without writing",
|
|
33
|
+
default: false
|
|
34
|
+
},
|
|
29
35
|
json: {
|
|
30
36
|
type: "boolean",
|
|
31
37
|
description: "Output as JSON",
|
|
@@ -34,7 +40,7 @@ var remove_default = defineCommand({
|
|
|
34
40
|
},
|
|
35
41
|
async run({ args }) {
|
|
36
42
|
if (args.client && args.client !== "claude-code") {
|
|
37
|
-
await remove_from_client(args.client, args.server, args.scope, args.location, args.json);
|
|
43
|
+
await remove_from_client(args.client, args.server, args.scope, args.location, args.json, args.dryRun);
|
|
38
44
|
return;
|
|
39
45
|
}
|
|
40
46
|
const scope = args.scope || "local";
|
|
@@ -44,6 +50,16 @@ var remove_default = defineCommand({
|
|
|
44
50
|
"user"
|
|
45
51
|
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
46
52
|
if (!(await get_all_available_servers()).find((s) => s.name === args.server)) error(`Server '${args.server}' not found. Run 'mcpick list' to see available servers.`);
|
|
53
|
+
if (args.dryRun) {
|
|
54
|
+
print_dry_run(build_command_preview({
|
|
55
|
+
operation: "remove-server",
|
|
56
|
+
client: "claude-code",
|
|
57
|
+
scope,
|
|
58
|
+
location: "Claude Code CLI + mcpick registry",
|
|
59
|
+
command: ["claude", ...build_remove_args(args.server, scope)]
|
|
60
|
+
}), args.json);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
47
63
|
const registry = await read_server_registry();
|
|
48
64
|
const index = registry.servers.findIndex((s) => s.name === args.server);
|
|
49
65
|
if (index >= 0) {
|
|
@@ -59,7 +75,7 @@ var remove_default = defineCommand({
|
|
|
59
75
|
else console.log(`Removed '${args.server}'`);
|
|
60
76
|
}
|
|
61
77
|
});
|
|
62
|
-
async function remove_from_client(client, server, scope, location_path, json) {
|
|
78
|
+
async function remove_from_client(client, server, scope, location_path, json, dry_run) {
|
|
63
79
|
const adapter = get_client_adapter(client);
|
|
64
80
|
if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
|
|
65
81
|
if (scope && ![
|
|
@@ -69,6 +85,10 @@ async function remove_from_client(client, server, scope, location_path, json) {
|
|
|
69
85
|
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
70
86
|
try {
|
|
71
87
|
const location = resolve_client_location(adapter, scope, location_path);
|
|
88
|
+
if (dry_run) {
|
|
89
|
+
print_dry_run(await preview_remove_client_server(adapter, location, server), json);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
72
92
|
await remove_client_server(adapter, location, server);
|
|
73
93
|
if (json) output({
|
|
74
94
|
removed: server,
|
|
@@ -84,4 +104,4 @@ async function remove_from_client(client, server, scope, location_path, json) {
|
|
|
84
104
|
//#endregion
|
|
85
105
|
export { remove_default as default };
|
|
86
106
|
|
|
87
|
-
//# sourceMappingURL=remove-
|
|
107
|
+
//# sourceMappingURL=remove-BSHgva79.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as mcp_reset_project_choices_via_cli } from "./index.js";
|
|
2
2
|
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/cli/commands/reset-project-choices.ts
|
|
@@ -25,4 +25,4 @@ var reset_project_choices_default = defineCommand({
|
|
|
25
25
|
//#endregion
|
|
26
26
|
export { reset_project_choices_default as default };
|
|
27
27
|
|
|
28
|
-
//# sourceMappingURL=reset-project-choices-
|
|
28
|
+
//# sourceMappingURL=reset-project-choices-BNLus9J9.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as validate_claude_config } from "./validation-xMlbgGCF.js";
|
|
2
|
-
import { c as write_claude_config } from "./config-
|
|
3
|
-
import {
|
|
2
|
+
import { c as write_claude_config } from "./config-DE58Fik_.js";
|
|
3
|
+
import { $ as write_claude_settings, A as list_backups, j as list_plugin_backups } from "./index.js";
|
|
4
4
|
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
5
5
|
import { readFile } from "node:fs/promises";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
@@ -80,4 +80,4 @@ var restore_default = defineCommand({
|
|
|
80
80
|
//#endregion
|
|
81
81
|
export { restore_default as default };
|
|
82
82
|
|
|
83
|
-
//# sourceMappingURL=restore-
|
|
83
|
+
//# sourceMappingURL=restore-YisgARhc.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { nt as restore_config_backup, tt as list_config_backups } from "./index.js";
|
|
2
2
|
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/cli/commands/rollback.ts
|
|
@@ -52,4 +52,4 @@ var rollback_default = defineCommand({
|
|
|
52
52
|
//#endregion
|
|
53
53
|
export { rollback_default as default };
|
|
54
54
|
|
|
55
|
-
//# sourceMappingURL=rollback-
|
|
55
|
+
//# sourceMappingURL=rollback-GR1RkpXW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as run_skills_cli, o as split_cli_list } from "./index.js";
|
|
2
2
|
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/cli/commands/skills.ts
|
|
@@ -213,4 +213,4 @@ var skills_default = defineCommand({
|
|
|
213
213
|
//#endregion
|
|
214
214
|
export { skills_default as default };
|
|
215
215
|
|
|
216
|
-
//# sourceMappingURL=skills-
|
|
216
|
+
//# sourceMappingURL=skills-rDTDqqZA.js.map
|
package/package.json
CHANGED
package/dist/profile-Dq3ORPil.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { c as write_claude_config } from "./config-DzMmTJYL.js";
|
|
2
|
-
import { U as write_claude_settings, n as load_profile, r as save_profile, t as list_profiles } from "./index.js";
|
|
3
|
-
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
4
|
-
import { defineCommand } from "citty";
|
|
5
|
-
var profile_default = defineCommand({
|
|
6
|
-
meta: {
|
|
7
|
-
name: "profile",
|
|
8
|
-
description: "Manage profiles (MCP servers + plugins)"
|
|
9
|
-
},
|
|
10
|
-
subCommands: {
|
|
11
|
-
list: defineCommand({
|
|
12
|
-
meta: {
|
|
13
|
-
name: "list",
|
|
14
|
-
description: "List all saved profiles"
|
|
15
|
-
},
|
|
16
|
-
args: { json: {
|
|
17
|
-
type: "boolean",
|
|
18
|
-
description: "Output as JSON",
|
|
19
|
-
default: false
|
|
20
|
-
} },
|
|
21
|
-
async run({ args }) {
|
|
22
|
-
const profiles = await list_profiles();
|
|
23
|
-
if (args.json) output(profiles, true);
|
|
24
|
-
else {
|
|
25
|
-
if (profiles.length === 0) {
|
|
26
|
-
console.log("No profiles found.");
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
for (const p of profiles) {
|
|
30
|
-
const parts = [`${p.serverCount} servers`];
|
|
31
|
-
if (p.pluginCount > 0) parts.push(`${p.pluginCount} plugins`);
|
|
32
|
-
console.log(`${p.name} (${parts.join(", ")})`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}),
|
|
37
|
-
load: defineCommand({
|
|
38
|
-
meta: {
|
|
39
|
-
name: "load",
|
|
40
|
-
description: "Load and apply a saved profile"
|
|
41
|
-
},
|
|
42
|
-
args: {
|
|
43
|
-
name: {
|
|
44
|
-
type: "positional",
|
|
45
|
-
description: "Profile name",
|
|
46
|
-
required: true
|
|
47
|
-
},
|
|
48
|
-
json: {
|
|
49
|
-
type: "boolean",
|
|
50
|
-
description: "Output as JSON",
|
|
51
|
-
default: false
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
async run({ args }) {
|
|
55
|
-
try {
|
|
56
|
-
const profile = await load_profile(args.name);
|
|
57
|
-
await write_claude_config(profile.config);
|
|
58
|
-
const server_count = Object.keys(profile.config.mcpServers || {}).length;
|
|
59
|
-
let plugin_count = 0;
|
|
60
|
-
if (profile.enabledPlugins) {
|
|
61
|
-
await write_claude_settings({ enabledPlugins: profile.enabledPlugins });
|
|
62
|
-
plugin_count = Object.keys(profile.enabledPlugins).length;
|
|
63
|
-
}
|
|
64
|
-
if (args.json) output({
|
|
65
|
-
profile: args.name,
|
|
66
|
-
servers: server_count,
|
|
67
|
-
plugins: plugin_count
|
|
68
|
-
}, true);
|
|
69
|
-
else {
|
|
70
|
-
const parts = [`${server_count} servers`];
|
|
71
|
-
if (plugin_count > 0) parts.push(`${plugin_count} plugins`);
|
|
72
|
-
console.log(`Profile '${args.name}' applied (${parts.join(", ")})`);
|
|
73
|
-
}
|
|
74
|
-
} catch (err) {
|
|
75
|
-
error(err instanceof Error ? err.message : "Failed to load profile");
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}),
|
|
79
|
-
save: defineCommand({
|
|
80
|
-
meta: {
|
|
81
|
-
name: "save",
|
|
82
|
-
description: "Save current config as a profile"
|
|
83
|
-
},
|
|
84
|
-
args: {
|
|
85
|
-
name: {
|
|
86
|
-
type: "positional",
|
|
87
|
-
description: "Profile name",
|
|
88
|
-
required: true
|
|
89
|
-
},
|
|
90
|
-
json: {
|
|
91
|
-
type: "boolean",
|
|
92
|
-
description: "Output as JSON",
|
|
93
|
-
default: false
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
async run({ args }) {
|
|
97
|
-
try {
|
|
98
|
-
const counts = await save_profile(args.name);
|
|
99
|
-
if (args.json) output({
|
|
100
|
-
profile: args.name,
|
|
101
|
-
servers: counts.serverCount,
|
|
102
|
-
plugins: counts.pluginCount
|
|
103
|
-
}, true);
|
|
104
|
-
else {
|
|
105
|
-
const parts = [`${counts.serverCount} servers`];
|
|
106
|
-
if (counts.pluginCount > 0) parts.push(`${counts.pluginCount} plugins`);
|
|
107
|
-
console.log(`Profile '${args.name}' saved (${parts.join(", ")})`);
|
|
108
|
-
}
|
|
109
|
-
} catch (err) {
|
|
110
|
-
error(err instanceof Error ? err.message : "Failed to save profile");
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
})
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
//#endregion
|
|
117
|
-
export { profile_default as default };
|
|
118
|
-
|
|
119
|
-
//# sourceMappingURL=profile-Dq3ORPil.js.map
|