Extends picocli to provide a configuration framework, dynamic subcommands, logging and several other utilities to help create powerful command line tools
Using ktcli is easy:
-
Import ktcli in your project.
- maven
<dependency> <groupId>com.kloudtek.ktcli</groupId> <artifactId>ktcli</artifactId> <version>0.9.1</version> </dependency>
-
Annotate your classes with picocli annotations
-
Create CliHelper and use
initAndRun
commandfor example:
public void run(String... args) { MyCommandObj cmdObj = new MyCommandObj(); new CliHelper(cmdObj).initAndRun(args); }