* Display help information
()
| 41 | * Display help information |
| 42 | */ |
| 43 | function printHelp(): void { |
| 44 | console.log(`SPARC 2.0 CLI v${VERSION}`); |
| 45 | console.log("\nUsage: sparc2 <command> [options]"); |
| 46 | console.log("\nCommands:"); |
| 47 | |
| 48 | for (const command of commands) { |
| 49 | console.log(` ${command.name.padEnd(15)} ${command.description}`); |
| 50 | } |
| 51 | |
| 52 | console.log("\nOptions:"); |
| 53 | console.log(" --help, -h Show help"); |
| 54 | console.log(" --version, -v Show version"); |
| 55 | |
| 56 | console.log("\nFor command-specific help, run: sparc2 <command> --help"); |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * Print help for a specific command |