Back to projects

// personal project

Personal

Photo Extractor

SwiftPhotoKitmacOSHomebrew

Photo Extractor uses PhotoKit to export every photo and video out of the macOS Photos library and onto disk from the terminal. It exports the edited version of an asset when an edit exists and the original otherwise, and Live Photos come out as both the still and the paired MOV. Output is a flat folder using original filenames, with genuine collisions between different assets disambiguated by suffix.

Re-running against the same destination skips already-exported files, making it safe to run repeatedly to pick up new photos, and a --dry-run flag reports what would be written without touching the disk. The release build needs an embedded Info.plist for the Photos usage description plus an ad-hoc code signature, or macOS kills the binary instead of prompting for library access — handled by a build script and documented, since ad-hoc signing means the permission prompt can reappear after an upgrade.

Key Highlights

  • Exports the full Photos library, preferring edited versions over originals
  • Live Photos exported as both the still and the paired video
  • Incremental — re-runs skip already-exported assets
  • Dry-run mode reports the export without writing files
  • Distributed via a personal Homebrew tap