gpc-multi-app
Skill1 starsChanged 17 days agoMITView on GitHub
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.
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- gpc-android-cli-interopSkill
- gpc-ci-integrationSkill
- gpc-enterpriseSkill
- gpc-gamesSkill
- gpc-metadata-syncSkill
- gpc-migrate-fastlaneSkill
- gpc-monetizationSkill
- gpc-onboardingSkill
- gpc-plugin-developmentSkill
- gpc-preflightSkill
- gpc-release-flowSkill
- gpc-sdk-usageSkill
- gpc-securitySkill
- gpc-setupSkill
- gpc-trainSkill
- gpc-troubleshootingSkill
- gpc-user-managementSkill
- gpc-vitals-monitoringSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
Use gpc status --all-apps to check health across all configured apps at once:
- Very specific: line 53
Create a profile per app (GPC v0.9.95+.
- Distinctive: line 83
Use profiles per command:
- Distinctive: line 123
Run the same command across all apps:
- Distinctive: line 197
When apps belong to different developer accounts:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
gpc-multi-app
Managing multiple Google Play apps with GPC using profiles, scripting, and automation patterns.
When to use
- Managing multiple Android apps (portfolio, white-label, variants)
- Running the same GPC command across several apps
- Setting up per-app configurations and credentials
- Monorepo with multiple Android modules
- Different service accounts for different apps
Inputs required
- Authenticated GPC —
gpc auth statusmust show valid credentials - Package names — for all apps being managed
- Service account keys — may differ per app or developer account
Procedure
0. Understand app resolution
GPC resolves the target app in this order:
--appCLI flag (highest priority)GPC_APPenvironment variable.gpcrc.jsonin project directory- User config at
~/.config/gpc/config.json - Active profile override
1. Quick health check across all apps
Use gpc status --all-apps to check health across all configured apps at once:
gpc status --all-appsThis reports the status of every app defined in your profiles or config, without needing to switch profiles or pass --app for each one.
From GPC v1.1.0, if any app fails (auth, API or network error), --all-apps exits with that app's error code, and that code wins over a threshold breach (exit 6) on another app. Before v1.1.0 it exited 0 when an app failed, so a fleet gate could pass with an app unchecked.
2. Per-app configuration with profiles
Create a profile per app (GPC v0.9.95+; older versions silently ignored --profile here — use the interactive wizard instead):
gpc auth login --service-account /keys/main-sa.json --profile main
gpc auth login --service-account /keys/main-sa.json --profile lite
gpc auth login --service-account /keys/enterprise-sa.json --profile enterpriseThen add each profile's app (and any per-app settings) in ~/.config/gpc/config.json — re-running auth login --profile later only updates credentials and keeps these fields:
{
"app": "com.example.main",
"profiles": {
"main": {
"app": "com.example.main",
"auth": { "serviceAccount": "/keys/main-sa.json" }
},
"lite": {
"app": "com.example.lite",
"auth": { "serviceAccount": "/keys/main-sa.json" }
},
"enterprise": {
"app": "com.example.enterprise",
"auth": { "serviceAccount": "/keys/enterprise-sa.json" }
}
}
}Use profiles per command:
gpc releases status --profile main
gpc releases status --profile lite
gpc releases status --profile enterpriseOr set via environment:
export GPC_PROFILE=enterprise
gpc releases status # uses enterprise profileRead: references/profile-patterns.md for advanced profile configurations.
3. Project-level .gpcrc.json
For monorepos, place .gpcrc.json in each app's directory:
monorepo/
├── apps/
│ ├── main/
│ │ ├── .gpcrc.json # { "app": "com.example.main" }
│ │ └── build.gradle
│ ├── lite/
│ │ ├── .gpcrc.json # { "app": "com.example.lite" }
│ │ └── build.gradle
│ └── enterprise/
│ ├── .gpcrc.json # { "app": "com.example.enterprise" }
│ └── build.gradle
└── .gpcrc.json # shared defaultsGPC walks up from the current directory to find .gpcrc.json, so running commands from each app's directory automatically uses the right package name.
4. Batch operations with shell scripts
Run the same command across all apps:
#!/bin/bash
# deploy-all.sh — upload to internal track for all apps
APPS=(
"com.example.main"
"com.example.lite"
"com.example.enterprise"
)
for app in "${APPS[@]}"; do
echo "Uploading $app..."
gpc releases upload "build/$app/app-release.aab" --track internal --app "$app"
done5. Batch vitals check
#!/bin/bash
# check-vitals.sh — check crash rate across all apps
APPS=("com.example.main" "com.example.lite" "com.example.enterprise")
THRESHOLD=2.0
FAILED=0
for app in "${APPS[@]}"; do
echo "Checking $app..."
if ! gpc vitals crashes --threshold "$THRESHOLD" --app "$app"; then
echo "FAIL: $app crash rate exceeds ${THRESHOLD}%"
FAILED=1
fi
done
exit $FAILED6. CI/CD for multiple apps
Read: references/ci-multi-app.md for CI platform-specific multi-app workflows.
GitHub Actions matrix strategy
name: Deploy All Apps
on:
push:
tags: ['v*']
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
app:
- { package: "com.example.main", aab: "main/app-release.aab" }
- { package: "com.example.lite", aab: "lite/app-release.aab" }
- { package: "com.example.enterprise", aab: "enterprise/app-release.aab" }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Upload to internal
env:
GPC_SERVICE_ACCOUNT: ${{ secrets.PLAY_SA_KEY }}
GPC_APP: ${{ matrix.app.package }}
run: npx @gpc-cli/cli releases upload ${{ matrix.app.aab }} --track internal7. Different service accounts per app
When apps belong to different developer accounts:
# Use different env vars per command
GPC_SERVICE_ACCOUNT=$(cat keys/main.json) gpc releases status --app com.example.main
GPC_SERVICE_ACCOUNT=$(cat keys/client.json) gpc releases status --app com.client.appOr use profiles (recommended):
{
"profiles": {
"main": {
"app": "com.example.main",
"auth": { "serviceAccount": "/keys/main-sa.json" }
},
"client": {
"app": "com.client.app",
"auth": { "serviceAccount": "/keys/client-sa.json" }
}
}
}8. Bulk metadata sync
Sync listings for all apps from a shared metadata structure:
# metadata/
# ├── com.example.main/
# │ └── en-US/
# ├── com.example.lite/
# │ └── en-US/
for dir in metadata/*/; do
app=$(basename "$dir")
echo "Syncing $app..."
gpc listings push --dir "$dir" --app "$app" --dry-run
doneVerification
gpc config show --profile <name>shows correct app and auth per profile- Commands with
--appor--profiletarget the right app - Batch scripts exit 0 when all apps succeed
- CI matrix runs deploy independently per app
.gpcrc.jsonin subdirectories correctly overrides the default app
Failure modes / debugging
| Symptom | Likely Cause | Fix |
| Wrong app targeted | --app not set, picking up default | Always pass --app or use profiles explicitly |
API_FORBIDDEN on one app | Service account lacks access for that app | Check permissions per app in Play Console |
| Batch script fails silently | Missing error handling in loop | Use set -e or check $? after each command |
| Profile not found | Typo in profile name | Check gpc config show for available profiles |
| CI matrix job fails one app | Independent failure | Matrix jobs run independently — check logs per app |
.gpcrc.json not picked up | Running from wrong directory | GPC walks up from cwd; ensure you're in the right dir |
Related skills
- gpc-setup — initial auth and profiles configuration
- gpc-ci-integration — CI pipeline setup for single apps
- gpc-sdk-usage — programmatic multi-app management with the TypeScript SDK
- gpc-user-management — managing per-app permissions for team members
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

