diff --git a/src/cli.rs b/src/cli.rs index 3ef9eeb..b77f56e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -12,17 +12,29 @@ pub struct Cli { #[derive(Debug, Subcommand)] pub enum MainCommands { - #[command()] + #[command( + arg_required_else_help = true, + about = "Start Tomcat inside this terminal" + )] Run { - #[arg(long)] + #[arg(long, help = "Start in debug mode and open the JPDA endpoint")] jpda: bool, config: String, }, - #[command(arg_required_else_help = true)] + #[command( + arg_required_else_help = true, + about = "Start Tomcat in the built-in debugger" + )] Debug { config: String }, - #[command(arg_required_else_help = true)] + #[command( + arg_required_else_help = true, + about = "Deploy the specified config without starting Tomcat" + )] Deploy { config: String }, - #[command(arg_required_else_help = true)] + #[command( + arg_required_else_help = true, + about = "Manage your tomcatctl deployment configs" + )] Config { #[command(subcommand)] command: ConfigCommands, @@ -31,15 +43,18 @@ pub enum MainCommands { #[derive(Debug, Subcommand)] pub enum ConfigCommands { - #[command(arg_required_else_help = true)] + #[command(arg_required_else_help = true, about = "Add a deployment config")] Add { name: String, path: String, project_path: String, }, - #[command(arg_required_else_help = true)] - Remove { - name: String, - }, + #[command( + arg_required_else_help = true, + about = "Remove a deployment config", + alias = "rm" + )] + Remove { name: String }, + #[command(about = "List all valid deployment configs", alias = "ls")] List, }