gitfetch_rs/cli/
args.rs

1use clap::Parser;
2
3#[derive(Parser, Debug)]
4#[command(name = "gitfetch")]
5#[command(about = "Neofetch-style CLI tool for git providers", long_about = None)]
6#[command(version)]
7pub struct Cli {
8  /// Username to fetch stats for
9  pub username: Option<String>,
10
11  /// Bypass cache and fetch fresh data
12  #[arg(long)]
13  pub no_cache: bool,
14
15  /// Clear the cache and exit
16  #[arg(long)]
17  pub clear_cache: bool,
18
19  /// Show version information
20  #[arg(long, short = 'V')]
21  pub version: bool,
22
23  /// Change the configured git provider
24  #[arg(long)]
25  pub change_provider: bool,
26
27  /// Custom character for contribution blocks
28  #[arg(long)]
29  pub custom_box: Option<String>,
30
31  /// Hide month/date labels
32  #[arg(long)]
33  pub no_date: bool,
34
35  /// Show only the contribution graph
36  #[arg(long)]
37  pub graph_only: bool,
38
39  /// Enable spaced layout
40  #[arg(long)]
41  pub spaced: bool,
42
43  /// Disable spaced layout
44  #[arg(long)]
45  pub not_spaced: bool,
46
47  /// Custom width for contribution graph
48  #[arg(long)]
49  pub width: Option<usize>,
50
51  /// Custom height for contribution graph
52  #[arg(long)]
53  pub height: Option<usize>,
54
55  /// Hide achievements section
56  #[arg(long)]
57  pub no_achievements: bool,
58
59  /// Hide languages section
60  #[arg(long)]
61  pub no_languages: bool,
62
63  /// Hide issues section
64  #[arg(long)]
65  pub no_issues: bool,
66
67  /// Hide pull requests section
68  #[arg(long)]
69  pub no_pr: bool,
70
71  /// Hide account information
72  #[arg(long)]
73  pub no_account: bool,
74
75  /// Hide contribution grid/graph
76  #[arg(long)]
77  pub no_grid: bool,
78
79  /// Simulate contribution graph with text (A-Z and space only)
80  #[arg(long)]
81  pub text: Option<String>,
82
83  /// Simulate contribution graph with predefined shapes
84  #[arg(long, value_delimiter = ',')]
85  pub shape: Option<Vec<String>>,
86
87  /// Show git timeline graph instead of contribution graph
88  #[arg(long)]
89  pub graph_timeline: bool,
90
91  /// Analyze local git repository (requires .git folder)
92  #[arg(long)]
93  pub local: bool,
94}