create-java-springboot
v0.1.0
Published
Interactive CLI to scaffold Spring Boot projects
Maintainers
Readme
create-java-springboot
Interactive CLI to scaffold Spring Boot projects — like create-next-app but for Spring.
Usage
npx create-java-springbootOr install globally:
npm i -g create-java-springboot
create-java-springbootFeatures
- Fetch live dependency list from
start.spring.io - Preset templates (REST API, Full Stack, Microservice, Minimal)
- Interactive multiselect with descriptions
- Choose Java version, Spring Boot version, build tool
- Auto-install Java via SDKMAN or Homebrew if version mismatch is detected
Manual Installation
If you prefer not to use npx, you can clone and run locally.
Prerequisites
| Tool | Version | Check |
|------|---------|-------|
| Node.js | >= 18 | node --version |
| pnpm | any | pnpm --version |
| unzip | system | which unzip |
unzipis used to extract the generated project. On macOS it is pre-installed. On Linux:sudo apt install unzip/sudo yum install unzip.
Steps
# 1. Clone the repository
git clone https://github.com/your-username/create-java-springboot.git
cd create-java-springboot
# 2. Install dependencies
pnpm install
# 3. Build
pnpm build
# 4. Run
node dist/index.jsOr run without building (dev mode):
pnpm devJava Installation
The CLI will detect whether the Java version you selected is installed on your machine. If not, it will prompt you to install it automatically.
Option 1 — SDKMAN (recommended, manages multiple versions)
# Install SDKMAN
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
# Install a specific Java version (e.g. Java 21 via Eclipse Temurin)
sdk install java 21-tem
# List available versions
sdk list javaOption 2 — Homebrew (macOS)
# Install a specific version
brew install openjdk@21
# Create symlink so the system can find it
sudo ln -sfn "$(brew --prefix)/opt/openjdk@21/libexec/openjdk.jdk" \
/Library/Java/JavaVirtualMachines/openjdk-21.jdkOption 3 — Manual download
Download from Adoptium (Eclipse Temurin) and follow the installer for your OS.
Verify installation
java -version
# openjdk version "21.x.x" ...Running the Generated Project
After the project is created:
cd my-app
# Gradle
./gradlew bootRun
# Maven
./mvnw spring-boot:runDev
pnpm install
pnpm dev # run with tsx (no build needed)
pnpm build # compile TypeScript → dist/Publish
pnpm build
npm publish