Skip to main content

cmd_trust

Function cmd_trust 

Source
pub fn cmd_trust(beans_dir: &Path, revoke: bool, check: bool) -> Result<()>
Expand description

Manage hook trust status.

By default, hooks are disabled (not trusted). Users must explicitly run bn trust to enable hook execution. This is a security measure to ensure users review .beans/hooks/ scripts before allowing execution.

§Arguments

  • beans_dir - The .beans/ directory path
  • revoke - If true, disable hooks (remove trust file)
  • check - If true, display current trust status without changing it

§Returns

  • Ok(()) on success
  • Err if file operations fail