1use clap::Parser;
2use snix_castore::{B3Digest, utils::ServiceUrlsGrpc};
3
4#[derive(Parser)]
5#[command(author, version, about)]
6pub struct CliArgs {
7 #[clap(flatten)]
9 pub listen_args: tokio_listener::ListenerAddressLFlag,
10 #[clap(flatten)]
12 pub service_addrs: ServiceUrlsGrpc,
13 #[arg(short, long, help = "The root directory digest to serve")]
15 pub root_directory: B3Digest,
16 #[arg(
18 short,
19 long,
20 help = "The name of the file to serve if a client requests a directory e.g. index.html index.htm"
21 )]
22 pub index_names: Vec<String>,
23 #[arg(
25 short,
26 long,
27 help = "Whether a directory listing should be returned if a client requests a directory but none of the `index_names` matched"
28 )]
29 pub auto_index: bool,
30}