planner / templates/cli-tool/src/cli.rs.tmpl

raw file 454 bytes
use clap::Parser;

#[derive(Parser, Debug)]
#[command(name = "{{name}}", version, about = "{{description}}")]
pub struct Cli {
    #[arg(short, long)]
    pub verbose: bool,

    #[arg(short, long)]
    pub config: Option<std::path::PathBuf>,

    #[command(subcommand)]
    pub command: Option<Commands>,
}

#[derive(clap::Subcommand, Debug)]
pub enum Commands {
    Run {
        #[arg(short, long)]
        input: Option<std::path::PathBuf>,
    },
}