pub mod config;
pub mod logs;
pub mod remote;
pub mod recursive;
pub mod state;
use clap::Subcommand;
#[derive(Subcommand)]
pub enum Commands {
Recursive {
#[command(subcommand)]
command: recursive::Commands,
},
Config {
#[command(subcommand)]
command: config::Commands,
},
Logs {
#[command(subcommand)]
command: logs::Commands,
},
Remote {
#[command(subcommand)]
command: remote::Commands,
},
State {
#[command(subcommand)]
command: state::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::Recursive { command } => command.handle(cli_config, handle).await,
Commands::Config { command } => command.handle(cli_config, handle).await,
Commands::Logs { command } => command.handle(cli_config, handle).await,
Commands::Remote { command } => command.handle(cli_config, handle).await,
Commands::State { command } => command.handle(cli_config, handle).await,
}
}
}