# Created on savesnippets.com · https://savesnippets.com/NYS91RKgyiT0cd need() { command -v "$1" >/dev/null 2>&1 || { echo "Required command not found: $1" >&2 exit 1 } } # Use at top of script — fail fast if deps are missing need jq need curl need rsync # Or branch on optional deps if command -v fd >/dev/null; then fd --type f else find . -type f fi