use clap::{ArgGroup, Parser};
#[derive(Parser, Debug)]
#[command(name = "probex")]
#[command(about = "eBPF process tracing tool")]
#[command(version)]
#[command(group(
ArgGroup::new("mode")
.args(["view", "command"])
.required(true)
))]
pub struct Args {
#[arg(short, long)]
pub output: Option<String>,
#[arg(short, long, default_value = "8080")]
pub port: u16,
#[arg(long, conflicts_with = "view")]
pub no_viewer: bool,
#[arg(long, value_name = "PARQUET", conflicts_with = "command")]
pub view: Option<String>,
#[arg(long, value_name = "HZ", default_value_t = 1999)]
pub sample_freq: u64,
#[arg(
trailing_var_arg = true,
allow_hyphen_values = true,
required_unless_present = "view"
)]
pub command: Vec<String>,
}