pub mod api;
pub mod auth;
pub mod auth_status;
pub mod common;
pub mod completion;
pub mod config;
pub mod config_output;
pub mod issue;
pub mod issue_like;
pub mod label;
pub mod milestone;
pub mod pr;
pub mod repo;
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(
name = "gb",
about = "GitBucket CLI - Work seamlessly with GitBucket from the command line",
after_help = "Run `gb <command> --help` for command-specific options.",
version
)]
pub struct Cli {
#[command(subcommand)]
pub command: Commands,
#[arg(
long,
short = 'H',
global = true,
env = "GB_HOST",
value_name = "HOST_OR_URL"
)]
pub hostname: Option<String>,
#[arg(long, short = 'R', global = true, env = "GB_REPO")]
pub repo: Option<String>,
#[arg(long, global = true, env = "GB_PROFILE", value_name = "NAME")]
pub profile: Option<String>,
#[arg(long, global = true, env = "GB_JSON_ERRORS")]
pub json_errors: bool,
}
#[derive(Subcommand)]
pub enum Commands {
Api(api::ApiArgs),
Auth(auth::AuthArgs),
Repo(repo::RepoArgs),
Config(config::ConfigArgs),
Completion(completion::CompletionArgs),
Issue(issue::IssueArgs),
Label(label::LabelArgs),
Milestone(milestone::MilestoneArgs),
Pr(pr::PrArgs),
Browse,
}