# OSXPhotos

> Python app to work with pictures and associated metadata from Apple Photos on macOS

Source: https://talira.ai/catalog/osxphotos-yf14hk07
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool, Library
- Categories: [media / photos / library export](https://talira.ai/categories/media/photos/library-export), [media / photos / cloud library backup](https://talira.ai/categories/media/photos/cloud-library-backup)
- Platforms: macos, linux, cli[^1]
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Self-hostable: yes
- Creator: Rhet Turnbull

OSXPhotos is a command-line tool and Python package for the Apple Photos library on a Mac. It queries the library's database (file names, keywords, people, albums, places and more) and exports originals and edited versions with their metadata, into folders and file names built from a template, and can export again incrementally. With `--download-missing` it has Photos download originals that are only in [iCloud Photos](https://talira.ai/catalog/icloud-photos-b7jcnwk3.md) (Optimize Mac Storage) before exporting them. It also reads iPhoto libraries, and its export and query commands and Python API run on Linux against a copied library. Rhet Turnbull created it in 2019.

## Links

- Website: https://rhettbull.github.io/osxphotos/
- GitHub: https://github.com/RhetTbull/osxphotos
- Docs: https://rhettbull.github.io/osxphotos/

## Problems it solves

- export my whole Apple Photos library to folders by date with the original file names
- back up my Mac's Photos library, edits, keywords and albums included, to an external drive
- my Photos library is set to Optimize Mac Storage and I need the full-size originals out of it
- write the titles, keywords and people from Apple Photos into the exported files' metadata
- query the Apple Photos database from a Python script
- leave Apple Photos for another photo app without losing my albums and people tags
- copy every photo of one person in my Photos library to a folder
- export only the photos added since my last backup from Apple Photos

## Features

- query the Photos database: keywords, persons, albums, places, labels
- export originals and edited versions with metadata
- templates for folder and file names
- incremental exports
- --download-missing fetches originals from iCloud through Photos
- XMP sidecars and writing metadata with exiftool
- reads iPhoto 9.6.1 libraries
- Python API
- pre-built executables, uv, pip, Homebrew tap and MacPorts installs

## Limitations

- Can't read shared albums on macOS 26[^1]
- Doesn't handle audio-only files stored in Photos: only images and videos[^1]
- Most features need macOS: on Linux only the export and query commands and the Python API work[^1]

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.67 out of 1.
Signals: maintenance 1.00, adoption 0.72, momentum 0.50, community 0.72, backing 0.20, extensibility 0.20.

- last commit today
- 89 commits in the last 90 days
- latest release v0.78.1 15 days ago
- 4.0k GitHub stars
- 62 contributors
- created by Rhet Turnbull

## Related

- Works with [iCloud Photos](https://talira.ai/catalog/icloud-photos-b7jcnwk3.md)

## Alternatives

- [iCloud Photos Sync](https://talira.ai/catalog/icloud-photos-sync-b212n9z1.md): One-way sync engine for the iCloud Photos Library into the native file system
- [iCloud Photos Downloader (icloudpd)](https://talira.ai/catalog/icloud-photos-downloader-icloudpd-ckxvkzj7.md): A command-line tool to download photos from iCloud
- [kei](https://talira.ai/catalog/kei-chg31nve.md): Fast, parallel backups for cloud-hosted photos and videos

## Sources

[^1]: https://github.com/RhetTbull/osxphotos/blob/main/README.md (checked 20 Nov 2026)
[^2]: https://github.com/RhetTbull/osxphotos/blob/main/LICENSE (checked 20 Nov 2026)
