antrophiclove
← Kütüphaneye dön
Kurulum
curl -sL https://www.antrophiclove.com/api/kaynak/notify-before-bash/raw

Bu içerik mevcut dosyaya elle harmanlanmalı: .claude/settings.json

notify-before-bash

Show notification before any Bash command execution for security awareness

Event Configuration

  • Event Type: PreToolUse
  • Tool Matcher: Bash
  • Category: notifications

Environment Variables

None required

Requirements

  • macOS: Uses built-in osascript
  • Linux: Uses notify-send

Script

command=$(jq -r '.tool_input.command // "unknown command"')
short_cmd=$(echo "$command" | head -c 50)
if [[ "$OSTYPE" == "darwin"* ]]; then
  osascript -e "display notification \"Running: $short_cmd\" with title \"Claude Code - Bash\""
else
  notify-send "Claude Code - Bash" "Running: $short_cmd" 2>/dev/null || true
fi