mcpick 0.0.22 → 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 +20 -0
- package/README.md +4 -0
- package/dist/add-Qzd8i-5k.js +184 -0
- package/dist/add-json-DGmsjB0O.js +115 -0
- package/dist/{backup-bdg6dvsb.js → backup-C7fvikFw.js} +5 -5
- package/dist/{cache-CSUcGdZP.js → cache-D3jjh5dD.js} +3 -3
- package/dist/{cli-avr5R1LO.js → cli-CZOlaqoZ.js} +22 -21
- package/dist/{clients-CSQgqHzb.js → clients-Bh93TGP4.js} +3 -3
- package/dist/{clone-CQ0skkT6.js → clone-MI8jJhTz.js} +6 -6
- package/dist/{config-BhX4eAgg.js → config-DE58Fik_.js} +4 -4
- package/dist/{dev-CTDg5g-c.js → dev-51esdZG9.js} +6 -6
- package/dist/disable-csYAn2Vk.js +106 -0
- package/dist/dry-run-XQ32fxPT.js +20 -0
- package/dist/enable-B5GbmhL-.js +107 -0
- package/dist/{get-l-eAJhBy.js → get-DacRZmwv.js} +3 -3
- package/dist/{hooks-BWZ_Kgx3.js → hooks-C_x49qap.js} +3 -4
- package/dist/index.js +717 -116
- package/dist/{list-By--kltj.js → list-BeBtsiae.js} +5 -5
- package/dist/{marketplace-DdiKDDKK.js → marketplace-BDC2YtvT.js} +4 -4
- package/dist/{output-BgN9Uuxf.js → output-HtT5HCof.js} +2 -2
- package/dist/{paths-6wrIM8yh.js → paths-BPISiJi4.js} +1 -1
- package/dist/{plugin-cache-DKcW8LGV.js → plugin-cache-DmLbh89d.js} +35 -16
- package/dist/{plugins-CsXE8AH4.js → plugins-Bkw-SKkZ.js} +4 -5
- package/dist/profile-DwJTVXiz.js +161 -0
- package/dist/{redact-Dltz2gde.js → redact-wBMtzbno.js} +1 -1
- package/dist/{reload-C29-vuvy.js → reload-Bl1mYK1I.js} +2 -2
- package/dist/remove-BSHgva79.js +107 -0
- package/dist/{reset-project-choices-Dhh4CxIC.js → reset-project-choices-BNLus9J9.js} +3 -3
- package/dist/{restore-BI8aiszM.js → restore-YisgARhc.js} +5 -6
- package/dist/rollback-GR1RkpXW.js +55 -0
- package/dist/{skills-DPBDmION.js → skills-rDTDqqZA.js} +3 -3
- package/dist/{validation-qWlF51fw.js → validation-xMlbgGCF.js} +1 -1
- package/package.json +4 -4
- package/.github/copilot-instructions.md +0 -50
- package/.github/workflows/ci.yml +0 -26
- package/.vscode/settings.json +0 -5
- package/CONTEXT.md +0 -49
- package/dist/add-Bok0qbXi.js +0 -112
- package/dist/add-json-C44vy2A_.js +0 -58
- package/dist/atomic-write-4lANmzsO.js +0 -26
- package/dist/disable-DLlOj7sc.js +0 -38
- package/dist/enable-CGFYYC2A.js +0 -39
- package/dist/profile-DzGPsdsl.js +0 -120
- package/dist/remove-B5q4rQRU.js +0 -30
- package/dist/settings-CZR8bVfh.js +0 -201
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { G as build_command_preview, I as get_client_adapter, U as resolve_client_location, V as preview_set_client_enabled_servers, W as set_client_server_enabled, f as add_mcp_via_cli, k as get_all_available_servers, p as build_add_args } from "./index.js";
|
|
2
|
+
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
3
|
+
import { t as print_dry_run } from "./dry-run-XQ32fxPT.js";
|
|
4
|
+
import { defineCommand } from "citty";
|
|
5
|
+
//#region src/cli/commands/enable.ts
|
|
6
|
+
var enable_default = defineCommand({
|
|
7
|
+
meta: {
|
|
8
|
+
name: "enable",
|
|
9
|
+
description: "Enable an MCP server"
|
|
10
|
+
},
|
|
11
|
+
args: {
|
|
12
|
+
server: {
|
|
13
|
+
type: "positional",
|
|
14
|
+
description: "Server name to enable",
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
client: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "Client to edit: claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi",
|
|
20
|
+
default: "claude-code"
|
|
21
|
+
},
|
|
22
|
+
scope: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Scope: local, project, or user (default: local for Claude Code)"
|
|
25
|
+
},
|
|
26
|
+
location: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Exact config path when a client has multiple matching locations"
|
|
29
|
+
},
|
|
30
|
+
dryRun: {
|
|
31
|
+
type: "boolean",
|
|
32
|
+
description: "Preview changes without writing",
|
|
33
|
+
default: false
|
|
34
|
+
},
|
|
35
|
+
json: {
|
|
36
|
+
type: "boolean",
|
|
37
|
+
description: "Output as JSON",
|
|
38
|
+
default: false
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
async run({ args }) {
|
|
42
|
+
if (args.client && args.client !== "claude-code") {
|
|
43
|
+
await enable_client_server(args.client, args.server, args.scope, args.location, args.json, args.dryRun);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const scope = args.scope || "local";
|
|
47
|
+
if (![
|
|
48
|
+
"local",
|
|
49
|
+
"project",
|
|
50
|
+
"user"
|
|
51
|
+
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
52
|
+
const server = (await get_all_available_servers()).find((s) => s.name === args.server);
|
|
53
|
+
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
|
+
const result = await add_mcp_via_cli(server, scope);
|
|
65
|
+
if (!result.success) error(result.error || "Failed to enable server");
|
|
66
|
+
if (args.json) output({
|
|
67
|
+
enabled: server.name,
|
|
68
|
+
client: "claude-code",
|
|
69
|
+
scope
|
|
70
|
+
}, true);
|
|
71
|
+
else console.log(`Enabled '${server.name}' (scope: ${scope})`);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
async function enable_client_server(client, server, scope, location_path, json, dry_run) {
|
|
75
|
+
const adapter = get_client_adapter(client);
|
|
76
|
+
if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
|
|
77
|
+
if (scope && ![
|
|
78
|
+
"local",
|
|
79
|
+
"project",
|
|
80
|
+
"user"
|
|
81
|
+
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
82
|
+
try {
|
|
83
|
+
const location = resolve_client_location(adapter, scope, location_path);
|
|
84
|
+
const servers = await adapter.readLocation(location);
|
|
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);
|
|
92
|
+
if (json) output({
|
|
93
|
+
enabled: server,
|
|
94
|
+
client: adapter.id,
|
|
95
|
+
scope: location.scope,
|
|
96
|
+
location: location.path,
|
|
97
|
+
enabledCount: enabled_count
|
|
98
|
+
}, true);
|
|
99
|
+
else console.log(`Enabled '${server}' (${adapter.id}:${location.scope})`);
|
|
100
|
+
} catch (err) {
|
|
101
|
+
error(err instanceof Error ? err.message : "Failed to enable server");
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
export { enable_default as default };
|
|
106
|
+
|
|
107
|
+
//# sourceMappingURL=enable-B5GbmhL-.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as output, t as error } from "./output-
|
|
1
|
+
import { S as mcp_get_via_cli } from "./index.js";
|
|
2
|
+
import { n as output, t as error } from "./output-HtT5HCof.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-DacRZmwv.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as output, t as error } from "./output-BgN9Uuxf.js";
|
|
1
|
+
import { Q as remove_hook, Y as get_all_hooks, c as disable_plugin_hook, d as redisable_restored_hooks, l as enable_plugin_hook, q as add_hook, s as check_restored_hooks, u as read_disabled_hooks } from "./index.js";
|
|
2
|
+
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
4
3
|
import { defineCommand } from "citty";
|
|
5
4
|
var hooks_default = defineCommand({
|
|
6
5
|
meta: {
|
|
@@ -277,4 +276,4 @@ var hooks_default = defineCommand({
|
|
|
277
276
|
//#endregion
|
|
278
277
|
export { hooks_default as default };
|
|
279
278
|
|
|
280
|
-
//# sourceMappingURL=hooks-
|
|
279
|
+
//# sourceMappingURL=hooks-C_x49qap.js.map
|