@wuyax/mcps 0.1.0-beta.1 → 0.1.0-beta.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/README.md +339 -115
- package/dist/{chunk-XW2KL6W3.js → chunk-7V5XL4RI.js} +728 -144
- package/dist/cli.cjs +735 -179
- package/dist/cli.js +5 -17
- package/dist/index.cjs +743 -145
- package/dist/index.d.cts +78 -2
- package/dist/index.d.ts +78 -2
- package/dist/index.js +25 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4,6 +4,8 @@ import {
|
|
|
4
4
|
listInstalledMcpServers,
|
|
5
5
|
logger,
|
|
6
6
|
mainMenu,
|
|
7
|
+
mcpManageCommand,
|
|
8
|
+
parseKeyValueList,
|
|
7
9
|
parseMcpAgentList,
|
|
8
10
|
parseMcpSource,
|
|
9
11
|
removeMcpServer,
|
|
@@ -11,7 +13,7 @@ import {
|
|
|
11
13
|
toErrorMessage,
|
|
12
14
|
wizardAdd,
|
|
13
15
|
wizardRemove
|
|
14
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7V5XL4RI.js";
|
|
15
17
|
|
|
16
18
|
// src/cli.ts
|
|
17
19
|
import { Command as Command4 } from "commander";
|
|
@@ -24,21 +26,6 @@ import pc from "picocolors";
|
|
|
24
26
|
var formatAgentList = (agentList, emptyLabel = "(none)") => agentList.length === 0 ? emptyLabel : agentList.join(", ");
|
|
25
27
|
|
|
26
28
|
// src/cli/add.ts
|
|
27
|
-
var parseKeyValueList = (entries, separator) => {
|
|
28
|
-
if (!entries || entries.length === 0) return {};
|
|
29
|
-
const result = {};
|
|
30
|
-
for (const entry of entries) {
|
|
31
|
-
const splitIndex = entry.indexOf(separator);
|
|
32
|
-
if (splitIndex === -1) {
|
|
33
|
-
throw new Error(`Invalid entry "${entry}": expected "${separator}" separator`);
|
|
34
|
-
}
|
|
35
|
-
const key = entry.slice(0, splitIndex).trim();
|
|
36
|
-
const value = entry.slice(splitIndex + separator.length).trim();
|
|
37
|
-
if (!key) throw new Error(`Invalid entry "${entry}": empty key`);
|
|
38
|
-
result[key] = value;
|
|
39
|
-
}
|
|
40
|
-
return result;
|
|
41
|
-
};
|
|
42
29
|
var resolveTransport = (input) => {
|
|
43
30
|
if (!input) return void 0;
|
|
44
31
|
if (input === "http" || input === "sse") return input;
|
|
@@ -204,12 +191,13 @@ var mcpRemoveCommand = new Command3("remove").alias("rm").description("Remove an
|
|
|
204
191
|
});
|
|
205
192
|
|
|
206
193
|
// src/cli.ts
|
|
207
|
-
var VERSION = "0.1.0-beta.
|
|
194
|
+
var VERSION = "0.1.0-beta.2";
|
|
208
195
|
process.on("SIGINT", () => process.exit(0));
|
|
209
196
|
process.on("SIGTERM", () => process.exit(0));
|
|
210
197
|
var program = new Command4().name("mcps").description("Install, list, and remove MCP servers across AI coding agents").version(VERSION, "-v, --version", "display the version number");
|
|
211
198
|
program.addCommand(mcpAddCommand);
|
|
212
199
|
program.addCommand(mcpListCommand);
|
|
200
|
+
program.addCommand(mcpManageCommand);
|
|
213
201
|
program.addCommand(mcpRemoveCommand);
|
|
214
202
|
var main = async () => {
|
|
215
203
|
if (process.argv.length <= 2 && process.stdin.isTTY) {
|