UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

138 lines 6.42 kB
/** * Setup Command Factory for NeuroLink * Consolidates all provider setup commands into a unified interface */ import { handleGCPSetup } from "../commands/setup-gcp.js"; import { handleBedrockSetup } from "../commands/setup-bedrock.js"; import { handleOpenAISetup } from "../commands/setup-openai.js"; import { handleGoogleAISetup } from "../commands/setup-google-ai.js"; import { handleAnthropicSetup } from "../commands/setup-anthropic.js"; import { handleAzureSetup } from "../commands/setup-azure.js"; import { handleHuggingFaceSetup } from "../commands/setup-huggingface.js"; import { handleMistralSetup } from "../commands/setup-mistral.js"; import { handleSetup } from "../commands/setup.js"; /** * Setup Command Factory */ export class SetupCommandFactory { /** * Create the main setup command with all provider subcommands */ static createSetupCommands() { return { command: ["setup [provider]", "s [provider]"], describe: "Setup AI provider configurations", builder: (yargs) => { return (yargs .positional("provider", { type: "string", description: "Specific provider to set up", choices: [ "google-ai", "openai", "anthropic", "azure", "bedrock", "gcp", "vertex", "huggingface", "mistral", ], }) .option("list", { type: "boolean", description: "List all available providers", alias: "l", }) .option("status", { type: "boolean", description: "Show provider configuration status", }) .option("check", { type: "boolean", description: "Only check existing configuration without prompting", default: false, }) .option("non-interactive", { type: "boolean", description: "Skip interactive prompts", default: false, }) .option("quiet", { type: "boolean", alias: "q", default: false, description: "Suppress non-essential output", }) .option("debug", { type: "boolean", default: false, description: "Enable debug output", }) // Subcommands for each provider .command("google-ai", "Setup Google AI Studio configuration", (y) => this.buildProviderOptions(y), // eslint-disable-next-line @typescript-eslint/no-explicit-any async (argv) => await handleGoogleAISetup(argv)) .command("openai", "Setup OpenAI configuration", (y) => this.buildProviderOptions(y), // eslint-disable-next-line @typescript-eslint/no-explicit-any async (argv) => await handleOpenAISetup(argv)) .command("anthropic", "Setup Anthropic Claude configuration", (y) => this.buildProviderOptions(y), // eslint-disable-next-line @typescript-eslint/no-explicit-any async (argv) => await handleAnthropicSetup(argv)) .command("azure", "Setup Azure OpenAI configuration", (y) => this.buildProviderOptions(y), // eslint-disable-next-line @typescript-eslint/no-explicit-any async (argv) => await handleAzureSetup(argv)) .command("bedrock", "Setup AWS Bedrock configuration", (y) => this.buildProviderOptions(y), // eslint-disable-next-line @typescript-eslint/no-explicit-any async (argv) => await handleBedrockSetup(argv)) .command(["gcp", "vertex"], "Setup Google Cloud Platform / Vertex AI configuration", (y) => this.buildProviderOptions(y), // eslint-disable-next-line @typescript-eslint/no-explicit-any async (argv) => await handleGCPSetup(argv)) .command("huggingface", "Setup Hugging Face configuration", (y) => this.buildProviderOptions(y), // eslint-disable-next-line @typescript-eslint/no-explicit-any async (argv) => await handleHuggingFaceSetup(argv)) .command("mistral", "Setup Mistral AI configuration", (y) => this.buildProviderOptions(y), // eslint-disable-next-line @typescript-eslint/no-explicit-any async (argv) => await handleMistralSetup(argv)) .example("$0 setup", "Interactive setup wizard") .example("$0 setup google-ai", "Setup Google AI Studio") .example("$0 setup openai --check", "Check OpenAI configuration") .example("$0 setup --list", "List all providers") .example("$0 setup --status", "Check provider status") .help()); }, handler: async (argv) => { // If no subcommand specified, run main setup wizard await handleSetup(argv); }, }; } /** * Build common options for provider setup commands */ static buildProviderOptions(yargs) { return yargs .option("check", { type: "boolean", describe: "Only check existing configuration without prompting", default: false, }) .option("non-interactive", { type: "boolean", describe: "Skip interactive prompts", default: false, }) .option("quiet", { type: "boolean", alias: "q", default: false, description: "Suppress non-essential output", }) .option("debug", { type: "boolean", default: false, description: "Enable debug output", }); } } //# sourceMappingURL=setupCommandFactory.js.map