UNPKG

@julianoczkowski/my-rules

Version:

Personal development rules, guidelines, and documentation for coding projects

47 lines (35 loc) 1.53 kB
#!/usr/bin/env node // Enhanced CLI with interactive picker support import { downloadDocs } from "./download-docs.js"; // Parse command line arguments const args = process.argv.slice(2); const isInteractive = !args.includes("--auto") && !args.includes("--all"); // Force interactive mode when running via CLI (not postinstall) unless auto mode is requested const forceInteractive = isInteractive; // Show help if requested if (args.includes("--help") || args.includes("-h")) { console.log(` 🎯 My Rules - Interactive Documentation Downloader Usage: npx @julianoczkowski/my-rules [options] Options: --interactive, -i Show interactive folder picker (default) --auto, -a Auto-download all folders (non-interactive) --all Same as --auto --help, -h Show this help message Examples: npx @julianoczkowski/my-rules # Interactive mode npx @julianoczkowski/my-rules --auto # Download everything npx @julianoczkowski/my-rules --help # Show help Interactive Mode: When running interactively, you'll see a list of available documentation folders and can choose which ones to download: • Enter numbers separated by commas (e.g., 1,3) to select specific folders • Enter 'all' to download everything • Enter 'none' to skip download For more information, visit: https://github.com/julianoczkowski/my-rules `); process.exit(0); } // Run the downloader with appropriate mode downloadDocs(isInteractive, forceInteractive).catch(console.error);