Code generator library for automatic creating picocli base command
Application.java
@BaseCommandConfiguration(
name = "tool",
description = "My awesome tool"
)
public class Application {
public static void main(String[] args) {
final BaseCommand command = new BaseCommand(); // generated class
final CommandLine commandLine = new CommandLine(command);
System.exit(commandLine.execute(args));
}
}
CommandA.java
@Command(
name = "a",
version = "${COMMAND-NAME} 1.0.0",
description = "Command for action 'a'"
)
public class CommandA implements Runnable {
@Override
public void run() {
// some command logic
}
}
CommandB.java
@Command(
name = "b",
version = "${COMMAND-NAME} 1.0.0",
description = "Command for action 'b'"
)
public class CommandB implements Runnable {
@Override
public void run() {
// some command logic
}
}