pub mod commands;
use clap::{CommandFactory, Parser, Subcommand};
use std::path::PathBuf;
#[derive(Parser)]
#[command(name = "madskills")]
#[command(about = "Tools for madskilling", long_about = None)]
#[command(version)]
pub struct Cli {
#[command(subcommand)]
pub command: Commands,
#[arg(short = 'C', long, global = true)]
pub chdir: Option<PathBuf>,
#[arg(short, long, global = true)]
pub quiet: bool,
#[arg(short, long, global = true, action = clap::ArgAction::Count)]
pub verbose: u8,
#[arg(long, global = true, default_value = "auto")]
pub color: String,
}
#[derive(Subcommand)]
pub enum Commands {
Lint(commands::lint::LintArgs),
Fmt(commands::fmt::FmtArgs),
List(commands::list::ListArgs),
Init(commands::init::InitArgs),
}
pub fn command() -> clap::Command {
Cli::command()
}