fusion-mcp-cli
Version:
CLI tool for Fusion MCP Hub - Manage custom and community MCP servers. Web App: https://fusion-mcp-hub.vercel.app (General) | https://fusion-mcp-prod.isc-code-connect.dal.app.cirrus.ibm.com (IBM)
43 lines • 1.61 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const commander_1 = require("commander");
const chalk_1 = __importDefault(require("chalk"));
const auth_1 = require("./commands/auth");
const workspace_1 = require("./commands/workspace");
const server_1 = require("./commands/server");
const config_1 = require("./commands/config");
const community_1 = require("./commands/community");
const program = new commander_1.Command();
program
.name("fmcp")
.description("CLI tool for managing Fusion MCP custom servers")
.version("0.3.0");
// Add commands
program.addCommand(auth_1.authCommand);
program.addCommand(workspace_1.workspaceCommand);
program.addCommand(server_1.serverCommand);
program.addCommand(config_1.configCommand);
program.addCommand(community_1.communityCommand);
// Global error handler
program.exitOverride((err) => {
// Exit cleanly for help and version commands
if (err.code === "commander.help" || err.code === "commander.version" || err.code === "commander.helpDisplayed") {
process.exit(0);
}
// Only show error for actual errors
if (err.code !== "commander.executeSubCommand") {
console.error(chalk_1.default.red("Error:"), err.message);
}
process.exit(1);
});
// Parse arguments
program.parse(process.argv);
// Show help if no command provided
if (!process.argv.slice(2).length) {
program.outputHelp();
}
//# sourceMappingURL=index.js.map