Skip to content

gplay games

Manage Play Games Services achievements, leaderboards, and player progress.

gplay games <subcommand> [flags]

Manage Play Games Services achievements, leaderboards, and player progress.

Games commands use the https://www.googleapis.com/auth/androidpublisher OAuth scope (the same service account credentials as the rest of gplay) across two API surfaces:

Identifiers differ from the rest of gplay: list/create operations take the numeric Play Games application ID (–application-id, or GPLAY_GAMES_APP_ID / games_application_id in config), NOT the Android package name. Individual resources are addressed by their string achievement/leaderboard/event IDs.

The service account must be linked in the Play Games Services setup for the game; a normal Play Console grant is not sufficient.

Manage achievement definitions and reset achievement progress.

gplay games achievements <subcommand> [flags]

List achievement configurations for an application.

gplay games achievements list --application-id <id> [flags]
Flag Description Default
--application-id Play Games application ID (overrides GPLAY_GAMES_APP_ID/games_application_id) ``
--max-results Maximum achievements per page (server default when 0) 0
--output Output format: json (default), table, markdown json
--paginate Fetch all pages false
--pretty Pretty-print JSON output false

Get a single achievement configuration.

gplay games achievements get --achievement-id <id> [flags]
Flag Description Default
--achievement-id Achievement ID ``
--output Output format: json (default), table, markdown json
--pretty Pretty-print JSON output false

Create (insert) an achievement configuration.

gplay games achievements create --application-id <id> --data <json> [flags]
Flag Description Default
--application-id Play Games application ID (overrides GPLAY_GAMES_APP_ID/games_application_id) ``
--data Achievement configuration JSON (inline or @file) ``
--output Output format: json (default), table, markdown json
--pretty Pretty-print JSON output false

Update an achievement configuration (full replace).

gplay games achievements update --achievement-id <id> --data <json> [flags]
Flag Description Default
--achievement-id Achievement ID ``
--data Achievement configuration JSON (inline or @file) ``
--output Output format: json (default), table, markdown json
--pretty Pretty-print JSON output false

Delete an achievement configuration.

gplay games achievements delete --achievement-id <id> --confirm
Flag Description Default
--achievement-id Achievement ID ``
--confirm Confirm deletion false

Reset the calling tester’s progress for an achievement.

gplay games achievements reset --achievement-id <id> [flags]
Flag Description Default
--achievement-id Achievement ID ``
--output Output format: json (default), table, markdown json
--pretty Pretty-print JSON output false

Reset the calling tester’s progress for all achievements.

gplay games achievements reset-all --confirm [flags]
Flag Description Default
--confirm Confirm resetting all achievements for the calling tester false
--output Output format: json (default), table, markdown json
--pretty Pretty-print JSON output false

gplay games achievements reset-for-all-players

Section titled “gplay games achievements reset-for-all-players”

Reset an achievement for all testers of the application.

gplay games achievements reset-for-all-players --achievement-id <id> --confirm
Flag Description Default
--achievement-id Achievement ID ``
--confirm Confirm resetting this achievement for ALL testers false

Manage leaderboard definitions.

gplay games leaderboards <subcommand> [flags]

List leaderboard configurations for an application.

gplay games leaderboards list --application-id <id> [flags]
Flag Description Default
--application-id Play Games application ID (overrides GPLAY_GAMES_APP_ID/games_application_id) ``
--max-results Maximum leaderboards per page (server default when 0) 0
--output Output format: json (default), table, markdown json
--paginate Fetch all pages false
--pretty Pretty-print JSON output false

Get a single leaderboard configuration.

gplay games leaderboards get --leaderboard-id <id> [flags]
Flag Description Default
--leaderboard-id Leaderboard ID ``
--output Output format: json (default), table, markdown json
--pretty Pretty-print JSON output false

Create (insert) a leaderboard configuration.

gplay games leaderboards create --application-id <id> --data <json> [flags]
Flag Description Default
--application-id Play Games application ID (overrides GPLAY_GAMES_APP_ID/games_application_id) ``
--data Leaderboard configuration JSON (inline or @file) ``
--output Output format: json (default), table, markdown json
--pretty Pretty-print JSON output false

Update a leaderboard configuration (full replace).

gplay games leaderboards update --leaderboard-id <id> --data <json> [flags]
Flag Description Default
--data Leaderboard configuration JSON (inline or @file) ``
--leaderboard-id Leaderboard ID ``
--output Output format: json (default), table, markdown json
--pretty Pretty-print JSON output false

Delete a leaderboard configuration.

gplay games leaderboards delete --leaderboard-id <id> --confirm
Flag Description Default
--confirm Confirm deletion false
--leaderboard-id Leaderboard ID ``

Reset leaderboard scores for testers.

gplay games scores <subcommand> [flags]

Reset the calling tester’s scores for a leaderboard.

gplay games scores reset --leaderboard-id <id> [flags]
Flag Description Default
--leaderboard-id Leaderboard ID ``
--output Output format: json (default), table, markdown json
--pretty Pretty-print JSON output false

Reset the calling tester’s scores for all leaderboards.

gplay games scores reset-all --confirm [flags]
Flag Description Default
--confirm Confirm resetting all leaderboard scores for the calling tester false
--output Output format: json (default), table, markdown json
--pretty Pretty-print JSON output false

Reset a leaderboard’s scores for all testers of the application.

gplay games scores reset-for-all-players --leaderboard-id <id> --confirm
Flag Description Default
--confirm Confirm resetting this leaderboard for ALL testers false
--leaderboard-id Leaderboard ID ``

Reset event progress for testers.

gplay games events <subcommand> [flags]

Reset the calling tester’s progress for an event.

gplay games events reset --event-id <id>
Flag Description Default
--event-id Event ID ``

Reset the calling tester’s progress for all events.

gplay games events reset-all --confirm
Flag Description Default
--confirm Confirm resetting all events for the calling tester false

Reset an event for all testers of the application.

gplay games events reset-for-all-players --event-id <id> --confirm
Flag Description Default
--confirm Confirm resetting this event for ALL testers false
--event-id Event ID ``

Hide, unhide, and list hidden players (testers).

gplay games players <subcommand> [flags]

Hide a player’s scores from an application’s leaderboards.

gplay games players hide --application-id <id> --player-id <id>
Flag Description Default
--application-id Play Games application ID (overrides GPLAY_GAMES_APP_ID/games_application_id) ``
--player-id Player ID to hide from leaderboards ``

Unhide a previously hidden player’s scores.

gplay games players unhide --application-id <id> --player-id <id>
Flag Description Default
--application-id Play Games application ID (overrides GPLAY_GAMES_APP_ID/games_application_id) ``
--player-id Player ID to unhide ``

List players hidden from an application’s leaderboards.

gplay games players list-hidden --application-id <id> [flags]
Flag Description Default
--application-id Play Games application ID (overrides GPLAY_GAMES_APP_ID/games_application_id) ``
--max-results Maximum hidden players per page (server default when 0) 0
--output Output format: json (default), table, markdown json
--paginate Fetch all pages false
--pretty Pretty-print JSON output false