diff --git a/README.md b/README.md index 6ad4ee6..f6cadfa 100644 --- a/README.md +++ b/README.md @@ -294,6 +294,69 @@ Using GPC to ship your app? Get featured here! --- +## 🤖 Agent Skills + +Supercharge your coding agent with Play Console CLI skills. Works with [Claude Code](https://claude.ai/claude-code), [Cursor](https://cursor.sh), [Codex](https://openai.com/codex), and [37+ more agents](https://skills.sh). + +### Install All Skills + +```bash +npx skills add AndroidPoet/playconsole-cli +``` + +### Install Specific Skills + +```bash +# Release management (upload, tracks, promote, rollouts) +npx skills add AndroidPoet/playconsole-cli --skill gpc-release + +# Store presence (listings, images, availability) +npx skills add AndroidPoet/playconsole-cli --skill gpc-store + +# Reviews (list, filter, reply) +npx skills add AndroidPoet/playconsole-cli --skill gpc-reviews + +# Monetization (products, subscriptions, offers, orders) +npx skills add AndroidPoet/playconsole-cli --skill gpc-monetization + +# Vitals & analytics (crashes, ANR, performance, devices) +npx skills add AndroidPoet/playconsole-cli --skill gpc-vitals + +# Testing (internal sharing, testers, test tracks) +npx skills add AndroidPoet/playconsole-cli --skill gpc-testing + +# Setup & auth (authentication, config, doctor, team) +npx skills add AndroidPoet/playconsole-cli --skill gpc-setup +``` + +### Install to a Specific Agent + +```bash +npx skills add AndroidPoet/playconsole-cli -a claude-code +npx skills add AndroidPoet/playconsole-cli -a cursor +npx skills add AndroidPoet/playconsole-cli -a codex +``` + +### Install Globally + +```bash +npx skills add AndroidPoet/playconsole-cli -g +``` + +### Available Skills + +| Skill | Description | +|-------|-------------| +| `gpc-release` | Upload bundles, manage tracks, promote releases, staged rollouts | +| `gpc-store` | Store listings, screenshots, images, country availability | +| `gpc-reviews` | List, filter, and reply to user reviews | +| `gpc-monetization` | In-app products, subscriptions, offers, orders, refunds | +| `gpc-vitals` | Crash rates, ANR, performance, battery, device stats | +| `gpc-testing` | Internal sharing, testers, tester groups, test tracks | +| `gpc-setup` | Authentication, project config, doctor, team management | + +--- + ## 🤝 Contributing PRs welcome! Please open an issue first to discuss major changes. diff --git a/skills/gpc-monetization/SKILL.md b/skills/gpc-monetization/SKILL.md new file mode 100644 index 0000000..4399e4a --- /dev/null +++ b/skills/gpc-monetization/SKILL.md @@ -0,0 +1,89 @@ +--- +name: gpc-monetization +description: Manage in-app products, subscriptions, offers, purchases, orders, and external transactions using the Play Console CLI (gpc). +--- + +# GPC Monetization + +Use this skill when the user wants to manage in-app purchases, subscriptions, subscription offers, verify purchases, handle orders/refunds, or manage external transactions for alternative billing. + +## Prerequisites + +- `gpc` CLI installed and authenticated (`gpc auth login`) +- Package name configured via `--package`, `.gpc.yaml`, or `GPC_PACKAGE` env var + +## In-App Products (One-Time Purchases) + +```bash +gpc products list +gpc products get --product-id coins_100 +gpc products create --product-id coins_100 --file product.json +gpc products update --product-id coins_100 --file product.json +gpc products delete --product-id coins_100 +``` + +## Subscriptions + +```bash +gpc subscriptions list +gpc subscriptions get --product-id monthly_pro +gpc subscriptions create --product-id monthly_pro --file subscription.json + +# Base plans +gpc subscriptions base-plans list --product-id monthly_pro + +# Pricing +gpc subscriptions pricing --product-id monthly_pro --base-plan monthly +``` + +## Subscription Offers + +```bash +gpc offers list --product-id monthly_pro --base-plan monthly +gpc offers get --product-id monthly_pro --base-plan monthly --offer-id free_trial +gpc offers create --product-id monthly_pro --base-plan monthly --file offer.json +gpc offers update --product-id monthly_pro --base-plan monthly --offer-id free_trial --file offer.json +gpc offers delete --product-id monthly_pro --base-plan monthly --offer-id free_trial +gpc offers activate --product-id monthly_pro --base-plan monthly --offer-id free_trial +gpc offers deactivate --product-id monthly_pro --base-plan monthly --offer-id free_trial +``` + +## Purchase Verification + +```bash +# Verify a one-time purchase +gpc purchases verify --product-id premium --token "purchase_token_here" + +# Check subscription status +gpc purchases subscription-status --product-id monthly_pro --token "sub_token_here" + +# Acknowledge a purchase +gpc purchases acknowledge --product-id premium --token "purchase_token_here" + +# List voided purchases +gpc purchases voided +``` + +## Orders + +```bash +gpc orders get --order-id GPA.1234-5678 +gpc orders batch-get --order-ids GPA.1234,GPA.5678 +gpc orders refund --order-id GPA.1234-5678 --confirm +``` + +The `--confirm` flag is required for refunds as a safety measure. + +## External Transactions (Alternative Billing) + +Alias: `ext-tx` + +```bash +gpc external-transactions create --file tx.json +gpc external-transactions get --external-transaction-id "ext_123" +gpc external-transactions refund --external-transaction-id "ext_123" --file refund.json +``` + +## Global Flags + +All commands support: `--package/-p`, `--output/-o` (json/table/tsv/csv/yaml/minimal), `--pretty`, `--quiet/-q`, `--debug`, `--dry-run`, `--timeout`, `--profile`. diff --git a/skills/gpc-release/SKILL.md b/skills/gpc-release/SKILL.md new file mode 100644 index 0000000..17e3541 --- /dev/null +++ b/skills/gpc-release/SKILL.md @@ -0,0 +1,113 @@ +--- +name: gpc-release +description: Upload Android app bundles, manage release tracks, promote releases, and handle staged rollouts using the Play Console CLI (gpc). +--- + +# GPC Release Management + +Use this skill when the user wants to upload an Android app bundle, manage release tracks, promote a release between tracks, perform staged rollouts, halt a release, or upload deobfuscation/mapping files. + +## Prerequisites + +- `gpc` CLI installed and authenticated (`gpc auth login`) +- Package name configured via `--package`, `.gpc.yaml`, or `GPC_PACKAGE` env var + +## Commands + +### Upload a Bundle + +```bash +gpc bundles upload --file --track +``` + +- `--file` (required): Path to the `.aab` file +- `--track`: Target track (internal, alpha, beta, production). Defaults to internal if omitted. + +### Find a Bundle by Version Code + +```bash +gpc bundles find --version-code +``` + +### Wait for Bundle Processing + +```bash +gpc bundles wait --version-code --timeout 5m +``` + +Polls until Google Play finishes processing. Useful in CI pipelines after upload. + +### List Bundles + +```bash +gpc bundles list +``` + +### List Tracks + +```bash +gpc tracks list +``` + +### Get Track Details + +```bash +gpc tracks get --track +``` + +### Promote Between Tracks + +```bash +gpc tracks promote --from --to --rollout +``` + +- `--rollout`: Percentage (1-100) for staged rollout. Omit for full rollout. + +### Update Rollout Percentage + +```bash +gpc tracks update --track --rollout +``` + +### Halt a Release (Emergency) + +```bash +gpc tracks halt --track +``` + +Immediately stops the rollout on the specified track. + +### Complete a Rollout + +```bash +gpc tracks complete --track +``` + +### Upload Deobfuscation Files + +```bash +# ProGuard/R8 mapping file +gpc deobfuscation upload --version-code --file mapping.txt + +# Native debug symbols +gpc deobfuscation upload --version-code --file native-debug-symbols.zip --type nativeCode +``` + +### Upload Legacy APK + +```bash +gpc apks upload --file +``` + +## Typical Release Flow + +1. Upload: `gpc bundles upload --file app.aab --track internal` +2. Wait: `gpc bundles wait --version-code 42` +3. Test internally, then promote: `gpc tracks promote --from internal --to beta` +4. Staged production: `gpc tracks promote --from beta --to production --rollout 10` +5. Increase rollout: `gpc tracks update --track production --rollout 50` +6. Complete: `gpc tracks complete --track production` + +## Global Flags + +All commands support: `--package/-p`, `--output/-o` (json/table/tsv/csv/yaml/minimal), `--pretty`, `--quiet/-q`, `--debug`, `--dry-run`, `--timeout`, `--profile`. diff --git a/skills/gpc-reviews/SKILL.md b/skills/gpc-reviews/SKILL.md new file mode 100644 index 0000000..1c435da --- /dev/null +++ b/skills/gpc-reviews/SKILL.md @@ -0,0 +1,73 @@ +--- +name: gpc-reviews +description: List, filter, and reply to Google Play user reviews using the Play Console CLI (gpc). +--- + +# GPC Reviews Management + +Use this skill when the user wants to read app reviews, filter by rating, or reply to user reviews on Google Play. + +## Prerequisites + +- `gpc` CLI installed and authenticated (`gpc auth login`) +- Package name configured via `--package`, `.gpc.yaml`, or `GPC_PACKAGE` env var + +## Commands + +### List Reviews + +```bash +gpc reviews list +``` + +Options: +- `--min-rating `: Filter reviews with rating >= n (1-5) +- `--max-rating `: Filter reviews with rating <= n (1-5) +- `--translation-lang `: Get translated review text (e.g., `en`) +- `--max-results `: Limit number of results + +### Get a Specific Review + +```bash +gpc reviews get --review-id "gp:AOqpT..." +``` + +### Reply to a Review + +```bash +gpc reviews reply --review-id "gp:AOqpT..." --text "Thank you for the feedback!" +``` + +## Common Patterns + +### Find Negative Reviews + +```bash +gpc reviews list --min-rating 1 --max-rating 2 +``` + +### Find 5-Star Reviews + +```bash +gpc reviews list --min-rating 5 +``` + +### Filter Reviews with jq + +```bash +gpc reviews list | jq '[.[] | select(.rating == 1)]' +``` + +### Reply to All 1-Star Reviews (Scripting) + +```bash +gpc reviews list --min-rating 1 --max-rating 1 -o json | \ + jq -r '.[].reviewId' | \ + while read id; do + gpc reviews reply --review-id "$id" --text "We're sorry about your experience. Please contact support@example.com" + done +``` + +## Global Flags + +All commands support: `--package/-p`, `--output/-o` (json/table/tsv/csv/yaml/minimal), `--pretty`, `--quiet/-q`, `--debug`, `--dry-run`, `--timeout`, `--profile`. diff --git a/skills/gpc-setup/SKILL.md b/skills/gpc-setup/SKILL.md new file mode 100644 index 0000000..1852260 --- /dev/null +++ b/skills/gpc-setup/SKILL.md @@ -0,0 +1,142 @@ +--- +name: gpc-setup +description: Set up authentication, configure projects, validate credentials, and manage auth profiles for the Play Console CLI (gpc). +--- + +# GPC Setup & Configuration + +Use this skill when the user wants to set up the gpc CLI, authenticate, manage auth profiles, initialize a project config, troubleshoot issues, or manage team access. + +## Prerequisites + +- `gpc` CLI installed (via Homebrew: `brew tap AndroidPoet/tap && brew install playconsole-cli`) +- A Google Cloud service account with Play Console API access + +## Initial Setup + +### Interactive Setup Wizard + +```bash +gpc setup +``` + +### Manual Setup + +1. Create service account at [Google Cloud Console](https://console.cloud.google.com/iam-admin/serviceaccounts) +2. Enable API at [Google Play Android Developer API](https://console.cloud.google.com/apis/library/androidpublisher.googleapis.com) +3. Grant access in [Play Console API Settings](https://play.google.com/console/developers/api-access) +4. Store credentials securely: + +```bash +mkdir -p ~/.config/gpc +mv ~/Downloads/your-key.json ~/.config/gpc/service-account.json +chmod 600 ~/.config/gpc/service-account.json +``` + +## Authentication + +### Login with Credentials + +```bash +gpc auth login --credentials ~/.config/gpc/service-account.json +``` + +### Login with Base64 Credentials (CI/CD) + +```bash +gpc auth login --credentials-b64 "$GPC_CREDENTIALS_B64" +``` + +### List Auth Profiles + +```bash +gpc auth list +``` + +### Show Current Profile + +```bash +gpc auth current +``` + +### Switch Profile + +```bash +gpc auth switch --profile +``` + +### Delete a Profile + +```bash +gpc auth delete --profile +``` + +## Project Configuration + +### Initialize Project Config + +```bash +gpc init --package com.example.app +gpc init --package com.example.app --force # Overwrite existing +``` + +Creates `.gpc.yaml` in the current directory. + +### Validate Setup + +```bash +gpc doctor # Quick check +gpc doctor --verbose # Detailed diagnostics +``` + +## Team Management + +```bash +gpc users list +gpc users grant --email "dev@company.com" --role releaseManager +gpc users revoke --email "dev@company.com" +``` + +Roles: `admin`, `releaseManager`, `appOwner`. + +## Environment Variables + +| Variable | Description | +|----------|-------------| +| `GPC_CREDENTIALS_PATH` | Path to service account JSON | +| `GPC_CREDENTIALS_B64` | Base64-encoded credentials (for CI) | +| `GPC_PACKAGE` | Default package name | +| `GPC_PROFILE` | Auth profile to use | +| `GPC_OUTPUT` | Default output format | + +## Shell Completions + +```bash +gpc completion bash > /etc/bash_completion.d/gpc +gpc completion zsh > "${fpath[1]}/_gpc" +gpc completion fish > ~/.config/fish/completions/gpc.fish +gpc completion powershell > gpc.ps1 +``` + +## App Recovery + +```bash +gpc recovery list +gpc recovery create --file recovery-action.json +gpc recovery deploy --action-id +gpc recovery cancel --action-id +``` + +## Edit Sessions (Advanced) + +```bash +gpc edits create +gpc edits get +gpc edits validate +gpc edits commit +gpc edits delete +``` + +## Global Flags + +All commands support: `--package/-p`, `--output/-o` (json/table/tsv/csv/yaml/minimal), `--pretty`, `--quiet/-q`, `--debug`, `--dry-run`, `--timeout`, `--config`, `--profile`. diff --git a/skills/gpc-store/SKILL.md b/skills/gpc-store/SKILL.md new file mode 100644 index 0000000..eb7031f --- /dev/null +++ b/skills/gpc-store/SKILL.md @@ -0,0 +1,122 @@ +--- +name: gpc-store +description: Manage Google Play store listings, screenshots, images, and country availability using the Play Console CLI (gpc). +--- + +# GPC Store Presence + +Use this skill when the user wants to manage app store listings (title, description, release notes), upload or sync screenshots and images, or configure country/region availability. + +## Prerequisites + +- `gpc` CLI installed and authenticated (`gpc auth login`) +- Package name configured via `--package`, `.gpc.yaml`, or `GPC_PACKAGE` env var + +## Listings Commands + +### List All Locale Listings + +```bash +gpc listings list +``` + +### Get a Specific Locale Listing + +```bash +gpc listings get --locale en-US +``` + +### Update a Listing + +```bash +gpc listings update --locale en-US --title "My App" --short-description "Short desc" --full-description "Full desc" +``` + +### Sync Listings from Directory + +```bash +gpc listings sync --dir ./metadata/ +``` + +Expected directory structure: +``` +metadata/ +├── en-US/ +│ ├── title.txt +│ ├── short_description.txt +│ ├── full_description.txt +│ └── changelogs/ +│ └── default.txt +├── es-ES/ +│ └── ... +``` + +## Image Commands + +### List Images + +```bash +gpc images list --locale en-US --type phoneScreenshots +``` + +### Upload an Image + +```bash +gpc images upload --locale en-US --type phoneScreenshots --file screenshot.png +``` + +Image types: `phoneScreenshots`, `sevenInchScreenshots`, `tenInchScreenshots`, `tvScreenshots`, `wearScreenshots`, `featureGraphic`, `previewGraphic`, `header`, `icon`. + +### Delete an Image + +```bash +gpc images delete --locale en-US --type phoneScreenshots --image-id +``` + +### Delete All Images of a Type + +```bash +gpc images delete-all --locale en-US --type phoneScreenshots +``` + +### Sync Images from Directory + +```bash +gpc images sync --dir ./screenshots/ +``` + +Expected directory structure: +``` +screenshots/ +├── en-US/ +│ ├── phoneScreenshots/ +│ │ ├── 01.png +│ │ └── 02.png +│ └── featureGraphic/ +│ └── feature.png +``` + +## Availability Commands + +### List Country Availability + +```bash +gpc availability list --track production +``` + +### Update Country Targeting + +```bash +gpc availability update --track production --countries US,GB,DE,FR --confirm +``` + +## Diff (Compare Draft vs Live) + +```bash +gpc diff # All sections +gpc diff --section listings # Just listings +``` + +## Global Flags + +All commands support: `--package/-p`, `--output/-o` (json/table/tsv/csv/yaml/minimal), `--pretty`, `--quiet/-q`, `--debug`, `--dry-run`, `--timeout`, `--profile`. diff --git a/skills/gpc-testing/SKILL.md b/skills/gpc-testing/SKILL.md new file mode 100644 index 0000000..ed94a43 --- /dev/null +++ b/skills/gpc-testing/SKILL.md @@ -0,0 +1,85 @@ +--- +name: gpc-testing +description: Manage test tracks, testers, tester groups, and internal app sharing using the Play Console CLI (gpc). +--- + +# GPC Testing + +Use this skill when the user wants to manage app testing — upload for internal sharing, add/remove testers, manage tester groups, or work with test tracks. + +## Prerequisites + +- `gpc` CLI installed and authenticated (`gpc auth login`) +- Package name configured via `--package`, `.gpc.yaml`, or `GPC_PACKAGE` env var + +## Internal App Sharing + +Upload a bundle and get an instant shareable test link: + +```bash +gpc testing internal-sharing upload --file app.aab +``` + +Returns a download URL that testers can use immediately without waiting for Play Store processing. + +## Internal Test Track + +```bash +gpc testing internal list +``` + +## Testers + +### List Testers on a Track + +```bash +gpc testing testers list --track beta +``` + +### Add a Tester + +```bash +# Single email +gpc testing testers add --track beta --email "dev@company.com" + +# Bulk from file (one email per line) +gpc testing testers add --track beta --file testers.txt +``` + +### Remove a Tester + +```bash +gpc testing testers remove --track beta --email "dev@company.com" +``` + +## Tester Groups + +```bash +gpc testing tester-groups list +``` + +## Common Patterns + +### Quick Internal Test + +```bash +gpc testing internal-sharing upload --file app.aab +# Share the returned URL with your team +``` + +### Set Up Beta Testing + +```bash +gpc bundles upload --file app.aab --track beta +gpc testing testers add --track beta --file beta-testers.txt +``` + +### Promote from Internal to Beta + +```bash +gpc tracks promote --from internal --to beta +``` + +## Global Flags + +All commands support: `--package/-p`, `--output/-o` (json/table/tsv/csv/yaml/minimal), `--pretty`, `--quiet/-q`, `--debug`, `--dry-run`, `--timeout`, `--profile`. diff --git a/skills/gpc-vitals/SKILL.md b/skills/gpc-vitals/SKILL.md new file mode 100644 index 0000000..dae5cff --- /dev/null +++ b/skills/gpc-vitals/SKILL.md @@ -0,0 +1,123 @@ +--- +name: gpc-vitals +description: Monitor Android app health with crash rates, ANR rates, startup times, rendering performance, battery metrics, and error reports using the Play Console CLI (gpc). +--- + +# GPC App Vitals & Analytics + +Use this skill when the user wants to check app health, crash rates, ANR rates, performance metrics, device statistics, or error reports from Google Play. + +## Prerequisites + +- `gpc` CLI installed and authenticated (`gpc auth login`) +- Package name configured via `--package`, `.gpc.yaml`, or `GPC_PACKAGE` env var + +## Vitals Commands + +### Health Overview + +```bash +gpc vitals overview +``` + +Combined summary of crash rate and ANR rate. + +### Crash Rate + +```bash +gpc vitals crashes --days 7 +gpc vitals crashes --days 28 +``` + +### ANR Rate + +```bash +gpc vitals anr --days 7 +gpc vitals anr --days 28 +``` + +### Startup Performance + +```bash +gpc vitals slow-start --days 28 +``` + +### Rendering Performance + +```bash +gpc vitals slow-rendering --days 28 +``` + +### Battery Metrics + +```bash +gpc vitals wakeups --days 28 # Excessive wakeup alarms +gpc vitals wakelocks --days 28 # Stuck partial wakelocks +``` + +### Memory + +```bash +gpc vitals memory --days 28 # Low memory killer rate +``` + +### Error Reports + +```bash +gpc vitals errors issues # Grouped error issues with root causes +``` + +## Device Commands + +### List Supported Devices + +```bash +gpc devices list +``` + +### Device Usage Distribution + +```bash +gpc devices stats +``` + +### Device Tier Configurations + +```bash +gpc device-tiers list +gpc device-tiers get --config-id +gpc device-tiers create --file tier-config.json +``` + +## Reports + +```bash +gpc reports list # Available reports +gpc reports types # Report type metadata +``` + +## Common Patterns + +### Quick Health Check + +```bash +gpc vitals overview --pretty +``` + +### Monitor After Release + +```bash +gpc vitals crashes --days 7 --pretty +gpc vitals anr --days 7 --pretty +``` + +### Export Metrics + +```bash +gpc vitals crashes --days 28 -o csv > crashes.csv +gpc devices stats -o csv > device_distribution.csv +``` + +## Global Flags + +All commands support: `--package/-p`, `--output/-o` (json/table/tsv/csv/yaml/minimal), `--pretty`, `--quiet/-q`, `--debug`, `--dry-run`, `--timeout`, `--profile`.