farhanchoksi/play-upload

Upload Android App Bundles (.aab) to Google Play Developer API

Maintainers

Package info

github.com/Farhanchoksi/play-upload

Type:project

pkg:composer/farhanchoksi/play-upload

Transparency log

Statistics

Installs: 9

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.2.1 2026-08-04 09:56 UTC

This package is auto-updated.

Last update: 2026-08-04 10:00:34 UTC


README

play-upload is a production-ready, high-performance Command Line Interface (CLI) built with Laravel Zero (PHP 8.3+) for uploading Android App Bundles (.aab) to the Google Play Store via the official Google Play Developer API.

✨ Features

  • 🌐 Automated 1-Click Browser Login: Opens your Mac default browser automatically, authenticates via Google OAuth, and logs in with zero manual Client ID typing!
  • 📄 Service Account JSON Support: Drag & drop your Google Play Console .json key file for quick bot / CI/CD authentication.
  • 👥 Multi-Account Management: Link multiple Google accounts, list active sessions, and switch between accounts instantly.
  • 🎯 All Release Tracks Supported: Upload .aab bundles to Internal Testing, Closed Testing (Alpha), Open Testing (Beta), or Production.
  • 📊 Interactive Terminal UI: Built with Laravel Prompts — features select dropdowns, text inputs, animated spinners, and a real-time upload progress bar.
  • 🩺 Human-Readable Error Diagnostics: Intercepts Google API errors and provides clear explanations and step-by-step solutions.
  • 📜 Audit History & Logging: Saves upload records to ~/.config/play-upload/history.json and logs events to play-upload.log.

💻 Installation

Global Installation via Composer (Recommended)

Run the following command from any terminal:

composer global require farhanchoksi/play-upload

Make sure your composer global bin directory is in your system's PATH. If not, add this to your ~/.zshrc or ~/.bashrc:

export PATH="$HOME/.composer/vendor/bin:$PATH"

Manual Installation (Development)

# 1. Clone the repository and navigate to the folder
cd /Volumes/Data2/Farhan.mtzinfotech/play-upload

# 2. Install dependencies
composer install

# 3. Create a global symlink
sudo ln -sf /Volumes/Data2/Farhan.mtzinfotech/play-upload/play-upload /usr/local/bin/play-upload

⚡ Command Reference & Usage Guide

1. play-upload login

Description: Authenticate and link a Google Account to the CLI.

play-upload login

Options Offered:

  1. 🌐 Browser Web Sign-In (Recommended): Automatically opens your Mac browser. Select your Google account, click Allow, and return to terminal. Login is completed automatically with zero code copy-paste!
  2. 📄 Service Account JSON Key File: Drag & drop your downloaded Google Play Console .json key file.
  3. 🔑 Custom OAuth Credentials: Manually enter custom GCP Client ID & Secret.

2. play-upload whoami

Description: Display current active Google Account details.

play-upload whoami

Example Output:

 Active Google Account Details:

 ┌───────────────────────┬───────────────────────────┐
 │ Property              │ Value                     │
 ├───────────────────────┼───────────────────────────┤
 │ Account Email         │ farhanchoksipvt@gmail.com │
 │ Auth Type             │ OAUTH                     │
 │ Key / Config Location │ OAuth Storage             │
 │ Date Registered       │ 2026-07-30 06:57:52       │
 └───────────────────────┴───────────────────────────┘

3. play-upload accounts

Description: View all registered Google Accounts and switch the active account.

play-upload accounts

Allows selecting which account to set as default for future uploads.

4. play-upload apps

Description: Test and verify Google Play Console permissions for an Android package.

play-upload apps

Prompts for an Android package name (e.g. com.example.app) and initializes a test Edit session on Google Play Console to confirm access.

5. play-upload upload

Description: Full interactive wizard to upload an .aab file to Google Play Store.

play-upload upload

Step-by-Step Flow:

  1. Prompts for the .aab file path (validates file existence and .aab extension).
  2. Asks for target Google Account from stored sessions.
  3. Asks for target Android Package Name (com.example.app).
  4. Asks to select Release Track:
    • Internal Testing
    • Closed Testing (Alpha)
    • Open Testing (Beta)
    • Production
  5. Asks for optional Release Notes.
  6. Streams upload with a real-time progress bar.
  7. Commits the release to Google Play Console and logs history.

Example Terminal Output:

🚀 Google Play AAB Upload Wizard (play-upload)

Uploading /Users/farhan/Desktop/app-release.aab ...
Uploading AAB file... [============================] 100%

✅ Upload Successful

Package Name:  com.example.app
Version Code:  125
Track:         Internal
Status:        Processing / Completed
Account:       example@gmail.com

6. play-upload logout

Description: Safely remove stored credentials for an account.

play-upload logout

📁 Data & Configuration Storage

All account credentials, active pointers, and logs are stored securely with strict permissions (0600) in:

  • Config Path: ~/.config/play-upload/
  • Accounts File: ~/.config/play-upload/accounts.json
  • Active Pointer: ~/.config/play-upload/active.json
  • Audit Logs: ~/.config/play-upload/play-upload.log
  • Upload History: ~/.config/play-upload/history.json

🩺 Error Handling & Troubleshooting

If an upload fails (e.g. version code conflict, missing API permissions, expired session), play-upload displays exact API error details along with an actionable fix:

  • Version Code Conflict: "Increment the versionCode in your Android project (build.gradle), rebuild the .aab, and try again."
  • API Access Disabled: "Enable 'Google Play Android Developer API' in GCP Console for your service account project."
  • Permission Denied: "Grant access to this account under Google Play Console -> Setup -> API Access with Release Manager permissions."

📄 License

MIT License. Designed for production deployment.