1pub mod auth;
2pub mod issue;
3pub mod pipeline;
4pub mod pr;
5pub mod repo;
6
7use clap::{Parser, Subcommand};
8
9#[derive(Parser)]
10#[command(name = "bitbucket")]
11#[command(author = "Pegasus Heavy Industries")]
12#[command(version)]
13#[command(about = "A command-line interface for Bitbucket Cloud", long_about = None)]
14#[command(propagate_version = true)]
15pub struct Cli {
16 #[command(subcommand)]
17 pub command: Commands,
18
19 #[arg(short, long, global = true)]
21 pub workspace: Option<String>,
22
23 #[arg(short, long, global = true)]
25 pub repo: Option<String>,
26}
27
28#[derive(Subcommand)]
29pub enum Commands {
30 Auth {
32 #[command(subcommand)]
33 command: auth::AuthCommands,
34 },
35
36 Repo {
38 #[command(subcommand)]
39 command: repo::RepoCommands,
40 },
41
42 Pr {
44 #[command(subcommand)]
45 command: pr::PrCommands,
46 },
47
48 Issue {
50 #[command(subcommand)]
51 command: issue::IssueCommands,
52 },
53
54 Pipeline {
56 #[command(subcommand)]
57 command: pipeline::PipelineCommands,
58 },
59
60 Tui,
62}