use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(name = "crank")]
#[command(author, version, about, long_about = None)]
#[command(
about = "crank - A build tool for Playdate game development",
long_about = "crank is a command-line build tool for Playdate game development, \
inspired by Cargo. It provides project scaffolding, build automation, \
and development tools to streamline your workflow."
)]
pub struct Cli {
#[command(subcommand)]
pub command: Commands,
}
#[derive(Subcommand)]
pub enum Commands {
#[command(visible_alias = "n")]
New {
name: String,
path: Option<String>,
#[arg(short, long, default_value = "lua-basic")]
template: Option<String>,
},
#[command(visible_alias = "b")]
Build {
#[arg(short, long)]
release: bool,
#[arg(short, long)]
verbose: bool,
},
#[command(visible_alias = "r")]
Run {
#[arg(short, long)]
release: bool,
},
#[command(visible_alias = "w")]
Watch {
#[arg(long)]
no_run: bool,
},
#[command(visible_alias = "t")]
Test {
#[arg(short, long)]
filter: Option<String>,
},
#[command(visible_alias = "c")]
Clean,
}