spring-boot-cli
Version:
CLI for Spring Boot
21 lines (20 loc) • 793 B
JavaScript
import { Command } from "commander";
import figlet from "figlet";
import chalk from "chalk";
import { createCommand } from "./commands/create.command.mjs";
import packageJson from "../package.json" assert { type: 'json' };
const program = new Command();
const version = packageJson.version;
const description = "A CLI tool to create and manage Spring Boot projects.";
program
.version(version)
.description(description)
.action(() => {
console.log(chalk.green(figlet.textSync("Spring Boot CLI", { horizontalLayout: "full" })));
console.log("\nWelcome to Spring Boot CLI!");
console.log(description);
console.log("\nType 'spring-boot-cli --help' to see the list of commands.");
});
program.addCommand(createCommand);
program.parse(process.argv);