spring-boot-cli
Version:
CLI for Spring Boot
22 lines (21 loc) • 860 B
JavaScript
import { Command } from "commander";
import figlet from "figlet";
import chalk from "chalk";
import { createCommand } from "./commands/create.command.mjs";
import { readFileSync } from 'fs';
const program = new Command();
const packageJson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
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);