use clap::{ArgAction, Parser};
#[derive(Parser, Debug)]
#[command(author = "Tarush Mohindru <tarushmohindru1515@gmail.com>",
version = "0.1.0",
about = "A fast multi-threaded downloader", long_about = None)]
pub struct Cli {
#[arg(required = true, index = 1)]
pub url: String,
#[arg(short, long, value_name = "FILE")]
pub output: Option<String>,
#[arg(short, long, value_name = "NUM", default_value = "16")]
pub connections: usize,
#[arg(long, value_name = "SIZE", default_value = "1M")]
pub chunk_size: String,
#[arg(short, long, value_name = "STRING")]
pub user_agent: Option<String>,
#[arg(long, value_name = "HEADER", action = ArgAction::Append)]
pub header: Option<Vec<String>>,
#[arg(long, action = ArgAction::SetTrue)]
pub no_resume: bool,
#[arg(long, action = ArgAction::SetTrue)]
pub no_adaptive: bool,
#[arg(short, long, value_name = "NUM", default_value = "3")]
pub retries: usize,
#[arg(short, long, value_name = "SECONDS", default_value = "30")]
pub timeout: u64,
#[arg(short, long, action = ArgAction::SetTrue)]
pub quiet: bool,
#[arg(short, long, action = ArgAction::SetTrue)]
pub verbose: bool,
}