use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(name = "ecat")]
#[command(version, about = "e-cat microservices framework CLI", long_about = None)]
pub(crate) struct Cli {
#[command(subcommand)]
pub(crate) command: Commands,
}
#[derive(Subcommand)]
pub(crate) enum Commands {
New {
name: String,
},
Proto {
#[command(subcommand)]
action: ProtoAction,
},
Run {
#[arg(long)]
watch: bool,
},
Build {
#[arg(long)]
release: bool,
},
Upgrade,
}
#[derive(Subcommand)]
pub(crate) enum ProtoAction {
Add {
file: String,
},
Client {
file: String,
},
Server {
file: String,
#[arg(short = 't', long)]
output: Option<String>,
},
}