use clap::{Parser, Subcommand, ValueEnum};
#[derive(Debug, Parser)]
#[command(
name = "colorant",
version,
about = "Per-directory terminal theme switcher with system dark/light mode support"
)]
pub struct Cli {
#[command(subcommand)]
pub command: Command,
}
#[derive(Debug, Subcommand)]
pub enum Command {
Apply,
Reset,
Current,
Init {
#[arg(value_enum)]
shell: Shell,
},
Themes {
#[command(subcommand)]
action: ThemesAction,
},
Doctor {
path: Option<std::path::PathBuf>,
},
Show {
#[arg(long)]
all: bool,
},
}
#[derive(Debug, Subcommand)]
pub enum ThemesAction {
List,
Install {
name: Option<String>,
#[arg(long, conflicts_with = "name")]
all: bool,
#[arg(long, short)]
force: bool,
},
Path,
}
#[derive(Debug, Copy, Clone, ValueEnum)]
pub enum Shell {
Zsh,
}