use clap::Subcommand;
use crate::commands::base::Runnable;
pub mod add;
pub mod list;
pub mod preview;
const GITHUB_RAW_BASE: &str =
"https://raw.githubusercontent.com/rafaeljohn9/gitcraft/main/templates";
#[derive(Subcommand)]
pub enum Command {
Add(add::AddArgs),
List(list::ListArgs),
Preview(preview::PreviewArgs),
}
impl Command {
pub fn execute(&self) -> anyhow::Result<()> {
match self {
Command::Add(args) => args.run(),
Command::List(args) => args.run(),
Command::Preview(args) => args.run(),
}
}
}