Skip to main content

Module bash

Module bash 

Source
Expand description

Bash command execution tool with safety validation

Structs§

BashTool
Tool for executing bash commands
CargoCommands
Helper struct for commonly used cargo commands

Enums§

BashSafety
Bash command safety level

Functions§

is_read_only
Check if a bash command is read-only (no side effects). Used to auto-allow commands even under Prompt permission. Inspired by claw-code’s readOnlyValidation.
validate_bash_command
Validate a bash command for safety before execution. Returns (safety_level, reason) for the command.