We are using Spring shell, and it worked really well for us. Some of its features:
- A simple, annotation driven, programming model to contribute custom commands
- Use of Spring’s classpath scanning functionality asthe basis for a
command plugin strategy and command develoment - Inheritance of the Roo Shell features, most notably tab completion, colorization, and script execution.
- Customization of command prompt, banner, shell history file name.
https://stackoverflow.com/a/21292019/6811653
https://projects.spring.io/spring-shell/
https://docs.spring.io/spring-shell/docs/current-SNAPSHOT/reference/htmlsingle/#_getting_started
A CLI with Spring Shell
simeple application
https://docs.spring.io/spring-shell/docs/1.2.1.BUILD-SNAPSHOT/reference/html/simple-application.html
https://github.com/spring-projects/spring-shell

TCP Port Scanner Example using Spring Shell