pub mod agents;
pub mod auth;
pub mod auto_mode;
pub mod doctor;
pub mod install;
pub mod marketplace;
pub mod mcp;
pub mod plugin;
pub mod query;
pub mod raw;
pub mod update;
pub mod version;
#[cfg(feature = "async")]
use std::future::Future;
use crate::Claude;
use crate::error::Result;
pub trait ClaudeCommand: Send + Sync {
type Output: Send;
fn args(&self) -> Vec<String>;
#[cfg(feature = "async")]
fn execute(&self, claude: &Claude) -> impl Future<Output = Result<Self::Output>> + Send;
}
#[cfg(feature = "sync")]
pub trait ClaudeCommandSyncExt {
fn execute_sync(&self, claude: &Claude) -> Result<crate::exec::CommandOutput>;
}
#[cfg(feature = "sync")]
impl<T> ClaudeCommandSyncExt for T
where
T: ClaudeCommand<Output = crate::exec::CommandOutput>,
{
fn execute_sync(&self, claude: &Claude) -> Result<crate::exec::CommandOutput> {
crate::exec::run_claude_sync(claude, self.args())
}
}