git_explore/cmd/
mod.rs

1mod commit;
2mod init;
3mod list;
4mod pull;
5mod push;
6use crate::*;
7pub use commit::*;
8pub use init::*;
9pub use list::*;
10pub use pull::*;
11pub use push::*;
12
13#[derive(Parser, Debug)]
14#[command(
15    name = clap::crate_name!(),
16    version = clap::crate_version!(),
17    author = clap::crate_authors!("\n"),
18    about = clap::crate_description!(),
19    long_version = clap::crate_version!(),
20    propagate_version = true,
21)]
22pub struct RepoCli {
23    #[command(subcommand)]
24    pub command: Option<Command>,
25}
26
27#[derive(Subcommand, Debug)]
28pub enum Command {
29    #[clap(visible_alias = "l", about = "List repositories")]
30    List(ListOption),
31    #[clap(visible_alias = "i", about = "Init with command List")]
32    Init(InitOption),
33    #[clap(visible_alias = "cv", about = "Set Version and commit")]
34    Commit(CommitOpts),
35    #[clap(about = "git pull for repositories")]
36    Pull(PushOption),
37    #[clap(about = "git push for repositories")]
38    Push(PushOption),
39}