UNPKG

@simonecoelhosfo/optimizely-mcp-server

Version:

Optimizely MCP Server for AI assistants with integrated CLI tools

146 lines 4.46 kB
#!/usr/bin/env node /** * Optimizely MCP Server CLI - Comprehensive Analytics & Management Tool * @description A powerful CLI for managing Optimizely data with structured * analytics, advanced querying, and comprehensive data operations. * * Features: * - 🔍 Structured Analytics Engine (PRIMARY TOOL) * - Interactive REPL mode with autocomplete * - Granular sync control with entity/environment filtering * - Advanced query interface with SQL support * - Export/Import in multiple formats (JSON, CSV, YAML) * - Real-time watch mode with auto-sync * - Diff and comparison tools * - Performance analytics and monitoring * - Database backup/restore * - Schema migration management * * @author Optimizely MCP Server Team * @version 3.1.0 */ import * as repl from 'repl'; import { ConfigManager } from '../config/ConfigManager.js'; import { CacheManager } from '../cache/CacheManager.js'; import { OptimizelyMCPTools } from '../tools/OptimizelyMCPTools.js'; import { SQLiteEngine } from '../storage/SQLiteEngine.js'; import { OptimizelyAPIHelper } from '../api/OptimizelyAPIHelper.js'; import { StaticProgressReporter } from './StaticProgressReporter.js'; import { CompactProgressReporter } from './CompactProgressReporter.js'; interface CLIContext { config: ConfigManager; cache: CacheManager; tools: OptimizelyMCPTools; storage: SQLiteEngine; api: OptimizelyAPIHelper; progressReporter?: StaticProgressReporter | CompactProgressReporter; options: CLIOptions; } interface CLIOptions { verbose?: boolean; json?: boolean; csv?: boolean; yaml?: boolean; output?: string; force?: boolean; dryRun?: boolean; noColor?: boolean; profile?: string; } /** * Main CLI Class - Orchestrates all commands */ export declare class OptlyCLI { private program; protected context?: CLIContext; protected replServer?: repl.REPLServer; protected watchIntervals: Map<string, NodeJS.Timeout>; constructor(); /** * Setup main program with all commands */ private setupProgram; /** * Initialize CLI context */ protected initializeContext(options: CLIOptions): Promise<void>; /** * Add sync-related commands */ private addSyncCommands; /** * Add query-related commands */ private addQueryCommands; /** * Add entity management commands */ private addEntityCommands; /** * Add export/import commands */ private addExportImportCommands; /** * Add database management commands */ private addDatabaseCommands; /** * Add analytics commands */ private addAnalyticsCommands; /** * Add watch mode commands */ private addWatchCommands; /** * Add diff/comparison commands */ private addDiffCommands; /** * Add configuration commands */ private addConfigCommands; /** * Add interactive REPL command */ private addInteractiveCommand; /** * Add convenient shortcuts for common commands */ private addShortcuts; [key: string]: any; /** * Handle setup-docs command - copy documentation to current directory */ handleSetupDocs(): Promise<void>; /** * Handle sync command by delegating to enhanced cache sync */ handleSync(options: any): Promise<void>; /** * Handle sync status command */ handleSyncStatus(): Promise<void>; /** * Execute CLI */ execute(argv?: string[]): Promise<void>; /** * Cleanup resources */ cleanup(): Promise<void>; handleApiRefSchema(entityType: string, options: any): Promise<void>; handleApiRefFields(entityType: string, options: any): Promise<void>; handleApiRefExamples(entityType: string, options: any): Promise<void>; handleApiRefValidation(entityType: string, options: any): Promise<void>; handleApiRefDependencies(entityType: string, options: any): Promise<void>; handleApiRefSearch(query: string, options: any): Promise<void>; handleApiRefMethod(methodName: string, options: any): Promise<void>; handleApiRefSdk(sdkName: string, options: any): Promise<void>; handleApiRefBrowse(options: any): Promise<void>; outputResults(result: any, options: any): Promise<void>; } export declare function createCLI(): OptlyCLI; export declare let cli: OptlyCLI; export {}; //# sourceMappingURL=OptlyCLI.d.ts.map