{ "hooks": { "PostToolUse": [ { "matcher": "Write|Edit", "hooks": [ { "type": "command", "command": "jq -r '.tool_input.file_path // .tool_response.filePath' | { read -r f; case \"$f\" in *.swift) /opt/homebrew/bin/swiftformat --swift-version 5 \"$f\" 2>/dev/null || true ;; esac; }", "timeout": 30, "statusMessage": "Formatting Swift file..." } ] } ] } }