All checks were successful
Version Check / check-version (pull_request) Successful in 2s
22 lines
697 B
Rust
22 lines
697 B
Rust
use clap::Parser;
|
|
use std::path::PathBuf;
|
|
|
|
#[derive(Parser, Debug)]
|
|
#[command(author, version, about = "mould: A TUI tool to generate and edit configuration files (.env, json, yaml, toml)")]
|
|
pub struct Cli {
|
|
/// The input template file (e.g., .env.example, config.json.template, docker-compose.yml)
|
|
pub input: PathBuf,
|
|
|
|
/// Optional output file. If not provided, it will be inferred (e.g., .env.example -> .env, docker-compose.yml -> docker-compose.override.yml)
|
|
#[arg(short, long)]
|
|
pub output: Option<PathBuf>,
|
|
|
|
/// Override the format detection (env, json, yaml, toml)
|
|
#[arg(short, long)]
|
|
pub format: Option<String>,
|
|
}
|
|
|
|
pub fn parse() -> Cli {
|
|
Cli::parse()
|
|
}
|