$npx -y skills add hanamizuki/solopreneur --skill gplay-cli-usageGuidance for using the Google Play Console CLI in this repo (flags, output formats, pagination, auth, and discovery). Use when asked to run or design gplay commands or interact with Google Play Console via the CLI.
| 1 | # Google Play CLI usage |
| 2 | |
| 3 | Use this skill when you need to run or design `gplay` commands for Google Play Console. |
| 4 | |
| 5 | ## Command discovery |
| 6 | - Always use `--help` to discover commands and flags. |
| 7 | - `gplay --help` |
| 8 | - `gplay tracks --help` |
| 9 | - `gplay tracks list --help` |
| 10 | |
| 11 | ## Available commands |
| 12 | |
| 13 | | Command | Description | |
| 14 | |---------|-------------| |
| 15 | | `gplay auth` | Authentication and profile management | |
| 16 | | `gplay apps` | List and manage apps in the developer account | |
| 17 | | `gplay init` | Initialize a project with default config | |
| 18 | | `gplay release` | High-level release workflow | |
| 19 | | `gplay promote` | Promote releases between tracks | |
| 20 | | `gplay rollout` | Manage staged rollouts | |
| 21 | | `gplay tracks` | Track management | |
| 22 | | `gplay bundles` | Bundle (AAB) management | |
| 23 | | `gplay edits` | Edit session management | |
| 24 | | `gplay listings` | Store listing management | |
| 25 | | `gplay images` | Screenshot and image management | |
| 26 | | `gplay sync` | Metadata sync (import/export) | |
| 27 | | `gplay validate` | Offline validation of metadata | |
| 28 | | `gplay vitals` | App vitals monitoring (crashes, performance, errors) | |
| 29 | | `gplay users` | User management for developer account | |
| 30 | | `gplay grants` | App-level permission grants | |
| 31 | | `gplay reports` | Financial and statistics reports (list/download from GCS) | |
| 32 | | `gplay docs generate` | Generate CLI documentation | |
| 33 | | `gplay migrate` | Migration tools (e.g., from Fastlane) | |
| 34 | | `gplay notify` | Send notifications (e.g., Slack, webhook) | |
| 35 | | `gplay update` | Self-update the CLI binary | |
| 36 | |
| 37 | ## Flag conventions |
| 38 | - Use explicit long flags (e.g., `--package`, `--output`). |
| 39 | - No interactive prompts; destructive operations require `--confirm`. |
| 40 | - Use `--paginate` when the user wants all pages. |
| 41 | - Use `--dry-run` to preview changes without executing them (supported by `release`, `migrate`, and other write commands). |
| 42 | |
| 43 | ## Output formats |
| 44 | - Default output is minified JSON. |
| 45 | - Use `--output table` or `--output markdown` only for human-readable output. |
| 46 | - `--pretty` is only valid with JSON output. |
| 47 | - Set `GPLAY_DEFAULT_OUTPUT` environment variable to change the default output format (e.g., `GPLAY_DEFAULT_OUTPUT=table`). |
| 48 | |
| 49 | ## Authentication and defaults |
| 50 | - Prefer service account auth via `gplay auth login --service-account /path/to/sa.json`. |
| 51 | - Fallback env vars: `GPLAY_SERVICE_ACCOUNT`, `GPLAY_PACKAGE`. |
| 52 | - `GPLAY_PACKAGE` can provide a default package name. |
| 53 | |
| 54 | ## Timeouts |
| 55 | - `GPLAY_TIMEOUT` / `GPLAY_TIMEOUT_SECONDS` control request timeouts. |
| 56 | - `GPLAY_UPLOAD_TIMEOUT` / `GPLAY_UPLOAD_TIMEOUT_SECONDS` control upload timeouts. |
| 57 | |
| 58 | ## Environment Variables |
| 59 | |
| 60 | | Variable | Purpose | |
| 61 | |----------|---------| |
| 62 | | `GPLAY_SERVICE_ACCOUNT` | Path to service account JSON | |
| 63 | | `GPLAY_PACKAGE` | Default package name | |
| 64 | | `GPLAY_PROFILE` | Active profile name | |
| 65 | | `GPLAY_TIMEOUT` | Request timeout (e.g., `90s`, `2m`) | |
| 66 | | `GPLAY_TIMEOUT_SECONDS` | Timeout in seconds (alternative) | |
| 67 | | `GPLAY_UPLOAD_TIMEOUT` | Upload timeout (e.g., `5m`, `10m`) | |
| 68 | | `GPLAY_DEBUG` | Enable debug logging (set to `api` for HTTP requests) | |
| 69 | | `GPLAY_NO_UPDATE` | Disable update checks | |
| 70 | | `GPLAY_MAX_RETRIES` | Max retries for failed requests (default: 3) | |
| 71 | | `GPLAY_RETRY_DELAY` | Base delay between retries (default: `1s`) | |
| 72 | | `GPLAY_DEFAULT_OUTPUT` | Default output format (`json`, `table`, `markdown`) | |
| 73 | |
| 74 | ## Common patterns |
| 75 | |
| 76 | ### List with pagination |
| 77 | ```bash |
| 78 | gplay tracks list --package com.example.app --paginate |
| 79 | ``` |
| 80 | |
| 81 | ### Parse JSON output with jq |
| 82 | ```bash |
| 83 | gplay tracks list --package com.example.app | jq '.tracks[] | select(.track == "production")' |
| 84 | ``` |
| 85 | |
| 86 | ### Use profiles |
| 87 | ```bash |
| 88 | # Create/login a named profile |
| 89 | gplay auth login --profile production --service-account /path/to/prod-sa.json |
| 90 | # Switch the active profile |
| 91 | gplay auth switch --profile production |
| 92 | gplay --profile production tracks list --package com.example.app |
| 93 | ``` |
| 94 | |
| 95 | ### Debug mode |
| 96 | ```bash |
| 97 | GPLAY_DEBUG=1 gplay tracks list --package com.example.app |
| 98 | GPLAY_DEBUG=api gplay tracks list --package com.example.app # HTTP details |
| 99 | ``` |
| 100 | |
| 101 | ### Dry run (preview changes) |
| 102 | ```bash |
| 103 | gplay release --package com.example.app --track beta --bundle app.aab --dry-run |
| 104 | gplay migrate fastlane --source ./fastlane/metadata/android --output-dir ./metadata --dry-run |
| 105 | ``` |
| 106 | |
| 107 | ### Initialize a project |
| 108 | ```bash |
| 109 | gplay init --package com.example.app --service-account /path/to/sa.json |
| 110 | ``` |
| 111 | |
| 112 | ### List apps in developer account |
| 113 | ```bash |
| 114 | gplay apps list |
| 115 | gplay apps list --output table |
| 116 | gplay apps list --paginate |
| 117 | ``` |
| 118 | |
| 119 | ### Generate CLI documentation |
| 120 | ```bash |
| 121 | gplay docs generate --output-file ./GPLAY.md |
| 122 | gplay docs generate --output-file - # write to stdout |
| 123 | ``` |
| 124 | |
| 125 | ### Self-update |
| 126 | ```bash |
| 127 | gplay update |
| 128 | gplay update --check # Check for updates without installing |
| 129 | ``` |
| 130 | |
| 131 | ### Financial reports |
| 132 | ```bash |
| 133 | # --bucket-id is the GCS bucket ID/URI from Play Console > Download |