A command-line tool to download photos from iCloud
GitHub RepoImpressions3.7k

A command-line tool to download photos from iCloud

@githubprojectsPost Author

Project Description

View on GitHub

A Command-Line Tool to Download Your iCloud Photos

If you're like a lot of developers, you prefer having your data under your control. While iCloud Photos is convenient, being locked into a GUI or the Apple ecosystem to get your own pictures out can feel limiting. What if you want to script a backup, run a download on a headless server, or just manage your photos from the terminal?

Enter icloud_photos_downloader, a Python command-line tool that solves exactly that problem. It gives you direct, scriptable access to download your entire iCloud Photos library to a folder on your machine.

What It Does

In short, this tool authenticates with your iCloud account and lets you download photos and videos from your iCloud Photos library to a local directory. You can download everything, or be selective based on dates, albums, or even facial recognition albums (like "Recents" or "Favorites"). It's designed to be run from the terminal, making it perfect for automation and backup scripts.

Why It's Cool

The real power here is in automation and control. Instead of manually selecting and dragging files in a web interface, you can set up a cron job to keep a local backup of your iCloud Photos library synced automatically. It's also great for developers working on personal projects who want a local dataset of their own photos.

Some standout features include:

  • Resumable Downloads: It skips files already downloaded, so you can run it periodically without starting from scratch.
  • Flexible Filtering: Download only from specific albums, within a date range, or until you hit a certain folder size.
  • Metadata Preservation: It can keep your files organized in folders by year/month/day, just like the Photos app.
  • Two-Factor Auth Support: It handles the modern iCloud security requirements seamlessly.

It turns a typically manual, GUI-bound process into a simple, scriptable command.

How to Try It

You'll need Python 3.6+ installed. The quickest way to get started is via pip:

pip install icloudpd

Once installed, the basic command to authenticate and start a download is:

icloudpd --directory ./photos --username [email protected]

You'll be prompted for your password and to complete two-factor authentication on your first run. For subsequent runs, you can use a cookie directory to avoid re-authenticating every time.

Check out the GitHub repository for the full documentation, including all the available options for filtering, setting up auto-deletion of photos from iCloud after download, and running it in a Docker container.

Final Thoughts

As someone who values both convenience and data ownership, this tool hits a sweet spot. It acknowledges the convenience of iCloud Photos but removes the vendor lock-in for your actual files. For developers, it's a practical solution for creating robust, automated backups or for simply pulling your photos into a local environment for other projects. It's a focused tool that does one job and does it well.

@githubprojects

Back to Projects
Project ID: 1f745b85-559d-4022-9f09-9e1cb93926c9Last updated: January 6, 2026 at 06:29 AM