pub struct Cli {
pub command: Option<String>,
pub level: Option<SafetyLevel>,
pub explain: bool,
pub list_commands: bool,
pub opencode_config: bool,
pub generate_book: bool,
pub setup: bool,
pub tool: Option<String>,
pub auto_detect: bool,
pub list_tools: bool,
pub subcommand: Option<Subcommand>,
}Fields§
§command: Option<String>Command string to check (omit for Claude hook mode via stdin)
level: Option<SafetyLevel>Safety level threshold (inert, safe-read, safe-write). Only commands at or below this level pass.
explain: boolPrint a per-segment breakdown of why a command would or would not auto-approve.
list_commands: boolList all supported commands in Markdown format
opencode_config: boolGenerate OpenCode permission config (merges with existing opencode.json)
generate_book: boolGenerate mdBook command reference pages in docs/src/commands/
setup: boolConfigure the hook for the named tool (default: claude). Use –auto-detect for every installed tool.
tool: Option<String>Pair with –setup to select the target tool by name. See –list-tools.
auto_detect: boolPair with –setup to install for every installed tool detected on this machine.
list_tools: boolPrint the names of every supported integration target.
subcommand: Option<Subcommand>Hook subcommand: read this tool’s stdin envelope, validate the command, write the response.
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.