craigtrim/icloud-photo-export

Download iCloud Photos by date range with automatic HEIC to JPG conversion. macOS CLI wrapper for icloudpd.

Shell

1

2 commits

updated Dec 26, 2025

See the code
apple-photos
heic-to-jpg
icloud
icloud-backup
icloudpd
icloud-photos
iphone-photos
iphone-photos-recovery
photo-backup
photo-downloader
photo-export

README

iCloud Photo Export

Shell Script Platform iCloud License

Bulk download and backup iCloud Photos to your Mac. Export iPhone photos by date, month, or range. Convert HEIC to JPG. Simple CLI wrapper for icloudpd.

How to Download iCloud Photos

# Download all photos from July 2025
./icloud_photo_export.sh 2025-07 -a your@email.com -o ~/Photos

# Download a date range
./icloud_photo_export.sh 2025-07 --to 2025-09 -a your@email.com -o ~/Photos

# Convert HEIC to JPG
./convert_heic.sh -i ~/Photos/2025-07

Features

ScriptWhat it does
icloud_photo_export.shDownload iCloud Photos by month, day, or date range
convert_heic.shBatch convert HEIC/HEIF to JPG using macOS sips
  • Date-based downloads — Specify YYYY-MM (month) or YYYY-MM-DD (day)
  • Range support — Use --to for multi-month or multi-day ranges
  • HEIC to JPG — Convert iPhone photos to universal JPG format
  • Zero dependencies — Uses macOS built-in tools + icloudpd
  • Organized output — Auto-creates folders like 2025-07/ or 2025-07_to_2025-09/

Installation

# Install icloudpd
pip install icloudpd

# Clone and setup
git clone https://github.com/YOUR_USERNAME/icloud-photo-export.git
cd icloud-photo-export
chmod +x *.sh

Photo Export Usage

./icloud_photo_export.sh <date> -a <email> -o <dir> [OPTIONS]
OptionDescription
-a, --accountApple ID email (required)
-o, --outputOutput directory (required)
--to <date>End date for range downloads
-v, --include-videosInclude videos and Live Photos
-h, --helpShow help

Examples

# Single month
./icloud_photo_export.sh 2025-07 -a you@email.com -o ~/Photos

# Single day
./icloud_photo_export.sh 2025-07-15 -a you@email.com -o ~/Photos

# Month range (July-September)
./icloud_photo_export.sh 2025-07 --to 2025-09 -a you@email.com -o ~/Photos

# Include videos
./icloud_photo_export.sh 2025-07 -a you@email.com -o ~/Photos -v

HEIC Converter Usage

./convert_heic.sh -i <directory> [OPTIONS]
OptionDescription
-i, --input-dirDirectory to scan (required)
-k, --keep-originalsDon't delete HEIC files after conversion
-d, --dry-runPreview without converting

Examples

# Convert and delete originals
./convert_heic.sh -i ~/Photos/2025-07

# Keep originals
./convert_heic.sh -i ~/Photos/2025-07 --keep-originals

# Preview first
./convert_heic.sh -i ~/Photos/2025-07 --dry-run

Authentication

On first run, enter your iCloud password and 2FA code. Sessions are cached in ~/.pyicloud.

To re-authenticate:

rm -rf ~/.pyicloud

Troubleshooting

ProblemSolution
Session expiredDelete ~/.pyicloud and re-run
No photos foundVerify date range has photos in iCloud
Videos not downloadingAdd -v flag

License

MIT


Keywords: download icloud photos, backup iphone photos to mac, export icloud photos, icloud photo downloader, bulk download icloud, heic to jpg mac, convert heic to jpeg, icloudpd wrapper, apple photos backup, icloud cli tool, macos photo export

Contributors

craigtrim

2 commits

craigtrim/icloud-photo-export

Download iCloud Photos by date range with automatic HEIC to JPG conversion. macOS CLI wrapper for icloudpd.

Shell

1

2 commits

updated Dec 26, 2025

See the code
apple-photos
heic-to-jpg
icloud
icloud-backup
icloudpd
icloud-photos
iphone-photos
iphone-photos-recovery
photo-backup
photo-downloader
photo-export

README

iCloud Photo Export

Shell Script Platform iCloud License

Bulk download and backup iCloud Photos to your Mac. Export iPhone photos by date, month, or range. Convert HEIC to JPG. Simple CLI wrapper for icloudpd.

How to Download iCloud Photos

# Download all photos from July 2025
./icloud_photo_export.sh 2025-07 -a your@email.com -o ~/Photos

# Download a date range
./icloud_photo_export.sh 2025-07 --to 2025-09 -a your@email.com -o ~/Photos

# Convert HEIC to JPG
./convert_heic.sh -i ~/Photos/2025-07

Features

ScriptWhat it does
icloud_photo_export.shDownload iCloud Photos by month, day, or date range
convert_heic.shBatch convert HEIC/HEIF to JPG using macOS sips
  • Date-based downloads — Specify YYYY-MM (month) or YYYY-MM-DD (day)
  • Range support — Use --to for multi-month or multi-day ranges
  • HEIC to JPG — Convert iPhone photos to universal JPG format
  • Zero dependencies — Uses macOS built-in tools + icloudpd
  • Organized output — Auto-creates folders like 2025-07/ or 2025-07_to_2025-09/

Installation

# Install icloudpd
pip install icloudpd

# Clone and setup
git clone https://github.com/YOUR_USERNAME/icloud-photo-export.git
cd icloud-photo-export
chmod +x *.sh

Photo Export Usage

./icloud_photo_export.sh <date> -a <email> -o <dir> [OPTIONS]
OptionDescription
-a, --accountApple ID email (required)
-o, --outputOutput directory (required)
--to <date>End date for range downloads
-v, --include-videosInclude videos and Live Photos
-h, --helpShow help

Examples

# Single month
./icloud_photo_export.sh 2025-07 -a you@email.com -o ~/Photos

# Single day
./icloud_photo_export.sh 2025-07-15 -a you@email.com -o ~/Photos

# Month range (July-September)
./icloud_photo_export.sh 2025-07 --to 2025-09 -a you@email.com -o ~/Photos

# Include videos
./icloud_photo_export.sh 2025-07 -a you@email.com -o ~/Photos -v

HEIC Converter Usage

./convert_heic.sh -i <directory> [OPTIONS]
OptionDescription
-i, --input-dirDirectory to scan (required)
-k, --keep-originalsDon't delete HEIC files after conversion
-d, --dry-runPreview without converting

Examples

# Convert and delete originals
./convert_heic.sh -i ~/Photos/2025-07

# Keep originals
./convert_heic.sh -i ~/Photos/2025-07 --keep-originals

# Preview first
./convert_heic.sh -i ~/Photos/2025-07 --dry-run

Authentication

On first run, enter your iCloud password and 2FA code. Sessions are cached in ~/.pyicloud.

To re-authenticate:

rm -rf ~/.pyicloud

Troubleshooting

ProblemSolution
Session expiredDelete ~/.pyicloud and re-run
No photos foundVerify date range has photos in iCloud
Videos not downloadingAdd -v flag

License

MIT


Keywords: download icloud photos, backup iphone photos to mac, export icloud photos, icloud photo downloader, bulk download icloud, heic to jpg mac, convert heic to jpeg, icloudpd wrapper, apple photos backup, icloud cli tool, macos photo export

See what people are saying

Contributors

craigtrim

2 commits

Languages

Shell

100.0%