import com.chicorycli.annotations.Command; import com.chicorycli.annotations.Option; @Command(name = "hello", description = "Display a welcome message") public class HelloCommand { @Option(name = "name", description = "Your name", required = true) private String name; public void execute() { System.out.println("Hello, " + name + "! Welcome to Chicory CLI!"); } } import com.chicorycli.core.CommandManager; public class Main { public static void main(String[] args) { CommandManager manager = new CommandManager(); manager.registerCommand(new HelloCommand()); manager.start(); } }


上一篇:
下一篇:
切换中文