UNPKG

@podx/cli

Version:

💻 Command-line interface for PODx - Advanced Twitter/X scraping and crypto analysis toolkit

42 lines (32 loc) • 1.07 kB
#!/usr/bin/env node import { Command } from 'commander'; import { registerCommands } from './commands/index.js'; import { displayBanner } from './ui/banner.js'; export function createCLI(): Command { const program = new Command(); program .name('podx') .description('PODx - Advanced X (Twitter) Scraper and Crypto Analysis Tool') .version('2.0.0'); // Register all commands registerCommands(program); return program; } export async function runCLI(): Promise<void> { const program = createCLI(); // If no arguments provided, launch interactive mode if (process.argv.length <= 2) { const { showWelcomeBanner } = await import('./ui/banner.js'); const { runInteractiveMode } = await import('./handlers/interactive.js'); showWelcomeBanner(); await runInteractiveMode(); return; } // Show simple banner for command mode displayBanner(); await program.parseAsync(); } // Run CLI if this file is executed directly if (import.meta.url === `file://${process.argv[1]}`) { runCLI().catch(console.error); }