pub mod add;
pub mod build;
pub mod new;
pub mod run;
use clap::{Args, Subcommand};
#[derive(Debug, Subcommand)]
pub enum Command {
New(NewArgs),
Run,
}
#[derive(Debug, Args)]
pub struct NewArgs {
pub name: Option<String>,
#[arg(long, help = "Initialize a git repository")]
pub git: bool,
#[arg(
long,
default_value = "minimal",
help = "Choose template: minimal, mongodb, postgres, mysql, mssql, sqlite"
)]
pub template: String,
#[arg(long, help = "List available templates")]
pub list: bool,
}
pub fn handle_command(cmd: Command) {
match cmd {
Command::New(args) => new::handle(args),
Command::Run => run::execute(),
}
}