use std::path::PathBuf;
use clap::{Parser, Subcommand};
#[derive(Debug, Parser)]
#[command(
name = "netweft",
version,
about = "Deterministic network planning and configuration generation"
)]
pub struct Cli {
#[arg(long, global = true, env = "NETWEFT_CONFIG_DIR")]
pub config_dir: Option<PathBuf>,
#[command(subcommand)]
pub command: Command,
}
#[derive(Debug, Subcommand)]
pub enum Command {
Paths,
Validate {
#[arg(long)]
location: Option<String>,
},
Show {
#[command(subcommand)]
command: ShowCommand,
},
Render {
#[command(subcommand)]
command: RenderCommand,
},
}
#[derive(Debug, Subcommand)]
pub enum ShowCommand {
Config,
Hosts,
Networks,
Services,
DnsAccess,
Dns,
Env {
#[arg(long)]
host: String,
},
}
#[derive(Debug, Subcommand)]
pub enum RenderCommand {
Bind,
Env {
#[arg(long)]
host: String,
},
All {
#[arg(long)]
host: String,
},
}