Feature: Firebase App Distribution integration (firebaseappdistribution/v1)
Summary
Add a new gplay firebase command group that integrates with the Firebase App Distribution API (v1), enabling developers to upload pre-release builds, manage testers and groups, distribute releases, and retrieve tester feedback — all from the same CLI they already use for Google Play Console.
Why this is applicable to Google Play
Many Google Play Console users also use Firebase App Distribution as their primary channel for distributing pre-release APKs and AABs to internal QA teams, beta testers, and stakeholders before promoting builds to Play Console tracks. Firebase App Distribution integrates with Play's internal app sharing service for AABs, and both services share the same Google Cloud service account authentication. Bringing Firebase App Distribution into gplay creates a single CLI for the entire Android release pipeline: build → distribute to testers via Firebase → collect feedback → promote to Play Console tracks.
Problem
Currently, developers managing both Firebase App Distribution and Google Play Console must switch between the Firebase CLI (firebase appdistribution:distribute) and gplay for different stages of their release workflow. There is no unified CLI experience for:
- Uploading builds to Firebase App Distribution for pre-release testing
- Managing Firebase tester pools (separate from Play Console track testers)
- Distributing builds to specific tester groups with release notes
- Retrieving tester feedback reports from Firebase
- Checking AAB signing info for distributed bundles
- Deleting old pre-release distributions
The existing gplay testers commands only manage Play Console track testers (via Edits.Testers), and gplay internal-sharing uses Play's internal app sharing — neither covers the Firebase App Distribution workflow.
Goals
- Provide full CRUD for Firebase App Distribution testers and groups
- Support uploading APKs and AABs to Firebase App Distribution
- Enable distributing releases to testers/groups with release notes
- Surface tester feedback reports for distributed releases
- Support AAB info retrieval (signing certificate, integration status)
- Follow existing CLI patterns (JSON-first,
--outputflag,--dry-run,--paginate) - Reuse the same service account auth already configured in
gplay - Scope all commands by
--project(Firebase/GCP project ID or number)
Proposed Commands
Command group: gplay firebase
gplay firebase <subcommand> [flags]
All subcommands require --project <firebase-project-id> (or GPLAY_FIREBASE_PROJECT env var / config field).
Uploads
# Upload an APK or AAB to Firebase App Distribution
gplay firebase upload --project <id> --app <app-id> --file <path> [--release-notes <text>] [--release-notes-file <path>]
--appis the Firebase app ID (e.g.,1:1234567890:android:abcdef)--fileaccepts.apkor.aabfiles- Upload is a long-running operation; the CLI polls
operations.getuntil complete, then prints the resulting release - Uses
shared.ContextWithUploadTimeoutfor the upload,shared.ContextWithTimeoutfor polling - If
--release-notesis provided, automatically patches the release after upload completes
Releases
# List releases for an app
gplay firebase releases list --project <id> --app <app-id> [--paginate] [--page-size <n>]
# Get a specific release
gplay firebase releases get --project <id> --app <app-id> --release <release-id>
# Update release notes
gplay firebase releases update --project <id> --app <app-id> --release <release-id> --release-notes <text>
# Distribute a release to testers and/or groups
gplay firebase releases distribute --project <id> --app <app-id> --release <release-id> [--testers <emails>] [--groups <group-aliases>]
# Batch delete releases
gplay firebase releases delete --project <id> --app <app-id> --releases <id1,id2,...> [--confirm]
Testers
# List all testers in the project
gplay firebase testers list --project <id> [--paginate] [--page-size <n>]
# Add testers by email
gplay firebase testers add --project <id> --emails <email1,email2,...>
# Remove testers by email
gplay firebase testers remove --project <id> --emails <email1,email2,...> [--confirm]
# Update a tester's display name
gplay firebase testers update --project <id> --tester <tester-id> --display-name <name>
Groups
# List all tester groups
gplay firebase groups list --project <id> [--paginate] [--page-size <n>]
# Create a new group
gplay firebase groups create --project <id> --alias <alias> --display-name <name>
# Get group details
gplay firebase groups get --project <id> --group <alias>
# Update a group
gplay firebase groups update --project <id> --group <alias> --display-name <name>
# Delete a group
gplay firebase groups delete --project <id> --group <alias> [--confirm]
# Add testers to a group
gplay firebase groups add-testers --project <id> --group <alias> --emails <email1,email2,...>
# Remove testers from a group
gplay firebase groups remove-testers --project <id> --group <alias> --emails <email1,email2,...> [--confirm]
Feedback
# List feedback reports for a release
gplay firebase feedback list --project <id> --app <app-id> --release <release-id> [--paginate] [--page-size <n>]
# Get a specific feedback report
gplay firebase feedback get --project <id> --app <app-id> --release <release-id> --report <report-id>
# Delete a feedback report
gplay firebase feedback delete --project <id> --app <app-id> --release <release-id> --report <report-id> [--confirm]
AAB Info
# Get Android App Bundle signing info
gplay firebase aab-info --project <id> --app <app-id>
Implementation Details
API Endpoints
The Firebase App Distribution REST API v1 base URL is https://firebaseappdistribution.googleapis.com. Key resources:
| Resource | Endpoint Pattern | Methods |
|---|---|---|
| Upload | POST /upload/v1/{app=projects/*/apps/*}/releases:upload |
upload (media) |
| Releases | /v1/{parent=projects/*/apps/*}/releases |
list, get, patch, batchDelete, distribute |
| Feedback Reports | /v1/{parent=projects/*/apps/*/releases/*}/feedbackReports |
list, get, delete |
| Release Operations | /v1/{name=projects/*/apps/*/releases/*/operations/*} |
get (for polling upload status) |
| Groups | /v1/{parent=projects/*}/groups |
create, list, get, patch, delete, batchJoin, batchLeave |
| Testers | /v1/{parent=projects/*}/testers |
list, patch, batchAdd, batchRemove |
| AAB Info | /v1/{name=projects/*/apps/*/aabInfo} |
get |
Authentication
- Uses the same service account already configured via
gplay auth login --service-account - Requires the OAuth scope
https://www.googleapis.com/auth/cloud-platform - The service account must have appropriate Firebase App Distribution roles (e.g.,
roles/firebaseappdistribution.admin) on the GCP project - Firebase App Distribution API must be enabled in the GCP project (
firebaseappdistribution.googleapis.com) - Resource names are scoped to GCP project number/ID, not the Play Console package name — hence the
--projectflag instead of--package
Go Client Library
Use the official Google API Go client: google.golang.org/api/firebaseappdistribution/v1
This is already available through the existing google.golang.org/api v0.272.0 dependency in go.mod. Key service types:
firebaseappdistribution.Service— top-level servicefirebaseappdistribution.MediaService— binary uploadfirebaseappdistribution.ProjectsAppsReleasesService— release CRUD + distributefirebaseappdistribution.ProjectsGroupsService— group managementfirebaseappdistribution.ProjectsTestersService— tester managementfirebaseappdistribution.ProjectsAppsReleasesFeedbackReportsService— feedbackfirebaseappdistribution.ProjectsAppsReleasesOperationsService— upload polling
Initialize with the existing service account credentials:
import (
firebaseappdistribution "google.golang.org/api/firebaseappdistribution/v1"
"google.golang.org/api/option"
)
svc, err := firebaseappdistribution.NewService(ctx,
option.WithCredentialsFile(keyPath),
option.WithScopes(firebaseappdistribution.CloudPlatformScope),
)
New Packages and Files
internal/
├── cli/
│ └── firebase/ # New command group package
│ ├── firebase.go # Root `gplay firebase` command
│ ├── upload.go # Upload subcommand
│ ├── releases.go # Releases subcommands (list, get, update, distribute, delete)
│ ├── testers.go # Testers subcommands (list, add, remove, update)
│ ├── groups.go # Groups subcommands (list, create, get, update, delete, add-testers, remove-testers)
│ ├── feedback.go # Feedback subcommands (list, get, delete)
│ ├── aabinfo.go # AAB info subcommand
│ └── firebase_test.go # Tests
├── firebaseclient/ # New Firebase API client wrapper (mirrors playclient pattern)
│ ├── client.go # Service initialization, auth, config resolution
│ └── client_test.go # Tests
Relationship to Existing Commands
| Existing Command | Firebase Equivalent | Key Difference |
|---|---|---|
gplay testers |
gplay firebase testers |
Play testers are per-track; Firebase testers are per-project |
gplay internal-sharing upload-apk/bundle |
gplay firebase upload |
Internal sharing gives URLs; Firebase distributes to tester groups with notifications |
gplay release |
gplay firebase releases distribute |
Play releases go to tracks; Firebase releases go directly to testers/groups |
gplay tracks list |
gplay firebase releases list |
Different resource models |
| (none) | gplay firebase feedback |
No equivalent — unique to Firebase App Distribution |
| (none) | gplay firebase groups |
No equivalent — Firebase has its own group model |
Upload Handling
- Open file with
os.Open, validate extension (.apkor.aab) - Create upload context with
shared.ContextWithUploadTimeout - Call
MediaService.Upload(app).Media(file, googleapi.ContentType("application/octet-stream")) - The upload returns a
GoogleLongrunningOperation— poll withProjectsAppsReleasesOperationsService.GetuntilDone == true - Parse the result into a
GoogleFirebaseAppdistroV1Release - If
--release-noteswas provided, callProjectsAppsReleasesService.Patchto set notes - Print the final release object
Configuration
Add optional firebase_project field to Config struct:
{
"package_name": "com.example.app",
"firebase_project": "my-project-123"
}
Resolution order for project: --project flag > GPLAY_FIREBASE_PROJECT env var > config firebase_project.
Output Format
All commands follow the existing JSON-first pattern:
- Default: minified JSON
--output table: human-readable table--output markdown: markdown table--pretty: pretty-printed JSON
Acceptance Criteria
- [ ]
gplay firebase --helpshows all subcommands with clear descriptions - [ ]
gplay firebase uploaduploads APK/AAB files, polls for completion, prints the resulting release - [ ]
gplay firebase releases listlists releases with pagination support (--paginate) - [ ]
gplay firebase releases distributedistributes a release to specified testers and/or groups - [ ]
gplay firebase releases updateupdates release notes on an existing release - [ ]
gplay firebase releases deletebatch-deletes releases with--confirmguard - [ ]
gplay firebase testers list/add/remove/updateprovides full tester lifecycle management - [ ]
gplay firebase groups list/create/get/update/deleteprovides full group lifecycle management - [ ]
gplay firebase groups add-testers/remove-testersmanages group membership - [ ]
gplay firebase feedback list/get/deletesurfaces tester feedback reports - [ ]
gplay firebase aab-inforetrieves AAB signing info - [ ] All commands support
--output json/table/markdownand--pretty - [ ]
--dry-runintercepts write operations (upload, distribute, delete, create, update) - [ ]
--projectflag is required and validated; falls back toGPLAY_FIREBASE_PROJECTenv var and config - [ ]
--appflag uses Firebase app ID format (validated) - [ ] Authentication reuses existing service account from
gplay auth - [ ] New
firebaseclientpackage mirrors theplayclientpattern for service initialization - [ ]
firebase.FirebaseCommand()registered ininternal/cli/registry/registry.go - [ ] Config struct extended with optional
firebase_projectfield - [ ] All subcommands set
UsageFunc: shared.DefaultUsageFunc - [ ] Comprehensive tests for flag validation, error messages, and output formatting
- [ ]
gplay docs generateincludes the new Firebase commands
References
- Firebase App Distribution overview
- Firebase App Distribution REST API v1 reference
- REST Resource: projects.apps.releases
- REST Resource: projects.groups
- REST Resource: projects.testers
- REST Resource: projects.apps.releases.feedbackReports
- Go client library:
google.golang.org/api/firebaseappdistribution/v1 - Blog: Automate pre-release testing with the App Distribution REST API
- Firebase App Distribution GA announcement
Implementation Checklist
Command & Registration
- [ ] Command group
gplay firebase-distribution(orgplay fad) ininternal/cli/firebasedistribution/ - [ ] Subcommands:
upload,groups list/create/delete,testers list/add/remove,releases list/get/delete - [ ] Registered in
internal/cli/registry/registry.go - [ ]
UsageFunc: shared.DefaultUsageFuncset on all commands - [ ] Dedicated client wrapper for
firebaseappdistribution/v1API - [ ] Long-running operation polling for async upload processing
- [ ]
shared.ContextWithUploadTimeoutused for binary uploads - [ ] Required flags validated with stderr error messages
Tests
- [ ] CLI black-box tests in
internal/cmdtest/firebase_distribution_test.go - [ ] Unit tests for group/tester management logic
- [ ] Error paths: missing
--project, missing--app, invalid binary path, upload timeout
Docs & Help
- [ ]
--helpoutput follows existing conventions - [ ] Command docs regenerated:
gplay docs generate
Validation (before opening PR)
make format
make lint
make test
make build
/tmp/gplay firebase-distribution --help
/tmp/gplay firebase-distribution upload --help
/tmp/gplay firebase-distribution upload # missing required flags → stderr error
/tmp/gplay firebase-distribution groups list --help
Addendum to checklist above — docs CI gate:
The PR CI now runs make check-docs on every PR. This means:
- After implementing the command, run
make docsto regenerateGPLAY.md - Commit the updated
GPLAY.mdalongside your code changes - If you forget, the PR check will fail with: "GPLAY.md is out of date"
This ensures every user-facing command, flag, and help text is always reflected in the reference docs.
Consolidating individual feature requests into the roadmap so new visitors see a clean tracker. This item is on the roadmap: #245 — please 👍 there and comment which item you're waiting on. Reopen or file a fresh issue if you start on a PR.