UNPKG

@sivasothy-tharsi/create-springboot-cli

Version:

CLI tool to generate Spring Boot projects

75 lines (54 loc) 2.07 kB
# create-springboot-app > CLI tool to quickly generate a Spring Boot project with a ready-to-use folder structure, sample entity, repository, service, and controller. It can also automatically start the Spring Boot application. --- ## Features - Generates a standard **Spring Boot folder structure**: - `controller`, `service`, `repository`, `model`, `config` - `resources` for `static`, `templates`, `application.properties` - `test` folder with a sample test - Creates **sample files**: - `SampleEntity.java` (entity) - `SampleRepository.java` (JPA repository) - `SampleService.java` (service) - `SampleController.java` (REST controller) - Generates **`pom.xml`** with necessary dependencies - Automatically runs `mvn spring-boot:run` after generation - Works on **Windows, Linux, and macOS** --- ## Installation ### Globally via npm ```bash npm install -g @sivasothy-tharsi/create-springboot-cli ``` ### Using npx (no global install required) ```bash npx @sivasothy-tharsi/create-springboot-cli myproject ``` Creates a folder myawesomeapp in the current directory Generates all folders and sample files Automatically starts the Spring Boot application ## Project Structure After Generation ```text myawesomeapp/ ├── src/ │ ├── main/java/com/myawesomeapp/ │ │ ├── controller/SampleController.java │ │ ├── service/SampleService.java │ │ ├── repository/SampleRepository.java │ │ ├── model/SampleEntity.java │ │ └── MyawesomeappApplication.java │ └── resources/ │ ├── static/ │ ├── templates/ │ └── application.properties ├── src/test/java/com/myawesomeapp/ │ └── MyawesomeappApplicationTests.java └── pom.xml ``` ## Requirements - Java JDK 17 or later - Maven installed and in PATH (`mvn -v`) - Node.js (v14+) for the CLI ## License MIT License © 2025 Sivasothy Tharsi