Questions tagged [spring-shell]

Spring Shell is an interactive shell that can be easily extended with commands using a Spring based programming model

Spring Shell's features include

  • A simple, annotation driven, programming model to contribute custom commands
  • Use of Spring Boot auto-configuration functionality as the basis for a command plugin strategy
  • Tab completion, colorisation, and script execution
  • Customisation of command prompt, shell history file name, handling of results and errors
  • Dynamic enablement of commands based on domain specific criteria
  • Integration with the bean validation API
  • Already built-in commands, such as clear screen, gorgeous help, exit
  • ASCII art Tables, with formatting, alignment, fancy borders, etc.

The project homepage can be found at https://projects.spring.io/spring-shell/ while the latest documentation is available at http://docs.spring.io/spring-shell/docs/current/reference/htmlsingle/

108 questions
1
vote
1 answer

Spring shell 3 - StringInputContext not prompting for input?

I set up a new project using spring-boot(-shell) 3.0.3 and I'm just trying to capture some inputs and return them. When I pass in the arguments using ShellOption everything works fine, but I wanted to try out a bit more of the framework and use the…
1
vote
2 answers

Spring Shell components don't show up

I'm trying to use the Spring Shell built-in components StringInput, PathInput, ConfirmationInput, SingleSelect and MultiSelect. Each time I try and use one of these by executing the run() method they inherit from AbstractComponent nothing shows up…
1
vote
1 answer

How to pass varargs in Spring shell with kotlin

I am trying to write a spring shell app and pass some var args. Basicaly I want to pass fetch FA-207542 FA-207984 FA-211258 FA-202298 Documentation here is still TBD @ShellMethod(value = "fetches all pic related data for processing") fun…
Christian Bongiorno
  • 5,150
  • 3
  • 38
  • 76
1
vote
0 answers

NullPointerException while starting Spring Shell on Heroku worker node

Recently we are facing an issue that we cannot start our Spring Shell app on our Heroku worker node anymore. Directly after the shell app has started the console just prints java.lang.NullPointerException a million times (like there is kina a loop…
Michael Wurster
  • 158
  • 1
  • 8
1
vote
2 answers

Autowired/Dependencies injection doesn't work in a Spring Shell project

I started a new project from https://www.baeldung.com/spring-shell-cli I was trying to use dependency injection or Autowired annotation on my BannerProvider class. But Spring raise an exception. My Application class After many…
Alienhunter3010
  • 101
  • 2
  • 6
1
vote
1 answer

Spring Shell fails when running in jar

I am building a shell application using Spring shell. At this point, everything is running fine on intelliJ, meaning I can run my commands without any problems. I am using JPA with hibernate being the implementation provider, I was able to connect…
Brendon Cheung
  • 995
  • 9
  • 29
1
vote
1 answer

java.lang.ClassNotFoundException: org.springframework.core.ErrorCoded

I am using below dependencies in my spring boot shell application. org.springframework.boot spring-boot-starter 2.0.0.RELEASE
Hari Krishna
  • 3,658
  • 1
  • 36
  • 57
1
vote
1 answer

Print Fixed Lines with Spring Shell

I want to develop a small Sprint Shell project where I display static information which potentially updates when an event is received. Is this functionality possible with Spring Shell, or is it even the correct tool for the job? To give an example…
Marcus Held
  • 635
  • 4
  • 15
1
vote
1 answer

Parameter resolving /converter for dynamically registered commands

I am working on a Spring Shell 2 CLI and i am trying to generate commands at runtime from a defined interface through reflection. Update: The implementation of the interface is also generated at runtime. I am using the ConfigurableCommandRegistry…
Crossbone
  • 11
  • 2
1
vote
4 answers

select from a small amount of options in spring shell

I am currently trying to make an cli app with Spring Shell. I want the user to able to fast pick one of 2-3 options. My current code works fine in eclipse but when I start it in Powershell, i have to hit enter multiple times (at least 3 times) in…
Sip
  • 373
  • 1
  • 6
  • 22
1
vote
1 answer

Spring-Shell alias name for Input values

am new to Spring-Shell. I need to collect input values from CLI with Input-alias name. below code accepting values even without an Input-alias name. @ShellMethod("Get full Name.") public String fullname(@ShellOption({"-f"}) String firstName, …
1
vote
2 answers

How to print colors text in the spring shell with Java?

In my spring shell app i'm using the following code to print colored text but it's not works for me. Note: this works in netbeans ideas console and prints "sampleText" in red color, but does not in windows cmd. here is my code: String…
1
vote
1 answer

Customise Banner In spring Shell 2

I have used spring Shell 1.x. It provided provision for customise the banner. I am not trying to use Spring shell 2 and trying to do that same but i cannot finding the class. Document also does not speak about it. Do any body know how to customise…
Jafar Ali
  • 1,084
  • 3
  • 16
  • 39
1
vote
1 answer

Spring Shell 2: Refactoring-safe Dynamic Command Availability

I'm just trying out Spring Shell 2. The section Dynamic Command Availability of the reference documentation shows three ways to indicate availability. However, all of them rely on a naming scheme or string parameter in an annotation. This will break…
user2286693
  • 3,007
  • 2
  • 17
  • 17
1
vote
3 answers

Confirmation message Spring shell

Is there an way for a spring-shell command to first ask for a confirmation message. For example command Do you want to proceed [y/n] y executing command I did some research on internet but I don't find example of this type of command.
KlezFromSpace
  • 53
  • 1
  • 10