There are 3 repositories under apple-photos-export topic.
An Apple Photos export script.
Exports photos from macOS Photos.app Library to Year/Month folders with dates as filenames
Command line tool to export photos from the macOS Photos library, organized by album and/or date.