pub mod config;
pub mod x_objectiveai_authorization;
pub mod x_openrouter_authorization;
pub mod x_github_authorization;
pub mod x_mcp_authorization;
pub mod x_viewer_signature;
pub mod x_viewer_address;
pub mod user_agent;
pub mod http_referer;
pub mod x_title;
pub mod x_commit_author_name;
pub mod x_commit_author_email;
use clap::Subcommand;
#[derive(Subcommand)]
pub enum Commands {
Config { #[command(subcommand)] command: config::Commands },
XObjectiveaiAuthorization { #[command(subcommand)] command: x_objectiveai_authorization::Commands },
XOpenrouterAuthorization { #[command(subcommand)] command: x_openrouter_authorization::Commands },
XGithubAuthorization { #[command(subcommand)] command: x_github_authorization::Commands },
XMcpAuthorization { #[command(subcommand)] command: x_mcp_authorization::Commands },
XViewerSignature { #[command(subcommand)] command: x_viewer_signature::Commands },
XViewerAddress { #[command(subcommand)] command: x_viewer_address::Commands },
UserAgent { #[command(subcommand)] command: user_agent::Commands },
HttpReferer { #[command(subcommand)] command: http_referer::Commands },
XTitle { #[command(subcommand)] command: x_title::Commands },
XCommitAuthorName { #[command(subcommand)] command: x_commit_author_name::Commands },
XCommitAuthorEmail { #[command(subcommand)] command: x_commit_author_email::Commands },
}
impl Commands {
pub async fn handle(self, cli_config: &crate::Config, handle: &objectiveai_cli_sdk::output::Handle) -> Result<(), crate::error::Error> {
match self {
Commands::Config { command } => command.handle(cli_config, handle).await,
Commands::XObjectiveaiAuthorization { command } => command.handle(cli_config, handle).await,
Commands::XOpenrouterAuthorization { command } => command.handle(cli_config, handle).await,
Commands::XGithubAuthorization { command } => command.handle(cli_config, handle).await,
Commands::XMcpAuthorization { command } => command.handle(cli_config, handle).await,
Commands::XViewerSignature { command } => command.handle(cli_config, handle).await,
Commands::XViewerAddress { command } => command.handle(cli_config, handle).await,
Commands::UserAgent { command } => command.handle(cli_config, handle).await,
Commands::HttpReferer { command } => command.handle(cli_config, handle).await,
Commands::XTitle { command } => command.handle(cli_config, handle).await,
Commands::XCommitAuthorName { command } => command.handle(cli_config, handle).await,
Commands::XCommitAuthorEmail { command } => command.handle(cli_config, handle).await,
}
}
}