git_repos/cli/
find.rs

1use clap::{Args, Subcommand};
2
3/// Find repos
4#[derive(Debug, Subcommand)]
5pub enum Find {
6    /// Find repos from config
7    Config(Config),
8
9    /// Find repos from local
10    Local(Local),
11
12    /// Find repos from remote
13    Remote(Remote),
14}
15
16#[derive(Debug, Args)]
17pub struct Config {
18    /// Config file path
19    #[arg(long)]
20    pub path: String,
21}
22
23#[derive(Debug, Args)]
24pub struct Local {
25    /// Local repos directory
26    #[arg(long)]
27    pub path: Vec<String>,
28
29    /// Exclude repos match given regex
30    #[arg(long)]
31    pub exclude: Vec<String>,
32}
33
34#[derive(Debug, Args)]
35pub struct Remote {
36    /// Token file path
37    #[arg(long)]
38    pub token_file: Option<String>,
39
40    /// Repos directory
41    #[arg(long)]
42    pub repos_path: String,
43
44    /// Remote url
45    #[arg(long)]
46    pub url: Option<String>,
47
48    /// Remote name
49    #[arg(long)]
50    pub name: Option<String>,
51
52    /// Remote user
53    #[arg(long)]
54    pub user: Vec<String>,
55
56    /// Remote group
57    #[arg(long)]
58    pub group: Vec<String>,
59
60    /// Get repositories user owned
61    #[arg(long)]
62    pub owned: bool,
63
64    /// Get repositories user access
65    #[arg(long)]
66    pub access: bool,
67
68    /// Force use ssh, even public repos
69    #[arg(long)]
70    pub force_ssh: bool,
71}