gphotos-uploader-cli

Command line tool to mass upload media folders to your google photos account(s) (Mac OS / Linux)

Github星跟踪图

Build Status
Go Report Card
codebeat badge
codecov
GitHub release
GitHub

Google Photos uploader CLI

Command line tool to mass upload media folders to your Google Photos account(s).

While the official tool 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.

Features

  • Customizable configuration: via JSON-like config file.
  • Multiple Google accounts support: upload your pictures to multiple accounts.
  • Filter files with patterns: include/exclude files & folders using patterns (see documentation).
  • Resumable uploads: Uploads can be resumed, saving time and bandwidth.
  • File deletion after uploading: Clean up local files after being uploaded.
  • Track already uploaded files: uploads only new files to save bandwidth.
  • Secure: 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).

Getting started

Install

You can install the pre-compiled binary (in several different ways) or compile from source.

Here are the steps for each of them:

Install the pre-compiled binary

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.

Compiling from source

This project will maintain compatibility with the last two Go major versions published. Currently Go 1.12 and Go 1.13.

You can compile the source code in your system. Go 1.12+ 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

Configure

First initialize the config file using this command:

$ gphotos-uploader-cli init

Default configuration folder is ~/.gphotos-uploader-cli but you can specify your own folder using --config /my/config/dir. Configuration is kept in the config.hjson file inside this folder.

You must review the documentation to specify your Google Photos API credentials, APIAppCredentials. You should tune your jobs configuration also.

Run

Once it's configured you can start uploading files in this way:

$ gphotos-uploader-cli push

First time run

The first time you run gphotos-uploader-cli, after setting your configuration (Google Photos API credentials), few manual steps are needed:

  1. You should get an output like this one:
[info]   Opening browser to complete authorization.
  1. 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:

Google asking for Google Photos API credentials

  1. After that, you should confirm that you trust on gphotos-uploader-cli to access to your Google Photos account, click on Go to gphotos-uploader:

Google ask you to verify gphotos-upload-cli

  1. Finally Google will ask you to confirm permission Google Photos account:

Google ask permission to your Google Photos account

  1. A green page is shown if all is fine

Final confirmation, all was good

All auth configuration is in place.

Contributing

Help us make gphotos-uploader-cli the best tool for uploading your local pictures to Google Photos.

Reporting Issues

If you find a bug while working with gphotos-uploader-cli, please open an issue on GitHub and let us know what went wrong. We will try to fix it as quickly as we can.

Feedback & Feature Requests

You are more than welcome to open issues in this project to:

Contributing Code

This project is mainly written in Golang. If you want to contribute code, see Contributing guide lines for more information.

License

Use of this source code is governed by an MIT-style license that can be found in the LICENSE MIT file.

主要指标

概览
名称与所有者gphotosuploader/gphotos-uploader-cli
主编程语言Go
编程语言Makefile (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2018-07-27 23:07:05
推送于2025-04-07 11:34:38
最后一次提交
发布数80
最新版本名称v5.0.1 (发布于 2025-02-22 08:10:19)
第一版名称v0.1.0 (发布于 2018-09-20 00:11:47)
用户参与
星数704
关注者数21
派生数78
提交数830
已启用问题?
问题数219
打开的问题数4
拉请求数218
打开的拉请求数6
关闭的拉请求数65
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?