use clap::{Parser, Subcommand};
use std::path::PathBuf;
#[derive(Parser)]
#[command(
name = "cargo-forge",
about = "A powerful Rust project generator",
version,
author
)]
pub struct Cli {
#[command(subcommand)]
pub command: Option<Commands>,
}
#[derive(Subcommand)]
pub enum Commands {
New {
#[arg(help = "Name of the project to create")]
name: Option<String>,
#[arg(
short,
long,
help = "Type of project (api-server, cli-tool, library, wasm-app, game-engine, embedded, workspace)"
)]
project_type: Option<String>,
#[arg(short, long, help = "Author name for the project")]
author: Option<String>,
#[arg(short, long, help = "Description of the project")]
description: Option<String>,
#[arg(short, long, help = "License for the project")]
license: Option<String>,
#[arg(long, help = "Use defaults without prompting (for CI environments)")]
non_interactive: bool,
#[arg(long, help = "Use saved preferences from config file")]
from_config: Option<PathBuf>,
#[arg(long, help = "Preview the project structure without creating files")]
dry_run: bool,
},
Init {
#[arg(
short,
long,
help = "Type of project (api-server, cli-tool, library, wasm-app, game-engine, embedded, workspace)"
)]
project_type: Option<String>,
#[arg(short, long, help = "Author name for the project")]
author: Option<String>,
#[arg(short, long, help = "License for the project")]
license: Option<String>,
#[arg(long, help = "Use defaults without prompting (for CI environments)")]
non_interactive: bool,
#[arg(long, help = "Use saved preferences from config file")]
from_config: Option<PathBuf>,
#[arg(long, help = "Preview the project structure without creating files")]
dry_run: bool,
},
Completions {
#[arg(value_enum, help = "Shell to generate completions for")]
shell: clap_complete::Shell,
},
}