spring-starter
v1.0.1
Published
CLI scaffolder untuk Spring Boot project dari start.spring.io atau GitHub
Downloads
23
Maintainers
Readme
Spring Starter
A CLI scaffolder for Spring Boot projects. Generate projects from start.spring.io or download starter templates from GitHub repositories.
Features
- Spring Initializr mode – Generate a blank Spring Boot project via the official Spring Initializr API
- GitHub Starter mode – Download a Spring Boot starter template from any GitHub repository
- Interactive prompts for all configuration options
- Automatic ZIP extraction and cleanup
Installation
Via npm (recommended)
npm install -g spring-starterFrom source
git clone https://github.com/yourusername/spring-starter.git
cd spring-starter
npm install
npm run build
npm linkUsage
Run the CLI:
spring-starterOr with options:
spring-starter --dir ~/projects --name my-appOptions
| Option | Description | Default |
|-------------------|--------------------------------|------------------|
| -d, --dir <path> | Output directory | Current directory |
| -n, --name <name> | Project name | demo |
| --starter | Use GitHub Starter mode | — |
| --default | Use Spring Initializr mode | — |
Interactive prompts
- Choose project type: Spring Default (from start.spring.io) or Spring Starter (from GitHub)
- Default mode: Enter Group ID, Artifact ID, Spring Boot version, and Java version
- Starter mode: Enter the GitHub repo URL (e.g.,
user/spring-boot-starter) and project folder name
Project content
src/
├── index.ts # CLI entry point — Commander setup and interactive prompts
├── spring-initializr.ts # Generates project from start.spring.io API
└── github.ts # Downloads and extracts starter from GitHubDependencies
- commander – CLI framework
- inquirer – Interactive prompts
- axios – HTTP client
- extract-zip – ZIP extraction
- ora – Terminal spinners
Development
# Run in development mode
npm run dev
# Build for production
npm run build
# Start the built version
npm startLicense
ISC
