@kubb/cli
Version:
Command-line interface for Kubb, enabling easy generation of TypeScript, React-Query, Zod, and other code from OpenAPI specifications.
42 lines (40 loc) • 1.22 kB
JavaScript
const require_chunk = require('./chunk-CNbaEX1y.cjs');
let citty = require("citty");
let node_util = require("node:util");
let jiti = require("jiti");
//#region src/commands/mcp.ts
const jiti$1 = (0, jiti.createJiti)(require("url").pathToFileURL(__filename).href, { sourceMaps: true });
const command = (0, citty.defineCommand)({
meta: {
name: "mcp",
description: "Start the server to enable the MCP client to interact with the LLM."
},
args: { help: {
type: "boolean",
description: "Show help",
alias: "h",
default: false
} },
async run(commandContext) {
const { args } = commandContext;
if (args.help) return (0, citty.showUsage)(command);
let mod;
try {
mod = await jiti$1.import("@kubb/mcp", { default: true });
} catch (_e) {
console.error(`Import of '@kubb/mcp' is required to start the MCP server`);
process.exit(1);
}
const { run } = mod;
try {
console.log("⏳ Starting MCP server...");
console.warn((0, node_util.styleText)("yellow", "This feature is still under development — use with caution"));
await run();
} catch (error) {
console.error(error?.message);
}
}
});
//#endregion
exports.default = command;
//# sourceMappingURL=mcp-97TXkJVX.cjs.map