bitbucket_cli/cli/
mod.rs

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    /// Workspace to use (overrides config default)
20    #[arg(short, long, global = true)]
21    pub workspace: Option<String>,
22
23    /// Repository to use (overrides auto-detection)
24    #[arg(short, long, global = true)]
25    pub repo: Option<String>,
26}
27
28#[derive(Subcommand)]
29pub enum Commands {
30    /// Manage authentication with Bitbucket
31    Auth {
32        #[command(subcommand)]
33        command: auth::AuthCommands,
34    },
35
36    /// Manage repositories
37    Repo {
38        #[command(subcommand)]
39        command: repo::RepoCommands,
40    },
41
42    /// Manage pull requests
43    Pr {
44        #[command(subcommand)]
45        command: pr::PrCommands,
46    },
47
48    /// Manage issues
49    Issue {
50        #[command(subcommand)]
51        command: issue::IssueCommands,
52    },
53
54    /// Manage pipelines
55    Pipeline {
56        #[command(subcommand)]
57        command: pipeline::PipelineCommands,
58    },
59
60    /// Launch interactive TUI
61    Tui,
62}