Behaviour every Cherry command implements.
A command is pure input → result: it receives a Cherry.CLI.Context and
returns {:ok, data} or {:error, %Cherry.CLI.Error{}}. Rendering (human
text vs --json envelope) belongs to Cherry.CLI, so commands stay
testable without capturing IO.
Summary
Callbacks
Renders the success data as the human-facing output line(s).
Executes the command.
Command-specific OptionParser switches, merged with the global ones.
Callbacks
Renders the success data as the human-facing output line(s).
@callback run(Cherry.CLI.Context.t()) :: {:ok, map()} | {:error, Cherry.CLI.Error.t()}
Executes the command.
@callback switches() :: keyword()
Command-specific OptionParser switches, merged with the global ones.