nodesync-cli
Version:
A smart CLI tool to auto-detect, install, and manage the right Node.js version for your project.
27 lines (21 loc) • 773 B
JavaScript
import { Command } from 'commander';
import chalk from 'chalk';
import runSmartCommand from '../commands/smart.js';
const program = new Command();
program
.name('nodesync')
.description('Cross-platform Node.js version manager automation tool')
.version('1.0.0');
program
.command('smart')
.description('Smartly sets up Node.js environment based on your project')
.option('--no-install', 'Skip installing node_modules')
.option('--fix-natives', 'Fix native module rebuilds')
.option('--log', 'Enable logging to a file')
.option('--verbose', 'Show detailed output')
.option('--dry-run', 'Preview actions without executing them') // ✅ NEW
.action((options) => {
runSmartCommand(options);
});
program.parse(process.argv);