#!/usr/bin/env php Usage: php cleanup-old-firmware.php [options] Options: --stage STAGE Stage to clean (dev, staging, prod) --device DEVICE Device to clean (rm-e32-r6-b6, esp32-s3-poe-eth-8di-8ro-c) --keep N Number of versions to keep (default: 5) --dry-run Show what would be deleted without deleting --all-stages Clean all stages for specified device --all-devices Clean all devices for specified stage --help Show this help message Examples: php cleanup-old-firmware.php --stage dev --device rm-e32-r6-b6 --keep 3 php cleanup-old-firmware.php --all-stages --device rm-e32-r6-b6 --dry-run php cleanup-old-firmware.php --stage prod --all-devices --keep 10