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
0
votes
1 answer

Run spring boot shell as daemon

I have an Spring boot web-application with an interactive shell for configuration. I want to run my app as daemon to start server. When I run it normally using java -jar app.jar I get an interactive shell and also I can connect to server using…
MTM
  • 113
  • 1
  • 8
0
votes
1 answer

Spring shell with command line runner interface

I have a problem while running spring boot spring shell application. I have implemented commandlinerunner but its never called during application startup. @Component public class ParamReader implements CommandLineRunner { @Override public…
0
votes
0 answers

Using a JavaFX TextArea control as the terminal of an spring-shell app

I am working in a tool which requires the user to interact with a console and for each typed command there is a graphic representation with the result of the command. I would like to have a single JavaFX app with a TextArea serving as the console…
0
votes
1 answer

Using Spring Shell with Tomcat

As described here: https://github.com/indrabasak/spring-shell-example most of spring shell projects are launched by this way: mvn clean install then java -jar target/[generated_jar]jar Now, every time a user need to use the console generated by…
Loïc Madiès
  • 277
  • 1
  • 5
  • 19
0
votes
1 answer

How do I set color of user input in Spring Shell 2?

I have a similar question to: Commands color in spring shell 2 but I am more interested in how I can override the color of user input. When I open my Spring Shell 2 application and start typing a command (before a command is executed), the text…
0
votes
1 answer

Go back to Spring shell prompt after printing to Stdout

I'm currently working with Spring Shell. My problem is that whenever I print something to stdout, the program doesn't go back to the prompt unless the user presses the Enter button. Are there possible ways to invoke the prompt?
Max
  • 1
0
votes
1 answer

Executing OS Commands from Spring Shell

I'm using org.springframework.shell:spring-shell-starter:2.0.0.RELEASE With gradle and Spring My question is: Is there anyway to open vi or vim to edit a file in the OS from the shell?. if not what alternatives do I have to edit this file?…
James Hameson
  • 331
  • 1
  • 4
  • 10
0
votes
1 answer

Commands color in spring shell 2

In SPRING SHELL 2 the default incorrect command and error output colors are red. Is it possible to define custom colors for these purposes? Thank you!
Liubov E.
  • 129
  • 1
  • 1
  • 9
0
votes
1 answer

Spring shell vs JMX

While studying about spring-boot, I stumbled upon shell support (CRsh (boot v1.x) Spring-Shell (boot v2.x)). What I am not able to understand is we already have a rich support for JMX which has been since ages, what value-add does these shells…
Himanshu Bhardwaj
  • 4,038
  • 3
  • 17
  • 36
0
votes
2 answers

Spring shell 2.0 how to read inputs with mask

Is there any way to mask user inputs in Spring Shell 2.0.x ? I need to collect password from user.. did not find any shell api to do that. Thanks!!
ARU
  • 137
  • 1
  • 9
0
votes
2 answers

How to run exit built in command in spring shell?

I'm using spring shell and it's work fine. but i want to run some built in command for example exit command in a method. How can i do that? @Component public class runCommand implements CommandMarker { @CliCommand(value = "exit", help =…
Sajad NasiriNezhad
  • 699
  • 1
  • 7
  • 27
0
votes
1 answer

Spring-shell along with spring-boot NullPointerException

I am trying to build a simple app using spring boot and spring shell . My pom.xml is like this: I am getting the below error when trying to connect to the shell using putty I am not able to get any pointers. Putty I downloaded for windows. Trying…
Payal Bansal
  • 725
  • 5
  • 17
0
votes
1 answer

Spring Shell Filepath as parameter

I want to have a parameter in a @CliCommand which is a network path. Something like \\path\to\newfolder. This folder will then be read and further processed. However as java interprets backslashes specially, the result will be something like…
0
votes
1 answer

Async IO handling in Spring CLI with Java how to?

I have built a Spring CLI app which communicates with a server in an async fashion. The server was given, I did not create it, basically my app is required to open a TCP socket and send a JSON through it, then it sends back a JSON. It is mandatory…
0
votes
1 answer

How to control netty server from spring-shell

I try to create a console with "spring shell", I would like to run my own netty socket server command. I have a command: @CliCommand(value = "server", help = "Start socket server") public String server( @CliOption(key = {"port", "p"},…