Parent [>]
1//! Command-line arguments parsed at startup via clap.
2
3use std::path::PathBuf;
4
5use clap::Parser;
6
7use crate::theme::Theme;
8
9#[derive(Parser)]
10pub struct Args {
11    /// Path to the directory containing bare git repositories.
12    #[arg(long, default_value = ".")]
13    pub root: PathBuf,
14
15    /// Hostname shown in the breadcrumb and used to build clone URLs.
16    #[arg(long)]
17    pub hostname: Option<String>,
18
19    /// Path prefix prepended before the repository name in SSH clone URLs
20    /// (e.g. `repos/` or `/srv/git/`).
21    #[arg(long)]
22    pub ssh_prefix: Option<String>,
23
24    /// Built-in colour theme.
25    #[arg(long, default_value = "auto")]
26    pub theme: Theme,
27
28    /// Path to a custom CSS file with theme variable overrides; takes
29    /// precedence over --theme if provided.
30    #[arg(long)]
31    pub theme_file: Option<PathBuf>,
32}