mcpick 0.0.23 → 0.0.25

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +8 -2
  3. package/dist/{add-LJQa2my2.js → add-7mhUpbrt.js} +20 -13
  4. package/dist/{add-json-TEdYweZ5.js → add-json-BMM2L4hv.js} +16 -12
  5. package/dist/{backup-kyS5IVIr.js → backup-C-YJmgps.js} +4 -4
  6. package/dist/{cache-DTfzTsEE.js → cache-BOYZhUF6.js} +4 -3
  7. package/dist/{cli-By-0nYNQ.js → cli-sOeHH4CK.js} +22 -22
  8. package/dist/{clients-qMozizys.js → clients-D5KAuQ5U.js} +3 -3
  9. package/dist/{clone-BVhYjRGO.js → clone-BRJA55js.js} +5 -5
  10. package/dist/{config-DzMmTJYL.js → config-Bzh374VP.js} +4 -13
  11. package/dist/{dev-Cst8WkQ-.js → dev-B-WlQSqY.js} +4 -4
  12. package/dist/{disable-BaOs9lrm.js → disable-Br0aVG3u.js} +16 -12
  13. package/dist/{enable--3mjSmTq.js → enable-DUolKCEH.js} +16 -12
  14. package/dist/{get-CjhNWyRj.js → get-D-6Cl_CO.js} +3 -3
  15. package/dist/{hooks-DFmxgD0t.js → hooks-BKPmZViU.js} +3 -3
  16. package/dist/index.js +595 -393
  17. package/dist/{list-D5CkCXpP.js → list-DMcaHDfM.js} +4 -4
  18. package/dist/{marketplace-C3EGyIG0.js → marketplace-DTW7Ys8k.js} +4 -4
  19. package/dist/mutation-ukRPw3qM.js +19 -0
  20. package/dist/{output-HtT5HCof.js → output-BS1TMOWt.js} +1 -1
  21. package/dist/{plugin-cache-BSgB42wa.js → plugin-cache-Dw1I2YuO.js} +10 -3
  22. package/dist/{plugins-Dn2mPFKm.js → plugins-BzLD4og0.js} +4 -4
  23. package/dist/profile-CmIWUJH_.js +163 -0
  24. package/dist/{reload-257iU7Z7.js → reload-Di28s_rY.js} +2 -2
  25. package/dist/{remove-26XFzkPd.js → remove-B32EuYRC.js} +16 -11
  26. package/dist/{reset-project-choices-D2F04LfC.js → reset-project-choices-DX4TnZ2i.js} +3 -3
  27. package/dist/{restore-BYYsoNqF.js → restore-ByS4xi0y.js} +5 -5
  28. package/dist/{rollback-CPdaME91.js → rollback-DdDJrA8y.js} +3 -3
  29. package/dist/{skills-DfWk9mpk.js → skills-pvyQ17XU.js} +3 -3
  30. package/dist/{validation-xMlbgGCF.js → validation-CfPAjPJ5.js} +21 -2
  31. package/package.json +1 -1
  32. package/dist/profile-Dq3ORPil.js +0 -119
@@ -1,7 +1,7 @@
1
- import { o as get_enabled_servers_for_scope } from "./config-DzMmTJYL.js";
1
+ import { a as get_enabled_servers_for_scope } from "./config-Bzh374VP.js";
2
2
  import { a as redact_url, n as redact_server, t as redact_portable_server } from "./redact-wBMtzbno.js";
3
- import { M as get_client_adapter, T as get_all_available_servers } from "./index.js";
4
- import { n as output, t as error } from "./output-HtT5HCof.js";
3
+ import { D as get_all_available_servers, P as get_client_adapter } from "./index.js";
4
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
5
5
  import { defineCommand } from "citty";
6
6
  //#region src/cli/commands/list.ts
7
7
  var list_default = defineCommand({
@@ -97,4 +97,4 @@ async function list_client_servers(client, scope, json) {
97
97
  //#endregion
98
98
  export { list_default as default };
99
99
 
100
- //# sourceMappingURL=list-D5CkCXpP.js.map
100
+ //# sourceMappingURL=list-DMcaHDfM.js.map
@@ -1,6 +1,6 @@
1
- import { u as read_marketplace_manifest } from "./plugin-cache-BSgB42wa.js";
2
- import { g as marketplace_update_via_cli, h as marketplace_remove_via_cli, m as marketplace_list_via_cli, o as check_restored_hooks, p as marketplace_add_via_cli, u as redisable_restored_hooks } from "./index.js";
3
- import { n as output, t as error } from "./output-HtT5HCof.js";
1
+ import { u as read_marketplace_manifest } from "./plugin-cache-Dw1I2YuO.js";
2
+ import { _ as marketplace_remove_via_cli, c as check_restored_hooks, f as redisable_restored_hooks, g as marketplace_list_via_cli, h as marketplace_add_via_cli, v as marketplace_update_via_cli } from "./index.js";
3
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/cli/commands/marketplace.ts
6
6
  const list = defineCommand({
@@ -164,4 +164,4 @@ var marketplace_default = defineCommand({
164
164
  //#endregion
165
165
  export { marketplace_default as default };
166
166
 
167
- //# sourceMappingURL=marketplace-C3EGyIG0.js.map
167
+ //# sourceMappingURL=marketplace-DTW7Ys8k.js.map
@@ -0,0 +1,19 @@
1
+ import { i as get_claude_config_path, v as get_project_mcp_json_path } from "./paths-BPISiJi4.js";
2
+ //#region src/cli/mutation.ts
3
+ function claude_mutation_context(operation, scope, servers) {
4
+ return {
5
+ operation,
6
+ client: "claude-code",
7
+ scope,
8
+ location: scope === "project" ? get_project_mcp_json_path() : get_claude_config_path(),
9
+ servers
10
+ };
11
+ }
12
+ function print_mutation_details(input) {
13
+ if (input.location) console.log(`Config: ${input.location}`);
14
+ if (input.backup_path) console.log(`Backup: ${input.backup_path}`);
15
+ }
16
+ //#endregion
17
+ export { print_mutation_details as n, claude_mutation_context as t };
18
+
19
+ //# sourceMappingURL=mutation-ukRPw3qM.js.map
@@ -14,4 +14,4 @@ function error(message) {
14
14
  //#endregion
15
15
  export { output as n, error as t };
16
16
 
17
- //# sourceMappingURL=output-HtT5HCof.js.map
17
+ //# sourceMappingURL=output-BS1TMOWt.js.map
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
2
2
  import { d as get_marketplace_manifest_path, h as get_plugin_cache_dir, l as get_installed_plugins_path, t as ensure_directory_exists, u as get_known_marketplaces_path } from "./paths-BPISiJi4.js";
3
- import { W as atomic_json_write } from "./index.js";
3
+ import { K as atomic_json_write, c as check_restored_hooks, f as redisable_restored_hooks } from "./index.js";
4
4
  import { lstat, readFile, readdir, readlink, rename, rm, symlink } from "node:fs/promises";
5
5
  import { join, resolve } from "node:path";
6
6
  import { execFile } from "node:child_process";
@@ -226,6 +226,7 @@ async function clear_plugin_caches(keys) {
226
226
  const marketplaces = await read_known_marketplaces();
227
227
  const cleared = [];
228
228
  const errors = [];
229
+ let redisabledHooks;
229
230
  const marketplace_names = /* @__PURE__ */ new Set();
230
231
  for (const key of keys) {
231
232
  const { marketplace } = parse_plugin_key(key);
@@ -238,6 +239,11 @@ async function clear_plugin_caches(keys) {
238
239
  if (!result.success) errors.push(`Marketplace refresh failed: ${result.error}`);
239
240
  }
240
241
  }
242
+ const restored_hooks = await check_restored_hooks();
243
+ if (restored_hooks.length > 0) {
244
+ redisabledHooks = await redisable_restored_hooks(restored_hooks);
245
+ if (redisabledHooks.failed > 0) errors.push(`Failed to re-disable ${redisabledHooks.failed} restored hook(s).`);
246
+ }
241
247
  const cache_dir = get_plugin_cache_dir();
242
248
  for (const key of keys) {
243
249
  const { name, marketplace } = parse_plugin_key(key);
@@ -261,7 +267,8 @@ async function clear_plugin_caches(keys) {
261
267
  await write_installed_plugins(installed);
262
268
  return {
263
269
  cleared,
264
- errors
270
+ errors,
271
+ ...redisabledHooks ? { redisabledHooks } : {}
265
272
  };
266
273
  }
267
274
  async function clean_orphaned_versions() {
@@ -421,4 +428,4 @@ async function list_linked_plugins() {
421
428
  //#endregion
422
429
  export { list_linked_plugins as a, read_installed_plugins as c, refresh_all_marketplaces as d, scan_all_cache_keys as f, link_local_plugin as i, read_known_marketplaces as l, clear_plugin_caches as n, parse_plugin_key as o, unlink_local_plugin as p, get_cached_plugins_info as r, plugin_cache_exports as s, clean_orphaned_versions as t, read_marketplace_manifest as u };
423
430
 
424
- //# sourceMappingURL=plugin-cache-BSgB42wa.js.map
431
+ //# sourceMappingURL=plugin-cache-Dw1I2YuO.js.map
@@ -1,6 +1,6 @@
1
- import { l as read_known_marketplaces, o as parse_plugin_key } from "./plugin-cache-BSgB42wa.js";
2
- import { B as get_all_plugins, C as validate_plugin_via_cli, R as build_enabled_plugins, S as update_plugin_via_cli, U as write_claude_settings, V as read_claude_settings, f as install_plugin_via_cli, x as uninstall_plugin_via_cli } from "./index.js";
3
- import { n as output, t as error } from "./output-HtT5HCof.js";
1
+ import { l as read_known_marketplaces, o as parse_plugin_key } from "./plugin-cache-Dw1I2YuO.js";
2
+ import { B as build_enabled_plugins, C as uninstall_plugin_via_cli, G as write_claude_settings, H as get_all_plugins, T as validate_plugin_via_cli, U as read_claude_settings, m as install_plugin_via_cli, w as update_plugin_via_cli } from "./index.js";
3
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
4
4
  import { defineCommand } from "citty";
5
5
  var plugins_default = defineCommand({
6
6
  meta: {
@@ -208,4 +208,4 @@ var plugins_default = defineCommand({
208
208
  //#endregion
209
209
  export { plugins_default as default };
210
210
 
211
- //# sourceMappingURL=plugins-Dn2mPFKm.js.map
211
+ //# sourceMappingURL=plugins-BzLD4og0.js.map
@@ -0,0 +1,163 @@
1
+ import { L as resolve_client_location, P as get_client_adapter, a as save_profile_for_client, i as save_current_claude_profile, n as apply_profile_to_client, r as list_profiles, t as apply_profile_to_claude } from "./index.js";
2
+ import { n as print_mutation_details } from "./mutation-ukRPw3qM.js";
3
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
4
+ import { defineCommand } from "citty";
5
+ //#region src/cli/commands/profile.ts
6
+ const CLIENTS = "claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi";
7
+ var profile_default = defineCommand({
8
+ meta: {
9
+ name: "profile",
10
+ description: "Manage portable profiles (MCP servers + optional Claude 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
+ client: {
51
+ type: "string",
52
+ description: `Client to apply to: ${CLIENTS}`
53
+ },
54
+ scope: {
55
+ type: "string",
56
+ description: "Scope: local, project, or user"
57
+ },
58
+ location: {
59
+ type: "string",
60
+ description: "Exact config path when a client has multiple matching locations"
61
+ },
62
+ json: {
63
+ type: "boolean",
64
+ description: "Output as JSON",
65
+ default: false
66
+ }
67
+ },
68
+ async run({ args }) {
69
+ try {
70
+ if (args.client || args.scope || args.location) {
71
+ const client = args.client || "claude-code";
72
+ const adapter = get_client_adapter(client);
73
+ if (!adapter) error(`Invalid client: ${client}. Use ${CLIENTS}.`);
74
+ resolve_client_location(adapter, args.scope, args.location);
75
+ const result = await apply_profile_to_client({
76
+ name: args.name,
77
+ client,
78
+ scope: args.scope,
79
+ location: args.location
80
+ });
81
+ if (args.json) output(result, true);
82
+ else {
83
+ console.log(`Profile '${result.profile}' applied to ${result.client}:${result.scope} (${result.serverCount} servers)`);
84
+ print_mutation_details(result);
85
+ }
86
+ return;
87
+ }
88
+ const result = await apply_profile_to_claude(args.name);
89
+ if (args.json) output(result, true);
90
+ else {
91
+ const parts = [`${result.serverCount} servers`];
92
+ if (result.pluginCount > 0) parts.push(`${result.pluginCount} plugins`);
93
+ console.log(`Profile '${result.profile}' applied (${parts.join(", ")})`);
94
+ }
95
+ } catch (err) {
96
+ error(err instanceof Error ? err.message : "Failed to load profile");
97
+ }
98
+ }
99
+ }),
100
+ save: defineCommand({
101
+ meta: {
102
+ name: "save",
103
+ description: "Save current config as a portable profile"
104
+ },
105
+ args: {
106
+ name: {
107
+ type: "positional",
108
+ description: "Profile name",
109
+ required: true
110
+ },
111
+ client: {
112
+ type: "string",
113
+ description: `Client to save from: ${CLIENTS}`
114
+ },
115
+ scope: {
116
+ type: "string",
117
+ description: "Scope: local, project, or user"
118
+ },
119
+ location: {
120
+ type: "string",
121
+ description: "Exact config path when a client has multiple matching locations"
122
+ },
123
+ json: {
124
+ type: "boolean",
125
+ description: "Output as JSON",
126
+ default: false
127
+ }
128
+ },
129
+ async run({ args }) {
130
+ try {
131
+ if (args.client || args.scope || args.location) {
132
+ const client = args.client || "claude-code";
133
+ const adapter = get_client_adapter(client);
134
+ if (!adapter) error(`Invalid client: ${client}. Use ${CLIENTS}.`);
135
+ resolve_client_location(adapter, args.scope, args.location);
136
+ const result = await save_profile_for_client({
137
+ name: args.name,
138
+ client,
139
+ scope: args.scope,
140
+ location: args.location
141
+ });
142
+ if (args.json) output(result, true);
143
+ else console.log(`Profile '${result.profile}' saved from ${result.client}:${result.scope} (${result.serverCount} servers)`);
144
+ return;
145
+ }
146
+ const result = await save_current_claude_profile(args.name);
147
+ if (args.json) output(result, true);
148
+ else {
149
+ const parts = [`${result.serverCount} servers`];
150
+ if (result.pluginCount > 0) parts.push(`${result.pluginCount} plugins`);
151
+ console.log(`Profile '${result.profile}' saved (${parts.join(", ")})`);
152
+ }
153
+ } catch (err) {
154
+ error(err instanceof Error ? err.message : "Failed to save profile");
155
+ }
156
+ }
157
+ })
158
+ }
159
+ });
160
+ //#endregion
161
+ export { profile_default as default };
162
+
163
+ //# sourceMappingURL=profile-CmIWUJH_.js.map
@@ -1,4 +1,4 @@
1
- import { n as output } from "./output-HtT5HCof.js";
1
+ import { n as output } from "./output-BS1TMOWt.js";
2
2
  import { defineCommand } from "citty";
3
3
  //#region src/cli/commands/reload.ts
4
4
  var reload_default = defineCommand({
@@ -28,4 +28,4 @@ var reload_default = defineCommand({
28
28
  //#endregion
29
29
  export { reload_default as default };
30
30
 
31
- //# sourceMappingURL=reload-257iU7Z7.js.map
31
+ //# sourceMappingURL=reload-Di28s_rY.js.map
@@ -1,5 +1,6 @@
1
- import { F as resolve_client_location, M as get_client_adapter, O as read_server_registry, P as remove_client_server, T as get_all_available_servers, b as remove_mcp_via_cli, k as write_server_registry } from "./index.js";
2
- import { n as output, t as error } from "./output-HtT5HCof.js";
1
+ import { A as read_server_registry, D as get_all_available_servers, I as remove_client_server, L as resolve_client_location, P as get_client_adapter, S as remove_mcp_via_cli, j as write_server_registry } from "./index.js";
2
+ import { n as print_mutation_details, t as claude_mutation_context } from "./mutation-ukRPw3qM.js";
3
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
3
4
  import { defineCommand } from "citty";
4
5
  //#region src/cli/commands/remove.ts
5
6
  var remove_default = defineCommand({
@@ -51,12 +52,15 @@ var remove_default = defineCommand({
51
52
  await write_server_registry(registry);
52
53
  }
53
54
  await remove_mcp_via_cli(args.server, scope);
55
+ const mutation = claude_mutation_context("remove", scope, [args.server]);
54
56
  if (args.json) output({
55
57
  removed: args.server,
56
- client: "claude-code",
57
- scope
58
+ ...mutation
58
59
  }, true);
59
- else console.log(`Removed '${args.server}'`);
60
+ else {
61
+ console.log(`Removed '${args.server}'`);
62
+ print_mutation_details(mutation);
63
+ }
60
64
  }
61
65
  });
62
66
  async function remove_from_client(client, server, scope, location_path, json) {
@@ -69,14 +73,15 @@ async function remove_from_client(client, server, scope, location_path, json) {
69
73
  ].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
70
74
  try {
71
75
  const location = resolve_client_location(adapter, scope, location_path);
72
- await remove_client_server(adapter, location, server);
76
+ const mutation = await remove_client_server(adapter, location, server);
73
77
  if (json) output({
74
78
  removed: server,
75
- client: adapter.id,
76
- scope: location.scope,
77
- location: location.path
79
+ ...mutation
78
80
  }, true);
79
- else console.log(`Removed '${server}' (${adapter.id}:${location.scope})`);
81
+ else {
82
+ console.log(`Removed '${server}' (${adapter.id}:${location.scope})`);
83
+ print_mutation_details(mutation);
84
+ }
80
85
  } catch (err) {
81
86
  error(err instanceof Error ? err.message : "Failed to remove server");
82
87
  }
@@ -84,4 +89,4 @@ async function remove_from_client(client, server, scope, location_path, json) {
84
89
  //#endregion
85
90
  export { remove_default as default };
86
91
 
87
- //# sourceMappingURL=remove-26XFzkPd.js.map
92
+ //# sourceMappingURL=remove-B32EuYRC.js.map
@@ -1,5 +1,5 @@
1
- import { y as mcp_reset_project_choices_via_cli } from "./index.js";
2
- import { n as output, t as error } from "./output-HtT5HCof.js";
1
+ import { x as mcp_reset_project_choices_via_cli } from "./index.js";
2
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
3
3
  import { defineCommand } from "citty";
4
4
  //#region src/cli/commands/reset-project-choices.ts
5
5
  var reset_project_choices_default = defineCommand({
@@ -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-D2F04LfC.js.map
28
+ //# sourceMappingURL=reset-project-choices-DX4TnZ2i.js.map
@@ -1,7 +1,7 @@
1
- import { t as validate_claude_config } from "./validation-xMlbgGCF.js";
2
- import { c as write_claude_config } from "./config-DzMmTJYL.js";
3
- import { D as list_plugin_backups, E as list_backups, U as write_claude_settings } from "./index.js";
4
- import { n as output, t as error } from "./output-HtT5HCof.js";
1
+ import { t as validate_claude_config } from "./validation-CfPAjPJ5.js";
2
+ import { s as write_claude_config } from "./config-Bzh374VP.js";
3
+ import { G as write_claude_settings, O as list_backups, k as list_plugin_backups } from "./index.js";
4
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
5
5
  import { readFile } from "node:fs/promises";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/cli/commands/restore.ts
@@ -80,4 +80,4 @@ var restore_default = defineCommand({
80
80
  //#endregion
81
81
  export { restore_default as default };
82
82
 
83
- //# sourceMappingURL=restore-BYYsoNqF.js.map
83
+ //# sourceMappingURL=restore-ByS4xi0y.js.map
@@ -1,5 +1,5 @@
1
- import { G as list_config_backups, K as restore_config_backup } from "./index.js";
2
- import { n as output, t as error } from "./output-HtT5HCof.js";
1
+ import { J as restore_config_backup, q as list_config_backups } from "./index.js";
2
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
3
3
  import { defineCommand } from "citty";
4
4
  //#region src/cli/commands/rollback.ts
5
5
  var rollback_default = defineCommand({
@@ -52,4 +52,4 @@ var rollback_default = defineCommand({
52
52
  //#endregion
53
53
  export { rollback_default as default };
54
54
 
55
- //# sourceMappingURL=rollback-CPdaME91.js.map
55
+ //# sourceMappingURL=rollback-DdDJrA8y.js.map
@@ -1,5 +1,5 @@
1
- import { a as split_cli_list, i as run_skills_cli } from "./index.js";
2
- import { n as output, t as error } from "./output-HtT5HCof.js";
1
+ import { o as run_skills_cli, s as split_cli_list } from "./index.js";
2
+ import { n as output, t as error } from "./output-BS1TMOWt.js";
3
3
  import { defineCommand } from "citty";
4
4
  //#region src/cli/commands/skills.ts
5
5
  function add_agent_args(cli_args, agent) {
@@ -213,4 +213,4 @@ var skills_default = defineCommand({
213
213
  //#endregion
214
214
  export { skills_default as default };
215
215
 
216
- //# sourceMappingURL=skills-DfWk9mpk.js.map
216
+ //# sourceMappingURL=skills-pvyQ17XU.js.map
@@ -28,7 +28,26 @@ const mcp_server_schema_base = v.union([
28
28
  ]);
29
29
  const mcp_server_schema = v.intersect([v.object({ name: v.pipe(v.string(), v.minLength(1)) }), mcp_server_schema_base]);
30
30
  const claude_config_schema = v.object({ mcpServers: v.optional(v.record(v.string(), mcp_server_schema_base)) });
31
- const server_registry_schema = v.object({ servers: v.array(mcp_server_schema) });
31
+ const portable_mcp_server_schema = v.object({
32
+ name: v.pipe(v.string(), v.minLength(1)),
33
+ transport: v.union([
34
+ v.literal("stdio"),
35
+ v.literal("http"),
36
+ v.literal("sse")
37
+ ]),
38
+ command: v.optional(v.string()),
39
+ args: v.optional(v.array(v.string())),
40
+ url: v.optional(v.string()),
41
+ env: v.optional(v.record(v.string(), v.string())),
42
+ headers: v.optional(v.record(v.string(), v.string())),
43
+ description: v.optional(v.string()),
44
+ disabled: v.optional(v.boolean()),
45
+ client_options: v.optional(v.record(v.string(), v.unknown()))
46
+ });
47
+ const server_registry_schema = v.object({
48
+ version: v.literal(3),
49
+ servers: v.array(portable_mcp_server_schema)
50
+ });
32
51
  function validate_mcp_server(data) {
33
52
  return v.parse(mcp_server_schema, data);
34
53
  }
@@ -41,4 +60,4 @@ function validate_server_registry(data) {
41
60
  //#endregion
42
61
  export { validate_mcp_server as n, validate_server_registry as r, validate_claude_config as t };
43
62
 
44
- //# sourceMappingURL=validation-xMlbgGCF.js.map
63
+ //# sourceMappingURL=validation-CfPAjPJ5.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcpick",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "Vendor-neutral MCP configuration manager with first-class Claude Code support",
5
5
  "keywords": [
6
6
  "claude",
@@ -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