### Install icloudpd-bin with AUR Helper Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_AUR.md Install the package using an AUR helper like 'yay' on Arch Linux. ```sh yay -S icloudpd-bin ``` -------------------------------- ### Install Python on Linux (Ubuntu) Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_PYPI.md Installs Python on Ubuntu systems using apt-get. Pip is typically included with Python installations from apt. ```sh sudo apt-get update ``` ```sh sudo apt-get install -y python ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/CONTRIBUTING.md Installs all development and test dependencies for the project, enabling the use of the `icloudpd` script from the terminal. ```sh scripts/install_deps ``` -------------------------------- ### Install AUR Package with yay Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/install.md Install an AUR package using the yay AUR helper. ```sh yay -S icloudpd-bin ``` -------------------------------- ### Install icloudpd with pip Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_PYPI.md Install the icloudpd package using pip. This is the primary installation command. ```sh pip install icloudpd ``` -------------------------------- ### Run macOS Binary Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/install.md Start the icloudpd macOS binary from the terminal after making it executable. ```sh icloudpd-1.32.3-macos-amd64 ``` -------------------------------- ### Develop Documentation Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/CONTRIBUTING.md Compiles documentation and starts a web server with hot reloading for live preview during development. This uses Sphinx for documentation generation. ```sh sphinx-autobuild docs docs/_build/html ``` -------------------------------- ### Install Homebrew and Python on macOS Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_PYPI.md Installs Homebrew package manager if not present, then installs Python which includes pip. This is an alternative installation method for macOS. ```sh which brew > /dev/null 2>&1 || /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ``` ```sh brew install python ``` -------------------------------- ### Install icloudpd for Windows Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_PYPI.md Install the icloudpd package for Windows using pip with the --user flag. Remember to add the specified scripts directory to your system's PATH. ```sh pip install icloudpd --user ``` -------------------------------- ### Get icloudpd Docker Help Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/install.md Display the help information for the icloudpd Docker image to see all available command-line parameters. ```sh docker run -it --rm icloudpd/icloudpd:latest icloudpd --help ``` -------------------------------- ### Install icloudpd-bin Manually Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_AUR.md Use this command to clone the repository and build the package manually on Arch Linux. ```sh git clone https://aur.archlinux.org/icloudpd-bin.git cd icloudpd-bin makepkg -sirc ``` -------------------------------- ### Install Xcode Command Line Tools Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_PYPI.md Installs Apple's Command Line Tools, which include Python and Pip, on macOS. This is an alternative to Homebrew. ```sh xcode-select --install ``` -------------------------------- ### Get icloudpd Help Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_PYPI.md Command to display the full list of available command-line parameters and options for the icloudpd tool. ```sh icloudpd --help ``` -------------------------------- ### Get macOS Binary Help Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/install.md Display help information for the icloudpd macOS binary. ```sh icloudpd-1.32.3-macos-amd64 --help ``` -------------------------------- ### Run icloudpd with OS Locale Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/naming.md Example of running icloudpd with a specific locale under Linux or MacOS. Ensure the locale is installed on your system. ```shell LC_ALL=ru_RU.UTF.8 icloudpd --use-os-locale --version ``` -------------------------------- ### Clone and Build AUR Package Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/install.md Manually install an AUR package by cloning the repository, changing directory, and running makepkg. ```sh git clone https://aur.archlinux.org/icloudpd-bin.git cd icloudpd-bin makepkg -sirc ``` -------------------------------- ### Install icloudpd with pip3 on macOS Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_PYPI.md Install the icloudpd package using pip3, which is recommended for macOS when using Python installed via system or Homebrew. ```sh pip3 install icloudpd ``` -------------------------------- ### Basic icloudpd Usage Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_PYPI.md Example of running the icloudpd tool to download photos to a specified directory, using a given username, and monitoring for changes at a set interval. ```sh icloudpd --directory /data --username my@email.address --watch-with-interval 3600 ``` -------------------------------- ### Get Help for iCloud Photos Downloader Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_NPM.md Run this command to display all available command-line parameters and options for the iCloud Photos Downloader tool. ```sh npx --yes icloudpd --help ``` -------------------------------- ### Get iCloud Photos Downloader Help via Docker Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_DOCKER.md Execute this command to display the full list of available command-line parameters for the iCloud Photos Downloader when run in a Docker container. ```sh docker run -it --rm icloudpd/icloudpd:latest icloudpd --help ``` -------------------------------- ### Run iCloud Photos Downloader Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_NPM.md Use this command to start downloading iCloud photos to a specified directory. Configure username and enable watch mode with an interval. ```sh npx --yes icloudpd --directory /data --username my@email.address --watch-with-interval 3600 ``` -------------------------------- ### Run icloudpd from Downloaded Executable Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/install.md Execute the downloaded icloudpd binary with specified username, directory, and watch interval. ```sh icloudpd --username your@email.address --directory photos --watch-with-interval 3600 ``` -------------------------------- ### Configure icloudpd Custom App on TrueNAS Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/nas.md Use these arguments when setting up the icloudpd custom app in TrueNAS. Ensure each parameter name and its value are provided as separate arguments. ```bash icloudpd \ -u your@email.address \ -d /data \ --password-provider webui \ --mfa-provider webui \ --watch-with-interval 3600 ``` -------------------------------- ### Build Linux Static Executables Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/CONTRIBUTING.md Builds static executables for 'icloudpd' and 'icloud' on Linux. This is useful for creating self-contained binaries. ```sh scripts/build_static icloudpd scripts/build_static icloud ``` -------------------------------- ### Build NPM Package Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/CONTRIBUTING.md Builds an NPM package with single, platform-specific executables. This step also expects executables to be prepared in advance. ```sh scripts/build_npm 1.32.3 ``` -------------------------------- ### Configure Folder Structure with Date Formatting Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/wiki/FAQ---Frequently-asked-questions Use the `--folder-structure` option with Python's string formatting to organize downloaded photos by date. The format string accepts datetime object attributes like year, month, and day. ```bash --folder-structure {:%Y/%Y-%m-%d} ``` -------------------------------- ### Build Packages with Docker (Linux Alternative) Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/CONTRIBUTING.md Builds packages using Docker, creating a build environment for Linux executables and Python wheels. This command sets up a Docker buildx builder and then performs the build. ```sh docker buildx create --use --driver=docker-container --name container --bootstrap docker buildx build . --cache-to type=local,dest=.cache,mode=max --cache-from type=local,src=.cache --platform=linux/amd64 --builder=container --progress plain -o dist -f Dockerfile.build ``` -------------------------------- ### Run icloudpd using npx Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/install.md Execute icloudpd using npx, specifying directory, username, and watch interval. ```sh npx --yes icloudpd --directory /data --username my@email.address --watch-with-interval 3600 ``` -------------------------------- ### Build Docker Image Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/CONTRIBUTING.md Builds the Docker image 'icloudpd_dev'. This command assumes that musl binaries have already been prepared and placed in the 'dist' folder. ```sh docker build -t icloudpd_dev . ``` -------------------------------- ### Build Python Wheel with Executable Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/CONTRIBUTING.md Builds a Python wheel package that includes pre-compiled executables. This step requires executables to be prepared beforehand. ```sh scripts/build_whl ``` -------------------------------- ### Build Platform Executables Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/CONTRIBUTING.md Builds platform-specific executables for 'icloudpd' and 'icloud'. Note that these scripts are platform-dependent (Linux, Windows, macOS). ```sh scripts/build_bin1 icloudpd scripts/build_bin1 icloud ``` -------------------------------- ### iCloud Photos Downloader CLI Options Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/reference.md Reference for all available command-line options for the icloudpd tool. ```APIDOC ## iCloud Photos Downloader CLI Options This document provides a reference for all command-line options available for the `icloudpd` tool. ### `--until-found X` #### Description Checks assets, from most recently added to the oldest, for their local copies. Downloads if not present locally. The whole process stops once X number of subsequent checks result in a local file matching the remote. This option is a useful optimization for incremental updates: only a small portion (X) of the existing local storage will be rechecked for existence, saving on local I/O. However, the process will not “fill the gaps” in local storage if any exist (and will not identify them). #### NOTE Assets are checked by the date they were added to iCloud, not by the date they were taken/created. ### `--recent X` #### Description Checks X most recently added assets for their local copies. Downloads if not present locally. This option is mostly useful while testing and experimenting with parameters to limit the volume of downloads. #### NOTE Assets are checked by the date they were added to iCloud, not by the date they were taken/created. ### `--album X` #### Description Specifies which album(s) to download. When not specified, the whole asset collection is considered. #### Versionchanged Changed in version 1.31.0: Option may be specified multiple times to download from different albums. ### `--list-albums` #### Description Lists all available albums. ### `--library X` #### Description Specifies which library to use. Default: “Personal Library”. #### NOTE Only one library can be used by `icloudpd`. #### Versionadded Added in version 1.16.0: Shared library support added for iOS 16 shared libraries. ### `--list-libraries` #### Description Lists all libraries available for the account. #### Versionadded Added in version 1.16.0: Shared library support added for iOS 16 shared libraries. ### `--watch-with-interval X` #### Description Runs `icloudpd` forever, periodically re-checking iCloud for changes (“watch”). The interval is specified in seconds, e.g. 3600 will be a 1-hour interval. Too short an interval may trigger throttling on Apple’s side, although no evidence has been reported. #### Versionadded Added in version 1.10.0. ### `--version` #### Description Reports the current version and commit hash & date that the version was built from. #### NOTE If `--use-os-locale` was specified before `--version`, then the date is formatted according to the OS locale. ### `--use-os-locale` #### Description Instructs `icloudpd` to use the OS locale. If not specified (and by default), US English is used. #### Versionadded Added in version 1.22.0. #### SEE ALSO The [File Naming](naming.md) section discusses the affected behavior. ### `--dry-run` #### Description If specified, no changes to local storage or iCloud remote storage are made. Authentication will be performed and remote files will be checked against local storage. Any differences will be reported instead of performing downloads. This parameter is useful for experimenting with new parameters. #### Versionadded Added in version 1.15.0. ### `--domain X` #### Description Access to Apple servers is blocked from mainland China. As an alternative, the iCloud service is available on an internal .cn domain, which can be specified for `icloudpd` to work from mainland China. Default is “.com”. “.cn” is the only other option available. #### Versionadded Added in version 1.9.0. ### `--password X` #### Description Specifies the iCloud password to use for authentication. #### NOTE Supplying credentials through command line parameters is not considered a good practice since they can be logged and/or otherwise exposed. Consider using other [password providers](authentication.md#password-providers). ### `--directory X` #### Description Specifies the root folder where the [folder structure](#folder-structure-parameter) will start and files will be downloaded. ### `--file-match-policy X` #### Description Specifies an algorithm (policy) to match remote files to local files. #### Versionadded Added in version 1.20.0. #### SEE ALSO Discussion of [File Naming and Deduplication](naming.md). ### `--username X` #### Description Specifies the AppleID (email address) used for authenticating to iCloud. May be used multiple times to introduce different configurations and/or accounts. See [Using Multiple Accounts and Config](authentication.md#multiple-accounts-and-configs). ### `--auth-only` #### Description Performs authentication only, without downloading any files. ``` -------------------------------- ### Run Lint and Tests Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/CONTRIBUTING.md Executes linting checks and all unit tests for the project to ensure code quality and correctness. This is a required step before submitting pull requests. ```sh scripts/lint ``` ```sh scripts/test ``` -------------------------------- ### Make macOS Binary Executable Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/install.md Add the executable flag to a downloaded macOS binary using chmod. ```sh chmod +x icloudpd-1.32.3-macos-amd64 ``` -------------------------------- ### Download Photos and Videos Separately with One Account Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/authentication.md Use this command to download photos to one directory and videos to another for the same iCloud account. The `--cookie-directory` is shared, while `--directory` and `--skip-*` flags differentiate the media types. Added in version 1.32.0. ```bash $ icloudpd --cookie-directory ./cookies --username alice@apple.com --directory ./photos --skip-videos --username alice@apple.com --directory ./videos --skip-photos --use-os-locale ``` -------------------------------- ### Build Python Wheel Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/CONTRIBUTING.md Builds the Python wheel package, including source files. This command is typically run from the project root. ```sh scripts/build ``` -------------------------------- ### Run icloudpd using Docker Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/install.md Run icloudpd within a Docker container, mounting a local directory for photos and setting the timezone. This command also specifies the username and watch interval. ```sh docker run -it --rm --name icloudpd -v $(pwd)/Photos:/data -e TZ=America/Los_Angeles icloudpd/icloudpd:latest icloudpd --directory /data --username my@email.address --watch-with-interval 3600 ``` -------------------------------- ### Format Python Code Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/CONTRIBUTING.md Formats the Python code according to the project's standards using ruff. This command should be run before submitting code changes. ```sh scripts/format ``` -------------------------------- ### Run iCloud Photos Downloader with Docker Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README_DOCKER.md This command runs the iCloud Photos Downloader in a Docker container, mounting a local directory for photos and setting a timezone. Adjust the volume mount and timezone as needed for your system. ```sh docker run -it --rm --name icloudpd -v $(pwd)/Photos:/data -e TZ=America/Los_Angeles icloudpd/icloudpd:latest icloudpd --directory /data --username my@email.address --watch-with-interval 3600 ``` -------------------------------- ### Create and Authorize iCloud Session Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README.md This command creates and authorizes an iCloud session, including handling two-factor authentication. It can be used to verify session validity. ```bash icloudpd --username my@email.address --password my_password --auth-only ``` -------------------------------- ### Export and Filtering Parameters Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/reference.md Parameters controlling export options and filtering of assets based on creation date. ```APIDOC ## XMP Sidecar Parameter ### Description Exports additional data as XMP sidecar files. ### Versionadded Added in version 1.25.0. ### Parameters #### Query Parameters - **--xmp-sidecar** (boolean) - Optional - Enables export of XMP sidecar files. ``` ```APIDOC ## Skip Created Before Parameter ### Description Does not process assets created before the specified timestamp. The timestamp can be in ISO format (e.g., 2025-06-01) or as an interval backwards from the current date (e.g., 5d). ### Versionadded Added in version 1.28.0. ### NOTE The date refers to when the asset was created, not when it was added to iCloud. ### Parameters #### Query Parameters - **--skip-created-before** (string) - Required - Timestamp in ISO format or interval (e.g., '2025-06-01', '5d'). ``` ```APIDOC ## Skip Created After Parameter ### Description Does not process assets created after the specified timestamp. The timestamp can be in ISO format (e.g., 2025-06-01) or as an interval backwards from the current date (e.g., 5d). ### Versionadded Added in version 1.29.0. ### NOTE The date refers to when the asset was created, not when it was added to iCloud. ### Parameters #### Query Parameters - **--skip-created-after** (string) - Required - Timestamp in ISO format or interval (e.g., '2025-06-01', '5d'). ``` -------------------------------- ### Authentication Parameters Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/reference.md Parameters related to authentication and multi-factor authentication (MFA) for iCloud access. ```APIDOC ## MFA Provider Parameter ### Description Customizes the intake of the multi-factor authentication (MFA) code for iCloud authentication. ### SEE ALSO Details in the [MFA providers](authentication.md) section. ``` ```APIDOC ## SMTP Parameters ### Description Settings for SMTP notifications for expired/needed authentication. ### Parameters #### Query Parameters - **--smtp-username** (string) - Required - Username for SMTP authentication. - **--smtp-password** (string) - Required - Password for SMTP authentication. - **--smtp-host** (string) - Required - Hostname for the SMTP server. - **--smtp-port** (integer) - Required - Port for the SMTP server. - **--smtp-no-tls** (boolean) - Optional - Disables TLS for SMTP connections. ``` ```APIDOC ## Notification Email Parameters ### Description Settings for email notification addressing. ### Parameters #### Query Parameters - **--notification-email** (string) - Required - The recipient email address for notifications. - **--notification-email-from** (string) - Required - The sender email address for notifications. ``` ```APIDOC ## Notification Script Parameter ### Description Specifies a script to be executed for notifications on expired MFA. ### Parameters #### Query Parameters - **--notification-script** (string) - Required - Path to the script to be executed. ``` -------------------------------- ### Add Version Tag for Release Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/CONTRIBUTING.md Adds a version tag to the current commit and pushes it to the master branch. This is a manual step in the release process. ```sh git tag v1.32.2 git push origin v1.32.2 ``` -------------------------------- ### Manage System Keyring with iCloud CLI Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/authentication.md Use the `icloud` command-line tool to store or delete your iCloud password from the system keyring. This is useful for managing credentials for authentication providers. ```bash $ icloud --username jappleseed@apple.com ICloud Password for jappleseed@apple.com: Save password in keyring? (y/N) ``` ```sh icloud --username jappleseed@apple.com --delete-from-keyring ``` -------------------------------- ### Download Photos from Multiple iCloud Accounts Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/docs/authentication.md Configure `icloudpd` to download photos from multiple iCloud accounts by specifying the `--username` parameter multiple times. Options following a `--username` apply only to that user, while preceding options serve as defaults. ```default $ icloudpd --use-os-locale --cookie-directory ./cookies --username alice@apple.com --directory ./alice --username bob@apple.com --directory ./bob ``` -------------------------------- ### Synchronize iCloud Photos to Local System Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/README.md Use this command to continuously synchronize your iCloud photo collection to a local directory. It monitors for changes at a specified interval. ```bash icloudpd --directory /data --username my@email.address --watch-with-interval 3600 ``` -------------------------------- ### Reinitialize Bootstrap Components on HTMX Swap Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/blob/master/src/icloudpd/server/templates/index.html This JavaScript code reinitializes Bootstrap collapse components after an HTMX swap to ensure they maintain their state. It checks if a collapse component is already initialized before creating a new instance. ```javascript document.body.addEventListener('htmx:afterSwap', function(evt) { // Find all collapse elements and ensure they maintain their state const collapseElements = document.querySelectorAll('[data-bs-toggle="collapse"]'); collapseElements.forEach(el => { // Don't reinitialize if already initialized if (!bootstrap.Collapse.getInstance(el)) { new bootstrap.Collapse(el.getAttribute('data-bs-target'), {toggle: false}); } }); }); ``` -------------------------------- ### Escape Spaces in Password Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/wiki/FAQ---Frequently-asked-questions When your iCloud password contains spaces, escape them on the command line by enclosing the password in quotes. ```bash icloud_photos_downloader -p "my s3cret Password" ``` -------------------------------- ### Handle ZONE_NOT_FOUND Error Source: https://github.com/icloud-photos-downloader/icloud_photos_downloader/wiki/FAQ---Frequently-asked-questions The ZONE_NOT_FOUND error indicates that iCloud Photos synchronization is not enabled. Log into iCloud.com and enable photo synchronization in your device settings to resolve this. ```text Please log into https://icloud.com/ to manually finish setting up your iCloud service (ZONE_NOT_FOUND) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.