Skip to main content

ClaudeCommand

Trait ClaudeCommand 

Source
pub trait ClaudeCommand: Send + Sync {
    type Output: Send;

    // Required methods
    fn args(&self) -> Vec<String>;
    fn execute(
        &self,
        claude: &Claude,
    ) -> impl Future<Output = Result<Self::Output>> + Send;
}
Expand description

Trait implemented by all claude CLI command builders.

Each command defines its own Output type and builds its argument list via args(). Execution is dispatched through the shared Claude client which provides binary path, environment, and timeout config.

Required Associated Types§

Source

type Output: Send

The typed result of executing this command.

Required Methods§

Source

fn args(&self) -> Vec<String>

Build the CLI argument list for this command.

Source

fn execute( &self, claude: &Claude, ) -> impl Future<Output = Result<Self::Output>> + Send

Execute the command using the given claude client.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ClaudeCommand for AgentsCommand

Source§

impl ClaudeCommand for AuthStatusCommand

Source§

impl ClaudeCommand for DoctorCommand

Source§

impl ClaudeCommand for MarketplaceAddCommand

Source§

impl ClaudeCommand for MarketplaceListCommand

Source§

impl ClaudeCommand for MarketplaceRemoveCommand

Source§

impl ClaudeCommand for MarketplaceUpdateCommand

Source§

impl ClaudeCommand for McpAddCommand

Source§

impl ClaudeCommand for McpAddFromDesktopCommand

Source§

impl ClaudeCommand for McpAddJsonCommand

Source§

impl ClaudeCommand for McpGetCommand

Source§

impl ClaudeCommand for McpListCommand

Source§

impl ClaudeCommand for McpRemoveCommand

Source§

impl ClaudeCommand for McpResetProjectChoicesCommand

Source§

impl ClaudeCommand for PluginDisableCommand

Source§

impl ClaudeCommand for PluginEnableCommand

Source§

impl ClaudeCommand for PluginInstallCommand

Source§

impl ClaudeCommand for PluginListCommand

Source§

impl ClaudeCommand for PluginUninstallCommand

Source§

impl ClaudeCommand for PluginUpdateCommand

Source§

impl ClaudeCommand for PluginValidateCommand

Source§

impl ClaudeCommand for QueryCommand

Source§

impl ClaudeCommand for RawCommand

Source§

impl ClaudeCommand for VersionCommand