Command line tool to mass upload media folders to your Google Photos account(s).
While the official tool is only supports Mac OS and Windows, this brings an uploader to Linux too. Lets you upload photos from, in theory, any OS for which you can compile a Go program.
- specify folders to upload in config file
- upload to multiple google accounts
- include/exclude files & folders using patterns (see documentation)
- resumable uploads
- optionally delete objects after uploaḍ
- security: logs you into google using OAuth (so this app doesn't have to know your password), and stores your temporary access code in your OS's secure storage (keyring/keychain).
You can install the pre-compiled binary (in several different ways) or compile from source.
Here are the steps for each of them:
homebrew tap (only on macOS for now):
$ brew install gphotosuploader/tap/gphotos-uploader-cli
manually
Download the pre-compiled binaries from the releases page and copy to the desired location.
You can compile the source code in your system. Go 1.11+ is required to compile this application:
$ git clone https://github.com/gphotosuploader/gphotos-uploader-cli
$ cd gphotos-uploader-cli
$ make build
Or you can use go get if you prefer it:
$ go get github.com/gphotosuploader/gphotos-uploader-cli
First initialize the config file using this command:
$ gphotos-uploader-cli init
Default configuration folder is
~/.config/gphotos-uploader-clibut you can specify your own folder using--config /my/config/dir. Configuration is kept in theconfig.hjsonfile inside this folder.
You must review the documentation to specify your Google Photos API credentials, APIAppCredentials. You should tune your jobs configuration also.
Once it's configured you can start uploading files in this way:
$ gphotos-uploader-cli
The first time you run gphotos-uploader-cli, after setting your configuration (Google Photos API credentials), few manual steps are needed:
- You should get an output like this one:
2019/09/07 17:47:11 Token has not been retrieved from token store: failed retrieving token from keyring
2019/09/07 17:47:11 Open http://localhost:40923
- A browser will be opened at this point. Select the account where you wan to upload your files (the same you configured in the config file). You will see something like this:
- After that, you should confirm that you trust on
gphotos-uploader-clito access to your Google Photos account, click on Go to gphotos-uploader:
- Finally Google will ask you to confirm permission Google Photos account:
- A green page is shown if all is fine
- Go back to your terminal, you will see something like:
2019/09/07 17:47:23 Token expiration: 2019-09-07 18:47:23.588661948 +0200 CEST m=+3612.289671492
All auth configuration is in place.
Have improvement ideas or want to help ? Please start by opening an issue.
Use of this source code is governed by an MIT-style license that can be found in the LICENSE MIT file.



