gplay auth
gplay auth
Section titled “gplay auth”Manage Google Play authentication.
gplay auth <subcommand> [flags]gplay auth init
Section titled “gplay auth init”Create a template config.json for authentication.
gplay auth init [flags]| Flag | Description | Default |
|---|---|---|
--force |
Overwrite existing config.json | false |
--local |
Write config.json to ./.gplay in the current repo | false |
gplay auth setup
Section titled “gplay auth setup”Set up Google Play authentication end-to-end.
gplay auth setup --auto [--project <id>] [flags]One-command setup for Google Play authentication.
With –auto, gplay drives the whole flow via gcloud:
- Install the gcloud CLI if it is missing (Homebrew on macOS, curl on Linux)
- Log you into Google Cloud (gcloud auth login) if needed
- Enable the androidpublisher API
- Create a service account (–sa-name) and download a JSON key
- Store the profile in ~/.gplay/config.json
- Open Play Console for the one manual step: granting the account access
Example: gplay setup –auto # full automated setup gplay setup –auto –project my-gcp-project gplay setup –auto –dry-run # preview commands gplay setup –auto –no-browser # CI/agent friendly (no browser) gplay setup # print manual instructions
| Flag | Description | Default |
|---|---|---|
--auto |
Automate GCP service-account creation using gcloud | false |
--dry-run |
Print the gcloud commands without executing them | false |
--key-out |
Path to write the service-account JSON (defaults to ~/.gplay/<sa>.json) | `` |
--no-browser |
Do not open a browser (for login or the Play Console grant step) | false |
--no-install |
Do not auto-install gcloud when it is missing | false |
--output |
Output format: text (default), json | text |
--pretty |
Pretty-print JSON output | false |
--profile |
gplay auth profile to create | default |
--project |
GCP project ID (defaults to gcloud default) | `` |
--sa-name |
Service account name | play-console-cli |
--set-default |
Set as default profile in config | true |
gplay auth login
Section titled “gplay auth login”Authenticate with Google Play Console using a service account.
gplay auth login --service-account <path> [flags]Authenticate with Google Play Console using a service account.
Service accounts are required for the Google Play Android Developer API. See README.md for setup instructions.
Examples: gplay auth login –service-account /path/to/key.json gplay auth login –service-account key.json –profile work gplay auth login –service-account key.json –local
| Flag | Description | Default |
|---|---|---|
--local |
Write to local repo config | false |
--profile |
Profile name | default |
--service-account |
Path to service account JSON (required) | `` |
--set-default |
Set as default profile | true |
gplay auth switch
Section titled “gplay auth switch”Switch the default auth profile.
gplay auth switch --profile <name>| Flag | Description | Default |
|---|---|---|
--profile |
Profile name | `` |
gplay auth logout
Section titled “gplay auth logout”Remove a stored auth profile.
gplay auth logout --profile <name> --confirm| Flag | Description | Default |
|---|---|---|
--confirm |
Confirm removal | false |
--profile |
Profile name | `` |
gplay auth status
Section titled “gplay auth status”Show authentication status.
gplay auth status [flags]| Flag | Description | Default |
|---|---|---|
--output |
Output format: json (default), table, markdown | json |
--pretty |
Pretty-print JSON output | false |
gplay auth doctor
Section titled “gplay auth doctor”Diagnose authentication configuration issues.
gplay auth doctor [flags]| Flag | Description | Default |
|---|---|---|
--confirm |
Required with –fix to apply changes (without it, –fix does a dry run) | false |
--fix |
Attempt to auto-fix detected issues | false |
--output |
Output format: text (default), json | text |
--pretty |
Pretty-print JSON output | false |