UNPKG

@sprouted/create-vibes

Version:
51 lines 1.79 kB
#!/usr/bin/env node import { Command } from 'commander'; import { CreateFeatureCommand } from '../commands/create-feature'; import chalk from 'chalk'; const program = new Command(); program .version('0.9.0') .description('Vibes CLI - Making development flow'); // Create feature command program .command('create <featureName>') .description('Create a new feature') .option('--no-api', 'Skip API layer') .option('--no-ui', 'Skip UI layer') .option('--framework <framework>', 'UI framework (react or react-native)', 'react') .option('--features <features...>', 'Additional features to include') .action(async (featureName, options) => { try { const createFeature = new CreateFeatureCommand(); const featureOptions = { name: featureName, includeApi: options.api, includeUi: options.ui, uiFramework: options.framework, features: options.features }; await createFeature.execute(featureOptions); } catch (error) { console.error(chalk.red('Error:'), error instanceof Error ? error.message : String(error)); process.exit(1); } }); // Interactive mode for create command program .command('create') .description('Create a new feature (interactive)') .action(async () => { try { const createFeature = new CreateFeatureCommand(); const options = await createFeature.interactivePrompt(); await createFeature.execute(options); } catch (error) { console.error(chalk.red('Error:'), error instanceof Error ? error.message : String(error)); process.exit(1); } }); // Add more commands will go here (add app, etc.) program.parse(process.argv); //# sourceMappingURL=vibe-cli.js.map