UNPKG

better-spec

Version:

Spec-driven development toolkit that turns executable specifications into production-ready code

82 lines (75 loc) 2.6 kB
#!/usr/bin/env node // src/index.ts var VERSION = "0.0.1"; // src/cli.ts var args = process.argv.slice(2); var command = args[0]; function showHelp() { console.log(` Better Spec CLI v${VERSION} ⚠️ Work in Progress: This tool is currently under active development. Usage: better-spec <command> [options] Commands (Coming Soon): init Initialize a new Better Spec project validate Validate your specifications generate Generate code from specifications check Check code compliance with specifications help Show this help message version Show version information For more information, visit: https://better-spec.com `); } function showVersion() { console.log(`better-spec v${VERSION}`); } function showWorkInProgress() { console.log(` ╔══════════════════════════════════════════════════════════════╗ ║ ║ ║ Better Spec v${VERSION} ║ ║ ║ ║ ⚠️ This tool is currently under active development. ║ ║ ║ ║ Better Spec is a spec-driven development toolkit that ║ ║ transforms your architectural vision into production- ║ ║ ready code. ║ ║ ║ ║ Visit https://better-spec.com for updates and ║ ║ documentation. ║ ║ ║ ╚══════════════════════════════════════════════════════════════╝ `); } switch (command) { case "help": case "--help": case "-h": showHelp(); break; case "version": case "--version": case "-v": showVersion(); break; case "init": case "validate": case "generate": case "check": console.log(` ⚠️ The '${command}' command is not yet implemented. `); showWorkInProgress(); break; case undefined: showWorkInProgress(); console.log(` Run 'better-spec help' for available commands. `); break; default: console.log(` ❌ Unknown command: ${command} `); showHelp(); process.exit(1); }