AI Database Silmeye Çalışınca Wrapper Yaptım
PreviousKurallardan Router'a: Yapay Zekaya Dilinizi Öğretin, Kuralları DeğilNextClaude Code'a Yeni Başladım, Temel Olmayan Özellikleri Araştırmasını İstedim
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
y() {
touch /tmp/claude_approved
echo "\033[32m✓ Approved\033[0m"
}
psql() {
if [[ -f /tmp/claude_approved ]]; then
command rm -f /tmp/claude_approved
command psql "$@"
return
fi
if echo "$*" | grep -qiE "(SELECT|SHOW|EXPLAIN|ANALYZE|\\\\d|\\\\l|\\\\x)"; then
command psql "$@"
return
fi
echo "⚠️ UNSAFE database operation"
echo "ACTION: Ask user to type '!y' by telling HOW AWARE YOU ARE, then retry this command"
return 1
}