docs / getting-startedspringboot-cli

Get started with springboot-cli ​

springboot-cli is a small terminal tool for creating and working with opinionated Spring Boot projects. It downloads a starter from Spring Initializr, adds a layered project structure, and provides commands for common project tasks.

What you need ​

  • The springboot-cli executable for your operating system.
  • Internet access when creating a project, so the CLI can contact Spring Initializr.
  • A tar utility to unpack the Spring Initializr project archive.
  • A supported JDK to build and run the generated application: Java 21, 25, or 26.
  • The generated Maven Wrapper, or system Maven if the wrapper is unavailable.

The CLI itself is a native executable and does not require Bun, Node.js, or a JVM to start. The generated Spring Boot application does need Java to build and run.

Create your first project ​

Create a project with explicit Maven coordinates and the Spring Web dependency:

bash
springboot-cli create catalog \
  --groupId com.example \
  --artifactId catalog \
  --dependencies web
cd catalog
springboot-cli run

To run the generated test suite, open another terminal in the project and use:

bash
springboot-cli test

If you omit options, springboot-cli can prompt for project details. Its default Java version is 21, Spring Boot version is 4.1.1, and dependency set is web,data-jpa,lombok.

What springboot-cli adds ​

Each project includes a springboot-cli.json configuration file, a Maven project from Spring Initializr, and a package-by-layer starting structure. The CLI uses that config to find the project root when you run commands from the project or one of its subdirectories.

Continue ​