export
Copy photos from Apple Photos to a disk directory. Supports original, edited, live photo, and raw versions with optional overwrite.
Instructions
Use when: you want to copy one or more photos (by UUID, typically from query) out to a destination directory on disk. By default exports the original; set edited=true for the edited version, live=true to also include the live-photo video, raw=true to also include the raw image. Returns: the destination path, counts of files exported and skipped, the exported file paths, and a per-UUID reason for anything skipped (e.g. edited=true requested but no edits exist). Do not use when: you only need metadata or file paths rather than copies on disk — use get-photo; or you're still figuring out which photos to export — use query first. Safety: this is the only side-effecting tool — it writes files into the destination directory (created if missing). With overwrite=true it OVERWRITES existing files of the same name in place; without it, existing files are skipped. If an original isn't on disk (iCloud 'Optimize Mac Storage'), the export falls back to driving Photos.app via AppleScript to download it on demand — this is slow for large batches and requires Photos.app installed, signed in to iCloud, and Automation permission granted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Also export the raw image | |
| dest | Yes | Destination directory (created if missing) | |
| live | No | Also export the live-photo video | |
| uuid | Yes | Photo UUID(s) to export | |
| edited | No | Export the edited version instead of the original | |
| library | No | Path to a .photoslibrary (default: system Photos library) | |
| overwrite | No | Overwrite existing files at the destination |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skipped | No | ||
| exported | No | ||
| destination | No | ||
| skippedCount | No | ||
| exportedCount | No |