xert 0.2.0

A professional Rust project scaffolding tool for Web, CLI, and Embedded projects.
Documentation
use clap::{Parser, Subcommand, ValueEnum};

// Re-export Template with ValueEnum for CLI usage
pub use crate::Template as TemplateBase;

#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum, Debug)]
pub enum Template {
    Web,
    Cli,
    Embedded,
}

impl From<Template> for TemplateBase {
    fn from(t: Template) -> Self {
        match t {
            Template::Web => TemplateBase::Web,
            Template::Cli => TemplateBase::Cli,
            Template::Embedded => TemplateBase::Embedded,
        }
    }
}

#[derive(Parser, Debug)]
#[command(name = "xert")]
#[command(version = "0.1.0")]
#[command(about = "A professional Rust project scaffolding tool", long_about = None)]
pub struct Cli {
    #[command(subcommand)]
    pub command: Commands,
}

#[derive(Subcommand, Debug)]
pub enum Commands {
    /// Initialize a new project from a certified template
    Create {
        /// The project template architecture to use
        #[arg(value_enum)]
        template: Template,

        /// The name of the new project
        name: String,
    },
}