Skip to main content

CodexCommand

Trait CodexCommand 

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

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

Trait implemented by all Codex CLI command builders.

args returns the CLI arguments the builder would pass to the codex binary. execute spawns the process and returns typed output.

Required Associated Types§

Source

type Output: Send

The type returned on success.

Required Methods§

Source

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

Build the argument list for this command.

Source

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

Execute the command against the given Codex 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 CodexCommand for ApplyCommand

Source§

impl CodexCommand for CompletionCommand

Source§

impl CodexCommand for ExecCommand

Source§

impl CodexCommand for ExecResumeCommand

Source§

impl CodexCommand for FeaturesDisableCommand

Source§

impl CodexCommand for FeaturesEnableCommand

Source§

impl CodexCommand for FeaturesListCommand

Source§

impl CodexCommand for ForkCommand

Source§

impl CodexCommand for LoginCommand

Source§

impl CodexCommand for LoginStatusCommand

Source§

impl CodexCommand for LogoutCommand

Source§

impl CodexCommand for McpAddCommand

Source§

impl CodexCommand for McpGetCommand

Source§

impl CodexCommand for McpListCommand

Source§

impl CodexCommand for McpLoginCommand

Source§

impl CodexCommand for McpLogoutCommand

Source§

impl CodexCommand for McpRemoveCommand

Source§

impl CodexCommand for McpServerCommand

Source§

impl CodexCommand for RawCommand

Source§

impl CodexCommand for ResumeCommand

Source§

impl CodexCommand for ReviewCommand

Source§

impl CodexCommand for SandboxCommand

Source§

impl CodexCommand for VersionCommand