added yaml,json + configurable keys

This commit is contained in:
2026-03-16 17:36:04 +01:00
parent 8cee54007f
commit 253c69363d
12 changed files with 922 additions and 302 deletions

21
src/cli.rs Normal file
View File

@@ -0,0 +1,21 @@
use clap::Parser;
use std::path::PathBuf;
#[derive(Parser, Debug)]
#[command(author, version, about = "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()
}