UNPKG

agp-cli

Version:

Agentic Programming Project CLI - Standardized knowledge layer for AI-assisted development

30 lines 1.29 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.connectCommand = void 0; const commander_1 = require("commander"); const agp_connect_1 = require("../utils/agp-connect"); const logger_1 = require("../utils/logger"); exports.connectCommand = new commander_1.Command('connect') .description('Configure AGP for specific AI tools') .argument('<tool>', 'AI tool to configure (claude, cursor, chatgpt)') .option('--config <path>', 'Custom configuration file path') .action(async (tool, options) => { try { const supportedTools = ['claude', 'cursor', 'chatgpt']; if (!supportedTools.includes(tool.toLowerCase())) { throw new Error(`Unsupported tool: ${tool}. Supported tools: ${supportedTools.join(', ')}`); } await logger_1.logger.withSpinner(`Configuring ${tool}`, async () => { await (0, agp_connect_1.connectToAiTool)({ tool: tool.toLowerCase(), configPath: options.config, }); }); } catch (error) { logger_1.logger.error('Failed to configure AGP:'); logger_1.logger.error(error instanceof Error ? error.message : 'Unknown error'); process.exit(1); } }); //# sourceMappingURL=connect.js.map