gpc games
Manage Play Games Services configurations -- achievements and leaderboards. Uses the Games Configuration API (gamesconfiguration v1configuration) for publisher CRUD operations.
No Extra Auth
The Configuration API uses the androidpublisher OAuth scope that GPC already requests. No additional scope or API enablement is needed.
Synopsis
gpc games [--game-id <id>] <subcommand>Global Option
--game-id <id>
Games application ID (numeric). Found in Play Console under Play Games Services > Setup.
Resolution order:
--game-idflagGPC_GAME_IDenvironment variablegames.applicationIdin.gpcrc.json
// .gpcrc.json
{
"app": "com.example.mygame",
"games": {
"applicationId": "12345678901234"
}
}2
3
4
5
6
7
Achievements
games achievements list
List all achievement configurations.
gpc games achievements list
gpc games achievements list --limit 10 --next-page <token>
gpc games achievements list --json2
3
| Flag | Description |
|---|---|
--limit <n> | Maximum results per page |
--next-page <token> | Resume from page token |
games achievements get <achievement-id>
Get a single achievement configuration.
gpc games achievements get CgkI1234567890games achievements create --file <path>
Create an achievement from a JSON file.
gpc games achievements create --file achievement.json
gpc games achievements create --file achievement.json --dry-run2
Example achievement.json:
{
"achievementType": "STANDARD",
"initialState": "HIDDEN",
"draft": {
"name": {
"translations": [{ "locale": "en-US", "value": "First Victory" }]
},
"description": {
"translations": [{ "locale": "en-US", "value": "Win your first match" }]
},
"pointValue": 10
}
}2
3
4
5
6
7
8
9
10
11
12
13
For incremental achievements, set "achievementType": "INCREMENTAL" and add "stepsToUnlock": 100.
games achievements update <achievement-id> --file <path>
Update an existing achievement.
gpc games achievements update CgkI1234567890 --file achievement.jsongames achievements delete <achievement-id>
Delete an achievement. Prompts for confirmation.
gpc games achievements delete CgkI1234567890
gpc games achievements delete CgkI1234567890 --yes # skip confirmation2
games achievements diff <achievement-id> --file <path>
Compare a local JSON file against the remote achievement configuration.
gpc games achievements diff CgkI1234567890 --file achievement.jsonShows field-by-field differences between local and remote state.
Leaderboards
games leaderboards list
List all leaderboard configurations.
gpc games leaderboards list
gpc games leaderboards list --limit 10 --json2
| Flag | Description |
|---|---|
--limit <n> | Maximum results per page |
--next-page <token> | Resume from page token |
games leaderboards get <leaderboard-id>
Get a single leaderboard configuration.
gpc games leaderboards get CgkI9876543210games leaderboards create --file <path>
Create a leaderboard from a JSON file.
gpc games leaderboards create --file leaderboard.jsonExample leaderboard.json:
{
"scoreOrder": "LARGER_IS_BETTER",
"draft": {
"name": {
"translations": [{ "locale": "en-US", "value": "High Scores" }]
},
"scoreFormat": {
"numberFormatType": "NUMERIC"
}
}
}2
3
4
5
6
7
8
9
10
11
Score format types: NUMERIC, TIME_DURATION, CURRENCY.
games leaderboards update <leaderboard-id> --file <path>
Update an existing leaderboard.
gpc games leaderboards update CgkI9876543210 --file leaderboard.jsongames leaderboards delete <leaderboard-id>
Delete a leaderboard. Prompts for confirmation.
gpc games leaderboards delete CgkI9876543210games leaderboards diff <leaderboard-id> --file <path>
Compare a local JSON file against the remote leaderboard configuration.
gpc games leaderboards diff CgkI9876543210 --file leaderboard.jsonRuntime (Read-Only)
Inspect player-facing runtime data from the Games v1 API. These commands are read-only.
games runtime leaderboards
List runtime leaderboard data.
gpc games runtime leaderboards --app com.example.mygamegames runtime achievements
List runtime achievement data.
gpc games runtime achievements --app com.example.mygameOutput
All subcommands support the standard --output formats: table, json, yaml, markdown, csv, tsv.
Breaking Changes (v0.9.86)
gpc games eventsremoved. Events are configured through the Play Console UI. The previous command was read-only against the player-facing runtime API.- Existing runtime list commands moved under
gpc games runtime.
See Also
- Games Publishing Guide -- step-by-step setup and CI/CD patterns
- API Coverage -- endpoint status
- Google Play Games Services documentation
