The CLI Core makes it easy to create a command line application that already works, right out of the box.
- User friendly command line interface.
- Commands autocomplition.
- Supports external plugins.
- Command prompts DSL
CLI lib coordinates com.haulmont.cli.core:cli-core:1.0.0
Your application should have implementation for MainCliPlugin
interface. And provide plugin implementation in module-info.java
.
For example:
provides MainCliPlugin with YourPlugin;
To customize your application you can override MainCliPlugin
methods:
welcome()
- prints welcome message for interactive plugin modeprompt
- cli prompt for interactive modepriority
- main CLI plugin priority, plugin with highest priority will be used as mainpluginsDir
- plugins folder path
For more details please check https://github.com/cuba-platform/cli-core-sample sample project.