Safety Features

CLIAI includes multiple layers of safety to protect your system.

Safety Levels

  • Blocks dangerous operations
  • Requires confirmation for system changes
  • Maximum validation

Medium (Default)

  • Balanced safety and convenience
  • Confirms risky operations
  • Standard validation

Low (Experienced users)

  • Minimal safety checks
  • Allows most operations
  • Basic validation only

Command Validation

Every command goes through multiple validation layers:

  1. Syntax Checking: Validates shell syntax
  2. Placeholder Detection: Catches AI hallucinations
  3. Risk Assessment: Categorizes command danger level
  4. Pattern Matching: Detects known dangerous patterns

Dangerous Patterns Detected

  • rm -rf / - System deletion
  • dd if=/dev/zero - Disk wiping
  • chmod 777 - Insecure permissions
  • :(){ :|:& };: - Fork bombs
  • curl | sh - Unverified script execution

Execution Modes

Manual (Default)

Commands are displayed for you to review and execute manually.

Auto-Execute

cliai auto-execute --enable

Safe commands execute automatically. Dangerous commands still require confirmation.

Dry-Run

cliai dry-run --enable

Shows what would be executed without actually running commands.