UNPKG

ai-expert

Version:

AI Expert CLI - Advanced management system for specialized Claude assistants

45 lines 1.7 kB
#!/usr/bin/env node import { Command } from 'commander'; import { expertCommand } from './commands/expert.js'; import { systemCommand } from './commands/system.js'; import { contextCommand } from './commands/context.js'; import { ruleCommand } from './commands/rule.js'; import { queryCommand } from './commands/query.js'; import { configCommand } from './commands/config.js'; import { openCommand } from './commands/open.js'; import { StorageService } from '../services/storage.js'; async function main() { const storage = new StorageService(); await storage.init(); const program = new Command(); program .name('ai') .description('AI Expert CLI - Manage and query specialized Claude assistants') .version('1.0.0'); // Add commands program.addCommand(expertCommand(storage)); program.addCommand(systemCommand(storage)); program.addCommand(contextCommand(storage)); program.addCommand(ruleCommand(storage)); program.addCommand(configCommand(storage)); program.addCommand(openCommand(storage)); // Default query command program .argument('[expert]', 'Expert name or slug') .argument('[question...]', 'Question to ask') .option('-i, --interactive', 'Start interactive session') .action(async (expert, question, options) => { if (!expert) { program.help(); return; } const query = queryCommand(storage); await query.execute(expert, question?.join(' '), options); }); await program.parseAsync(); } main().catch(error => { console.error('❌ Error:', error.message); process.exit(1); }); //# sourceMappingURL=index.js.map