gpc-train
GPC Release Train
When to use
Use this skill when the task involves:
- Setting up a config-driven staged rollout pipeline
- Automatically progressing a release through tracks (internal → alpha → production) with time gates
- Gating progression on crash rate and ANR rate thresholds
- Pausing, resuming, or aborting an in-flight release train
- Checking the current stage and gate health of a running train
Inputs required
- Package name (or configured default in
.gpcrc.json) - Release train config: stages with tracks, rollout percentages, and time delays
- Gate thresholds: max crash rate and max ANR rate
- Whether to pause, resume, or abort the train
Procedure
1) Configure the release train
Add a release-train block to .gpcrc.json in the project root:
{
"release-train": {
"stages": [
{ "track": "internal", "rollout": 100 },
{ "track": "alpha", "rollout": 100, "after": "2d" },
{ "track": "production", "rollout": 10, "after": "7d" },
{ "track": "production", "rollout": 100, "after": "14d" }
],
"gates": { "crashes": { "max": 1.5 }, "anr": { "max": 0.5 } }
}
}
Config keys:
| Key | Type | Description |
|---|---|---|
stages[].track |
string | Target track: internal, alpha, beta, production |
stages[].rollout |
number | Rollout percentage for this stage (1–100) |
stages[].after |
string | Minimum time to wait before this stage (e.g., 2d, 12h, 30m). Omit for immediate. |
gates.crashes.max |
number | Maximum crash rate percentage before pausing progression |
gates.anr.max |
number | Maximum ANR rate percentage before pausing progression |
Read:
references/rollout-pipeline.md
2) Start the train
gpc train start
This reads .gpcrc.json, creates a state file at ~/.cache/gpc/train-<packageName>.json, and begins executing the first stage immediately. Subsequent stages are executed when the after time has elapsed and gates pass.
# Resume a paused train
gpc train start --resume
3) Check train status
gpc train status
Output:
Release Train · com.example.app
Stage 2 / 4 alpha @ 100% in progress
Last progressed: 2026-03-17 11:00 (2 days ago)
Next stage: production @ 10% eligible in 5 days
Gates (last check: 10 minutes ago)
crashes 0.82% ✓ (max 1.5%)
anr 0.19% ✓ (max 0.5%)
# Resume if paused due to a gate failure
gpc train status --resume
4) Monitor gate health
Before each stage transition, gpc train automatically checks the configured gates:
- If all gates pass, the stage progresses (subject to the
aftertime having elapsed). - If any gate fails, progression is paused and a warning is shown.
- The user must fix the regression and re-run
gpc train start --resumeorgpc train status --resume.
Gate checks call the same vitals API as gpc vitals crashes and gpc vitals anr. Data lag of 6–48 hours applies to new releases — avoid configuring gates on the very first stage.
5) Pause a running train
gpc train pause
Pauses automatic progression. Does not halt or change the active rollout on any track. Run gpc train start --resume to continue.
6) Abort the train
gpc train abort
Aborts the train and halts all active rollouts on tracks managed by this train. State file is cleared. Use when a critical regression is found and the release must be stopped immediately.
Verification
gpc train statusshows the correct current stage and gate health valuesgpc statusconfirms rollout percentages on each track match the active stage in the train config- Gate values (crashes, ANR) are below configured
maxthresholds - State file at
~/.cache/gpc/train-<packageName>.jsonreflects the current stage index and last progression timestamp
Failure modes / debugging
| Symptom | Likely Cause | Fix |
|---|---|---|
| Gate check fails | Crash/ANR rate above configured max |
Fix the regression in a new release, then gpc train start --resume |
Train already running |
Previous train was not completed or aborted | gpc train status to check state; gpc train abort if needed |
| Stage progression skipped | after time has not elapsed |
gpc train status shows time remaining until next eligible stage |
| Train aborted unexpectedly | Gate threshold breached automatically | Check gpc vitals crashes and gpc vitals anr, fix regression, then restart |
| State file missing | Cache directory cleared or different machine | Re-run gpc train start — it will re-read .gpcrc.json and restart from stage 1 |
Read:
references/rollout-pipeline.md— full lifecycle: config → start → gate check → progress → complete
Related skills
- gpc-release-flow: Upload, promote, and manual rollout management
- gpc-vitals-monitoring: Crash and ANR monitoring used by gate checks
- gpc-ci-integration: Running
gpc trainin CI/CD pipelines
More from yasserstudio/gpc-skills
gpc-sdk-usage
Use when building applications that programmatically interact with the Google Play Developer API using GPC's TypeScript SDK packages. Make sure to use this skill whenever the user mentions @gpc-cli/api, @gpc-cli/auth, PlayApiClient, createApiClient, resolveAuth, Google Play API client, TypeScript SDK, programmatic access, API client, HTTP client, rate limiter, pagination, edit lifecycle in code, Node.js Google Play, server-side Play Store, backend integration — even if they don't explicitly say 'SDK.' Also trigger when someone wants to build a backend service, custom dashboard, automation script, or any TypeScript/JavaScript application that interacts with Google Play programmatically rather than through the CLI. For CLI usage, see other gpc-* skills. For building plugins, see gpc-plugin-development.
12gpc-release-flow
Use when uploading, releasing, promoting, or managing rollouts on Google Play. Make sure to use this skill whenever the user mentions gpc releases, upload AAB, upload APK, staged rollout, promote to production, halt rollout, gpc publish, release notes, track management, internal testing, beta release, production rollout, version code, rollout percentage, gpc bundles, bundle list, bundle wait, wait for bundle processing, in-app update priority, retain version codes, versioned changelogs, or wants to ship an Android app to any Play Store track. Also trigger when someone asks about the Google Play edit lifecycle, release validation, or how to do a phased rollout — even if they don't mention GPC by name. For metadata and listings, see gpc-metadata-sync. For CI/CD integration, see gpc-ci-integration.
12gpc-security
Use when dealing with GPC credential security, secret management, audit logging, or access control. Make sure to use this skill whenever the user mentions credentials, service account key, secret rotation, key rotation, credential storage, audit log, audit trail, security best practices, .gpcrc.json security, secrets in CI, GPC_SERVICE_ACCOUNT safety, keychain, token cache, credential leak, key compromise, secure deployment — even if they don't explicitly say 'security.' Also trigger when someone asks about where GPC stores credentials, how to rotate service account keys, how to audit who did what with GPC, how to securely pass credentials in CI/CD, or how to handle a compromised service account key. For auth setup, see gpc-setup. For CI configuration, see gpc-ci-integration.
12gpc-multi-app
Use when managing multiple Google Play apps with GPC. Make sure to use this skill whenever the user mentions multiple apps, multi-app, monorepo, white-label, batch operations, bulk upload, several apps, --app flag, app switching, profiles for different apps, fleet management, app portfolio, multiple package names — even if they don't explicitly say 'multi-app.' Also trigger when someone has more than one Android app and wants to manage them efficiently, when they need different configurations per app, when they're running the same command across multiple apps, or when they have a monorepo with multiple Android modules. For single-app setup, see gpc-setup. For CI automation, see gpc-ci-integration.
11gpc-setup
Use when setting up GPC (Google Play Console CLI): authentication with service accounts, OAuth, or Application Default Credentials; configuration files (.gpcrc.json, env vars, XDG paths); auth profiles; running gpc doctor; troubleshooting auth errors. Make sure to use this skill whenever the user mentions gpc auth, service account setup, gpc config, gpc doctor, GPC_SERVICE_ACCOUNT, gpc auth login, Google Play API credentials, Play Console authentication, gpc setup, gpc setup wizard, one-command onboarding, or wants to install/configure GPC — even if they don't explicitly say 'setup.' Also trigger when someone is troubleshooting auth failures, token expiration, keychain issues, or proxy/network configuration for GPC.
11gpc-monetization
Use when managing in-app purchases, subscriptions, pricing, or Real-Time Developer Notifications in Google Play. Make sure to use this skill whenever the user mentions gpc subscriptions, gpc iap, gpc purchases, gpc pricing, gpc rtdn, in-app products, base plans, subscription offers, one-time products, consumable products, purchase verification, purchase acknowledgement, purchase token, subscription cancellation, subscription deferral, voided purchases, refunds, regional pricing, currency conversion, price migration, SKU management, monetization, revenue, billing, subscription analytics, churn, trial conversion, subscriber count, RTDN, Real-Time Developer Notifications, Pub/Sub notifications, subscription events, purchase events — even if they don't explicitly say 'monetization.' Also trigger when someone wants to create or update subscriptions, manage base plan lifecycle (activate/deactivate), set up introductory offers, verify server-side purchases, handle refunds, convert prices across regions, sync IAP products from files, migrate subscribers to new prices, view subscription analytics, decode Pub/Sub notification payloads, or check RTDN topic configuration. For release management, see gpc-release-flow. For CI automation, see gpc-ci-integration.
11