UNPKG

automagik-genie

Version:

Self-evolving AI agent orchestration framework with Model Context Protocol support

48 lines (39 loc) • 1.6 kB
#!/usr/bin/env node /** * Automagik Genie Entry Point * * When called without arguments, launches unified startup (Forge + MCP + Auth) * Otherwise delegates to genie-cli for other commands */ const path = require('path'); const fs = require('fs'); // Check if this is a unified startup (no args) or CLI command const args = process.argv.slice(2); const isUnifiedStartup = args.length === 0; if (isUnifiedStartup) { // Launch unified startup (Forge + MCP together) const unifiedStartup = path.join(__dirname, '..', 'dist', 'cli', 'unified-startup.js'); // Hard dependency check: Ensure unified-startup.js exists if (!fs.existsSync(unifiedStartup)) { console.error('āŒ Error: unified-startup.js not found'); console.error('šŸ“ Expected at: ' + unifiedStartup); console.error('\nšŸ’” This usually means the project wasn\'t built correctly.'); console.error(' Run: pnpm run build'); console.error(' Or: npm run build\n'); process.exit(1); } require(unifiedStartup); } else { // Delegate to genie-cli for commands like 'genie run', 'genie forge start', etc. const entry = path.join(__dirname, '..', 'dist', 'cli', 'genie-cli.js'); // Hard dependency check: Ensure genie-cli.js exists if (!fs.existsSync(entry)) { console.error('āŒ Error: genie-cli.js not found'); console.error('šŸ“ Expected at: ' + entry); console.error('\nšŸ’” This usually means the project wasn\'t built correctly.'); console.error(' Run: pnpm run build'); console.error(' Or: npm run build\n'); process.exit(1); } require(entry); }