1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
use std::path::PathBuf; use clap::{Parser, Subcommand}; #[derive(Parser)] #[command(version, about)] pub struct Cli { #[clap(subcommand)] pub action: Action, } #[derive(Subcommand)] pub enum Action { Run, Lint { file: PathBuf }, Checkhealth, }