PHPackages                             octopyid/gphoto - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. octopyid/gphoto

AbandonedLibrary[CLI &amp; Console](/categories/cli)

octopyid/gphoto
===============

Google Photos CLI

v2.1.0(10mo ago)2194MITPHPPHP ^8.1

Since Feb 23Pushed 10mo agoCompare

[ Source](https://github.com/OctopyID/GPhotoCLI)[ Packagist](https://packagist.org/packages/octopyid/gphoto)[ GitHub Sponsors](https://github.com/SupianIDz)[ Fund](https://ko-fi.com/SupianIDz)[ RSS](/packages/octopyid-gphoto/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (6)Versions (10)Used By (0)

Google Photo CLI
================

[](#google-photo-cli)

GPhoto streamlines the photo uploading process and helps you keep your photo library organized. Say goodbye to manual photo uploads and hello to efficient photo management with GPhoto.

Features
--------

[](#features)

- **No Duplicate Processing** - GPhoto uses a cache with keys based on hash files to ensure that the same files are not processed repeatedly, saving you time and storage.
- **No Duplicate Album Names** - GPhoto fetches album names from Google and compares them to ensure there are no duplicates, helping you keep your photo library organized and easy to navigate.
- **Automatic Token Refresh** - GPhoto automatically refreshes the token if an error occurs during the photo upload process, ensuring a seamless and uninterrupted uploading experience.
- **Secure Local Storage** - All authentication data and cache is securely stored locally to ensure your privacy and security. GPhoto does not collect any information from you.

Installation
------------

[](#installation)

Please make sure you have the following requirements installed below:

- PHP 8.1 with curl, inotify, pcntl, and bcmatch extensions.

Download the latest release from the [releases page](https://github.com/OctopyID/GPhotoCLI/releases) or clone this repository.

Due to hardware limitations of the Apple Silicon chipsets on macOS, the `ext-inotify` extension is not supported. Consequently, we offer two different build variants to handle this situation:

1. **Non-inotify Variant:** This is a standard variant that doesn't rely on the `inotify` extension. It involves the following step:

    - When a new token is generated, the current process should be manually stopped.
    - After stopping the process, rerun the upload command to recognize and use the new token in the build process.
2. **Inotify Variant:** This variant provides an automated process, leveraging the 'inotify' feature available on Linux. It works as follows:

    - The build process automatically detects when a new token is generated - without the need for human intervention.
    - Therefore, there's no need to manually stop and rerun the process - saving time and reducing possible errors.

Please note that the Inotify variant offers a more efficient and seamless experience but it is not compatible with macOS environment that use Apple Silicon chipsets. On the other hand, this variant is highly recommended for Linux users who have the `inotify` extension installed and enabled.

Usage
-----

[](#usage)

Before using this application, you need to create a Google Cloud Platform project and enable the Google Photos Library API and create a [OAuth 2.0 Client ID](https://developers.google.com/photos/library/guides/overview#authorization).

The authentication file should look like this :

```
{
    "web": {
        "client_id": "xxxxxxx.apps.googleusercontent.com",
        "project_id": "xxxxxxx",
        "auth_uri": "https://accounts.google.com/o/oauth2/auth",
        "token_uri": "https://oauth2.googleapis.com/token",
        "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
        "client_secret": "xxxxxxx",
        "redirect_uris": [
            "http://localhost:3000"
        ]
    }
}
```

### 1. Authorization Token

[](#1-authorization-token)

```
php gphoto auth:create --auth=./path/to/auth.json --listen=http://localhost:3000
```

If your listener is behind a proxy, you can specify a different redirect URI.

```
php gphoto auth:create --auth=./path/to/auth.json --listen=localhost:3000 --redirect=https://yourdomain.com
```

Note

Make sure this listener/redirect URI is also registered in your Google OAuth configuration

You can also create a custom profile by providing a profile name as the first argument:

```
php gphoto auth:create personal --auth=./path/to/auth.json --listen=localhost:3000
```

The expired token can be renewed with the following command

```
php gphoto auth:reload
```

Or for a specific profile:

```
php gphoto auth:reload personal
```

### 2. Photos

[](#2-photos)

By default, it uses the "default" profile, but you can use a different profile if needed by adding `--auth=personal` to the arguments in all the following commands

#### 2.1 Upload Single File

[](#21-upload-single-file)

```
php gphoto upload:photo ./path/to/photo.png
```

or you can use ` --album` to upload to a specific album.

```
php gphoto upload:photo ./path/to/MyPicture.png --album="My Album"
```

#### 2.2 Upload Multiple Files

[](#22-upload-multiple-files)

To upload multiple files, you need to create a directory that contains all photos with the following structure:

```
. Pictures
├── MyPicture 1.jpg
├── MyPicture 2.jpg
├── MyPicture 3.jpg
└── MyPicture 4.jpg

```

```
php gphoto upload:photo ./path/to/Pictures
```

or you can use ` --album` to upload to a specific album.

```
php gphoto upload:photo ./path/to/Pictures --album="My Album"
```

### 3. Albums

[](#3-albums)

#### 3.1 Show List of Albums

[](#31-show-list-of-albums)

```
php gphoto list:albums
```

#### 3.2 Upload Single Album

[](#32-upload-single-album)

To upload a single album, you need to create a directory that contains all photos with the following structure:

```
. MyAlbum
├── MyPicture 1.jpg
├── MyPicture 2.jpg
├── MyPicture 3.jpg
├── MyPicture 4.jpg
└── MyPicture 5.jpg

```

```
php gphoto upload:album ./path/to/MyAlbum
```

This will upload all files in the `MyAlbum` directory to Google Photos and create an album with the `MyAlbum` name.

#### 3.3 Upload Multiple Albums

[](#33-upload-multiple-albums)

To upload multiple albums, you need to create a directory that contains all albums with the following structure:

```
. MyAlbumCollection
├── MyAlbum 1
│   ├── MyPicture 1.jpg
│   ├── MyPicture 2.jpg
│   ├── MyPicture 3.jpg
│   └── MyPicture 4.jpg
│
└── MyAlbum 2
    ├── MyPicture 1.jpg
    ├── MyPicture 2.jpg
    ├── MyPicture 3.jpg
    └── MyPicture 4.jpg

```

```
php gphoto upload:album ./path/to/MyAlbumCollection --multiple
```

This will upload all files in the `MyAlbumCollection` directory to Google Photos and create an album with `MyAlbum 1`and `MyAlbum 2` names.

Credits
-------

[](#credits)

- [Supian M](https://github.com/SupianIDz)
- [Octopy ID](https://github.com/OctopyID)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance55

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~109 days

Recently: every ~178 days

Total

9

Last Release

303d ago

Major Versions

v1.3.0 → v2.0.02025-07-03

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/37969970?v=4)[Supian M](/maintainers/SupianIDz)[@SupianIDz](https://github.com/SupianIDz)

---

Top Contributors

[![SupianIDz](https://avatars.githubusercontent.com/u/37969970?v=4)](https://github.com/SupianIDz "SupianIDz (25 commits)")

---

Tags

googlegoogle-photoslaravellaravel-zerogooglephotosalbums

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/octopyid-gphoto/health.svg)

```
[![Health](https://phpackages.com/badges/octopyid-gphoto/health.svg)](https://phpackages.com/packages/octopyid-gphoto)
```

###  Alternatives

[worksome/envy

Automatically keep your .env files in sync.

6871.8M](/packages/worksome-envy)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[mehrancodes/laravel-harbor

A CLI tool to Quickly create On-Demand preview environment for your apps.

9989.0k](/packages/mehrancodes-laravel-harbor)[revolution/laravel-google-photos

Google Photos API for Laravel

345.4k](/packages/revolution-laravel-google-photos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
