As of November 19, 2026, Spring Shell is in maintenance mode for the 4.x generation. We will continue to maintain it with bug fixes, security updates and dependency upgrades until December 2027. After that, the project will only be commercially supported by VMware Tanzu for customers with an active support subscription. Please refer to the project’s support page for more information about support periods and maintenance.
-
November 19, 2026: Spring Shell 4.0.4 available now
-
June 11, 2026: Spring Shell 4.0.3 and 3.4.3 are out!
-
April 24, 2026: Spring Shell 4.0.2 is out!
-
January 31, 2026: Spring Shell 4.0.1 is out!
-
December 30, 2025: Spring Shell 4.0.0 released!
Spring Shell helps you create Spring-powered, production-grade applications targeting the CLI space. It takes an opinionated view of the Spring platform so that new and existing users can quickly get the bits they need.
You can use Spring Shell to create stand-alone Java applications that can be started using
java -jar or more sophisticated GraalVM native ways to create platform dependant apps.
Our primary goals are:
-
Provide a fast and accessible getting started experience for shell development.
-
Be opinionated, but get out of the way quickly as requirements start to diverge from the defaults.
Go to start.spring.io and generate a new project with Spring Shell dependency. Here is a quick link to generate a Maven project with Spring Shell dependency: Spring Initializr link.
Unzip the generated project and open it in your favorite IDE. Now edit the main application class DemoApplication and add the following command:
import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.shell.core.command.annotation.Command; @SpringBootApplication public class DemoApplication { @Command public String hi() { return "hi"; } public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } }
Build the application using Maven:
$>./mvnw package -DskipTestsAfter building the application, you can run it in interactive mode as an executable jar:
$>java -jar target/demo-0.0.1-SNAPSHOT.jar shell:>help AVAILABLE COMMANDS Built-In Commands clear: Clear the terminal screen help: Show help about available commands history: Display or save the history of previously run commands quit, exit: Exit the shell script: Execute commands from a script file version: Show version info Demo Application Commands hi: N/A shell:>hi hi
You can find complete tutorials and sample applications in the spring-shell-samples directory:
A convenience script is provided to quickly launch any sample from the repository root:
$>./run-sample.shThe script presents an interactive menu:
Spring Shell Samples
====================
Select a sample to run:
1) hello-world — Simple greeting shell application
2) non-interactive — Non-interactive sample (runs 'hi' and exits)
3) petclinic — Spring PetClinic shell application
4) secure-input — Secure input / password prompt sample
5) spring-boot — Spring Boot-based shell application
Enter your choice [1-5]:Enter the number corresponding to the sample you want to run and press Enter. The appropriate Maven command will be executed automatically.
Are you having trouble with Spring Shell? We want to help!
Join our GitHub Discussion section and post your question there.
Spring Shell uses GitHub Issues to record bugs and feature requests. If you want to raise an issue, please follow the recommendations below:
-
Before you log a bug, please search the issue tracker to see if someone has already reported the problem.
-
If the issue doesn’t already exist, create a new issue.
-
Please provide as much information as possible with the issue report. We need to know the Spring Boot and Shell version, operating system, and the JVM version you’re using.
-
If you need to paste code or include a stack trace, please use Markdown’s ``` escapes before and after your text.
-
If possible, try to create a test case or project that replicates the problem and attach it to the issue.
Building and running tests:
$>git clone [email protected]:spring-projects/spring-shell.git $>cd spring-shell $>./mvnw install
The documentation is built using Antora and can be run using the Antora Maven plugin.
$>./mvnw antora -pl spring-shell-docsAfter running the command, you can view the site for this branch in spring-shell-docs/target/site.
Spring Shell is Open Source software released under the Apache 2.0 license.