use clap::{arg, Parser, Subcommand, ValueEnum}; use std::path::PathBuf; #[derive(Parser)] pub struct Args { #[clap(subcommand)] pub action: Action, } #[derive(Subcommand)] pub enum Action { Add { #[arg(short, long)] id: Option, #[arg(short, long)] media: Option, #[arg(short, long)] library_path: Option, }, Migrate { database: PathBuf, mode: MigrateMode, save_location: PathBuf, }, Reimport { /// Custom hostname, the config's is used by default #[arg(long)] hostname: Option, /// Disable TLS. Dont use this. #[arg(long)] no_tls: bool, }, } #[derive(Debug, Clone, Copy, PartialEq, ValueEnum)] pub enum MigrateMode { Import, Export, }