Skip to content

CLI‑library

Rob Hooper edited this page Mar 11, 2026 · 7 revisions

--library

Select which iCloud Photos library to download from.

Usage

# Download from the default (personal) library
icloudpd-rs -u my@email.address -d /photos

# Download from a shared library
icloudpd-rs -u my@email.address -d /photos --library "SharedSync-ABCD1234-5678-90EF"

# Download from all libraries (personal + shared) in one run
icloudpd-rs -u my@email.address -d /photos --library all

Details

  • Default: PrimarySync
  • Type: String (all is a special value)

When omitted, downloads come from your personal photo library (PrimarySync). To download from a shared or other private library zone, pass the zone name shown by --list-libraries.

The lookup checks private libraries first, then shared libraries. If the name isn't found in either, the command exits with an error suggesting --list-libraries.

--library all

Pass all (case-insensitive) to sync every available library in a single run. This collects your personal library plus all private and shared library zones, then syncs each one sequentially.

Each library gets its own sync token (stored as sync_token:{zone_name} in the state DB), so incremental sync works independently per library. If a session expires mid-run, re-auth happens and the cycle restarts from the library that failed.

--list-albums --library all shows albums grouped by library name:

Library: PrimarySync
  All Photos
  Favorites
Library: SharedSync-ABCD1234
  All Photos

--reset-sync-token --library all clears tokens for all resolved libraries.

Workflow

# 1. Discover available libraries
icloudpd-rs -u my@email.address --list-libraries

# 2. Download from a specific library
icloudpd-rs -u my@email.address -d /photos --library "SharedSync-ABCD1234"

# 3. Or just download from everything
icloudpd-rs -u my@email.address -d /photos --library all

TOML config

[filters]
library = "all"          # or "PrimarySync", "SharedSync-ABCD1234", etc.

See Also

Clone this wiki locally