# spring-shell **Repository Path**: mirrors_spring-projects/spring-shell ## Basic Information - **Project Name**: spring-shell - **Description**: Spring based shell - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-18 - **Last Updated**: 2025-11-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README = Spring Shell image:https://github.com/spring-projects/spring-shell/actions/workflows/ci.yml/badge.svg["CI", link="https://github.com/spring-projects/spring-shell/actions/workflows/ci.yml"] == Latest news * October 24, 2025: https://spring.io/blog/2025/10/24/spring-shell-4-0-0-m1-released[Spring Shell 4.0.0-M1 is out!] * August 4, 2025: https://spring.io/blog/2025/08/04/spring-shell-3-4-1-available[Spring Shell 3.4.1 is now available] == About Spring Shell 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 radically faster and widely accessible getting started experience for shell development. * Be opinionated, but get out of the way quickly as requirements start to diverge from the defaults. == Installation and Getting Started Here is a quick teaser of a complete Spring Shell application in Java: [source,java,indent=0] ---- import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.shell.command.annotation.Command; @SpringBootApplication @Command public class DemoApplication { @Command public String hi() { return "hi"; } public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } } ---- Running it as an executable _jar_ in an interactive mode: [source,bash] ---- $ java -jar demo.jar shell:>help AVAILABLE COMMANDS Built-In Commands help: Display help about available commands stacktrace: Display the full stacktrace of the last error. clear: Clear the shell screen. quit, exit: Exit the shell. history: Display or save the history of previously run commands version: Show version info script: Read and execute commands from a file. Demo Application hi: shell:>hi hi ---- Or running it in a non-interactive mode: [source,bash] ---- $ java -jar demo.jar hi hi ---- == Getting Help Are you having trouble with Spring Shell? We want to help! * Join our GitHub Discussion section and post your question there. == Reporting Issues Spring Shell uses GitHub's integrated issue tracking system 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 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 from Source The `main` branch contains the work for the next major release `4.0.0`. Building and running tests: [source,bash] ---- ./mvnw install ---- If you want to build the project in a Docker container, you can proceed as follows: [source,bash] ---- docker run -it --mount type=bind,source="$(pwd)",target=/spring-shell maven:3-openjdk-17 bash cd spring-shell ./mvnw install ---- This will mount the source code that you cloned previously on the host inside the container. If you want to work on a copy of the source code inside the container (no side effects on the host), you can proceed as follows: [source,bash] ---- docker run -it maven:3-openjdk-17 bash git clone https://github.com/spring-projects/spring-shell.git cd spring-shell ./mvnw install ---- == Building the Documentation The documentation is built using Antora and can be run using the Antora Maven plugin. [source,bash] ---- ./mvnw antora -pl spring-shell-docs ---- After running the command, you can view the site for this branch in `spring-shell-docs/target/site`. == License Spring Shell is Open Source software released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license].