Google Play CLI usage
Use this skill when you need to run or design gplay commands for Google Play Console.
Command discovery
- •Always use
--helpto discover commands and flags.- •
gplay --help - •
gplay tracks --help - •
gplay tracks list --help
- •
Flag conventions
- •Use explicit long flags (e.g.,
--package,--output). - •No interactive prompts; destructive operations require
--confirm. - •Use
--paginatewhen the user wants all pages.
Output formats
- •Default output is minified JSON.
- •Use
--output tableor--output markdownonly for human-readable output. - •
--prettyis only valid with JSON output.
Authentication and defaults
- •Prefer service account auth via
gplay auth login --service-account /path/to/sa.json. - •Fallback env vars:
GPLAY_SERVICE_ACCOUNT,GPLAY_PACKAGE. - •
GPLAY_PACKAGEcan provide a default package name.
Timeouts
- •
GPLAY_TIMEOUT/GPLAY_TIMEOUT_SECONDScontrol request timeouts. - •
GPLAY_UPLOAD_TIMEOUT/GPLAY_UPLOAD_TIMEOUT_SECONDScontrol upload timeouts.
Common patterns
List with pagination
bash
gplay tracks list --package com.example.app --paginate
Parse JSON output with jq
bash
gplay tracks list --package com.example.app | jq '.tracks[] | select(.track == "production")'
Use profiles
bash
gplay auth add-profile production --service-account /path/to/prod-sa.json gplay auth use-profile production gplay --profile production tracks list --package com.example.app
Debug mode
bash
GPLAY_DEBUG=1 gplay tracks list --package com.example.app GPLAY_DEBUG=api gplay tracks list --package com.example.app # HTTP details
Edit sessions
Most write operations require an edit session:
bash
# Create edit gplay edits create --package com.example.app # Returns: edit_id # Make changes gplay bundles upload --package com.example.app --edit <edit_id> --file app.aab # Commit changes (publishes) gplay edits commit --package com.example.app --edit <edit_id>
High-level vs manual commands
- •High-level:
gplay release(creates edit, uploads, commits) - •Manual:
gplay edits create→gplay bundles upload→gplay edits commit
Use high-level for simplicity, manual for fine-grained control.