Behaviour for CLI commands.
Every command knows how to build its argument list and how to
parse its output. This is the Elixir equivalent of the Rust
ClaudeCommand trait.
Summary
Functions
Run a command synchronously via System.cmd.
Types
@type args() :: [String.t()]
Callbacks
@callback args() :: args()
@callback parse_output(stdout :: String.t(), exit_code :: non_neg_integer()) :: {:ok, term()} | {:error, term()}
Functions
@spec run(module(), struct(), ClaudeWrapper.Config.t()) :: {:ok, term()} | {:error, term()}
Run a command synchronously via System.cmd.
Returns the parsed output on success.