{"id":13582335,"url":"https://github.com/trinhdrew1418/gphotos-cli","last_synced_at":"2025-04-06T14:30:45.264Z","repository":{"id":144227400,"uuid":"189175495","full_name":"trinhdrew1418/gphotos-cli","owner":"trinhdrew1418","description":"A command line application for interfacing with google photos written in Go","archived":false,"fork":false,"pushed_at":"2019-07-01T06:23:30.000Z","size":148,"stargazers_count":27,"open_issues_count":7,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-05T22:40:57.172Z","etag":null,"topics":["command-line-tool","golang","google-api","google-photos","gphotos-cli","photos"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trinhdrew1418.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-29T07:40:33.000Z","updated_at":"2024-09-20T22:06:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"521f2218-5db2-4d25-b385-200906194a1f","html_url":"https://github.com/trinhdrew1418/gphotos-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinhdrew1418%2Fgphotos-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinhdrew1418%2Fgphotos-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinhdrew1418%2Fgphotos-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinhdrew1418%2Fgphotos-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trinhdrew1418","download_url":"https://codeload.github.com/trinhdrew1418/gphotos-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247495684,"owners_count":20948097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","golang","google-api","google-photos","gphotos-cli","photos"],"created_at":"2024-08-01T15:02:36.525Z","updated_at":"2025-04-06T14:30:45.258Z","avatar_url":"https://github.com/trinhdrew1418.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# gphotos-cli: A command line interface for Google Photos\n\nA command line interface app for Google photos for doing bulk tasks such as mass filtered downloads\nand mass uploads.\n\n# Features\n\n* Parallelized uploading and downloading\n* Filtering by date and category type for downloads\n* Album creation\n* Uploads and downloads to/from albums (can only upload to albums created by this app due to Google's API limitations)\n* Exponential backoff for large uploads and downloads, tested on jobs 100 GB+ large\n* Handles all raw video and image types supported by Google photos\n\n# Installation\n\nWith Go already installed and setup, just call:\n\n`go get -u github.com/trinhdrew1418/gphotos-cli`\n\nBefore usage, you first need to grant the application account authorization:\n\n`gphotos-cli init`\n\n# Commands\n## init\n\nThis initializes the authorization token needed to access your account\n\n`gphotos-cli init`\n\n##### options\n\n* `-c` or `--credential-path`\nDesignate the path of the credenntial file you'd alternatively like to use.\n\n## push\n\nCommand to upload files to your google photos library.\n\n`gphotos-cli push [-OPTIONS] [FILE 1] [FOLDER 1] ...`\n\n##### options\n\n* `-r` or `--recursive`\n    Recursively traverses folders in arguments for file uploads\n\n* `-s` or `--select`\n    Pulls up a menu to select available albums from to upload to. NOTE: you can ONLY upload to\n    albums that you've created through this app. This is a limitation of the google photos api.\n\n* `-v` or `--verbose`\n    This lists out all of the files you'll be uploading. Useful if you want to know which files have\n    valid extensions.\n \n* `-a` or `--album`\n    Input the name of the album you want to upload to\n\n## pull\n\nCommand to download files\n\n`gphotos-cli pull [-OPTIONS]`\n\nFollow the prompts to select your filters. It will download your files into folders separated by year and month. Each\nfile will be named with its day of creation and time.\n\nYou can filter up to 10 of the following categories:\n\n* animals\n* landmarks\n* pets\n* utility\n* birthdays\n* landscapes\n* receipts\n* weddings\n* cityscapes\n* night\n* screenshots\n* whiteboards\n* arts\n* crafts\n* fashion\n* documents\n* people\n* selfies\n* houses\n* gardens\n* flowers\n* holidays\n* travel\n* food\n* performances\n* sport\n\n##### options\n\n* `-d [PATH]`\n    define the directory path you want to download your files to.\n    \n* `-s` or `--select`\n    pull up a selection menu of albums to download instead. The files will be downloading\n    into a folder of the name of the album. The files will not be organized further beyond\n    this. As a limitation of the API, filtering in conjunction with an album request is \n    not possible.\n    \n* `-a` or `--album`\n    Input the name of the album you want to download from.\n\n## albums\n\nCreate albums by calling\n\n`gphotos-cli albums create [TITLE OF ALBUM]`\n\nMore subcommands coming later.\n\n# Caveats\n\n* You may unexpectedly hit a quota limit due to the application coming with some default credentials.\n* Due to a google photos api limitation, you can only upload to albums created by the app\n* When downloading files, its undetermined how many photos in total you`ll be downloading. The API uses pagination for large\nrequests and instead of waiting for possibly several page requests for the full download request, it is faster to\nconcurrently do requests for pages whilst downloading what's available. The current default page size is 25.\n* The API does not support the retrieval of raw files. If you try to pull a raw file, it will return a compressed jpeg. Downloading\nraw files still works through the website though.\n\n# Credits\nSome of these packages were a huge help; either directly, as reference code, or as inspiration.\n\n* [cobra](https://github.com/spf13/cobra)\n* [gphotos-uploader-cli](https://github.com/nmrshll/gphotos-uploader-cli)\n* [mpb](https://github.com/vbauerster/mpb)\n* [promptui](https://github.com/manifoldco/promptui)\n* [drive](https://github.com/odeke-em/drive)\n\n\n## TODOs\n\n* Mass moving existing photos to albums\n* Search by metadata: specific filetypes, camera types, etc.\n* Resumable uploads and data chunking for large file uploads\n* Upload and download speed metrics","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrinhdrew1418%2Fgphotos-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrinhdrew1418%2Fgphotos-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrinhdrew1418%2Fgphotos-cli/lists"}