GPC CLI Usage
Use this skill when you need the right gpc command shape, global flags, or setup flow.
Resolve package and profile first
gpc can get the package name from several places. Prefer the most local source already present in the project:
gpc init --package com.example.app
gpc auth login --credentials ~/.config/gpc/service-account.json --name work --default-package com.example.app
gpc auth current
Package resolution order is effectively:
--packageGPC_PACKAGE- current profile default package
- nearest
.gpc.yaml
If none are set, add --package explicitly.
Command discovery
Confirm the real command tree before composing anything non-trivial:
gpc --help
gpc bundles --help
gpc tracks update --help
gpc testing testers add --help
Global flags
Common global flags:
--package,-p--profile--output,-owithjson,table,minimal,tsv,csv,yaml--pretty--quiet,-q--debug--timeout--dry-run--edit-modewithlive,stage,open
Default output is JSON. Use -o table for human review and JSON for piping.
gpc apps list -o table
gpc reviews list -o json | jq .
gpc tracks list --pretty
Edit-backed mutations
Many mutating commands support edit submission control. Prefer --edit-mode over legacy compatibility flags:
gpc bundles upload --file app.aab --track production --edit-mode=stage
gpc listings sync --dir ./metadata --edit-mode=open
gpc edits commit --edit-id EDIT_ID --edit-mode=stage
Compatibility aliases still exist during rollout:
--stage--commit=false
Prefer not to introduce those in new examples unless you are maintaining old scripts.
Auth and setup
Recommended setup paths:
gpc setup --auto
gpc auth list
gpc auth switch --name work
gpc doctor
gpc doctor --verbose
Useful environment variables:
GPC_PACKAGEGPC_PROFILEGPC_OUTPUTGPC_EDIT_MODEGPC_TIMEOUTGPC_CREDENTIALS_PATHGPC_CREDENTIALS_B64
Agent behavior
- Prefer examples that work with a configured package instead of always repeating
--package. - Add
--packageexplicitly when there is no evidence that a default package is configured. - Use
--dry-runbefore destructive operations when supported. - Use
--confirmexplicitly for destructive commands; never simulate confirmation with shell tricks.