use std::path::PathBuf;
use clap::{Parser, Subcommand, ValueEnum};
#[derive(Debug, Parser)]
#[command(name = "corx", version, about, propagate_version = true)]
pub(crate) struct Cli {
#[arg(short = 'c', long = "config", env = "CORX_CONFIG", global = true)]
pub(crate) config: Option<PathBuf>,
#[command(subcommand)]
pub(crate) command: Option<Command>,
}
#[derive(Debug, Subcommand)]
pub(crate) enum Command {
Serve,
Check,
Dump {
#[arg(long, value_enum, default_value_t = DumpFormat::Toml)]
format: DumpFormat,
},
Version,
}
#[derive(Debug, Clone, Copy, ValueEnum)]
pub(crate) enum DumpFormat {
Toml,
Json,
}