Compare commits

..

No commits in common. "c48eead0e0b7a1699d5e95a5d7df103955a521a7" and "06e2f6b2b842a744aae57620640169c8e357eba5" have entirely different histories.

105 changed files with 414 additions and 4093 deletions

View file

@ -8,8 +8,8 @@
{
"name": "storebound",
"source": ".",
"description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.",
"version": "0.5.0",
"description": "Take a mobile game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.",
"version": "0.4.0",
"category": "development",
"tags": [
"mobile",

View file

@ -1,7 +1,7 @@
{
"name": "storebound",
"version": "0.5.0",
"description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.",
"version": "0.4.0",
"description": "From nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products with regional prices, every questionnaire (Data safety, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.",
"author": {
"name": "CRTkafa"
},
@ -12,10 +12,8 @@
"google-play",
"app-store",
"app-store-connect",
"mobile-apps",
"mobile-games",
"iap",
"subscriptions",
"screenshots",
"app-icons",
"release",

View file

@ -1,7 +1,7 @@
{
"name": "storebound",
"version": "0.5.0",
"description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.",
"version": "0.4.0",
"description": "From nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products with regional prices, every questionnaire (Data safety, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.",
"author": {
"name": "CRTkafa"
},
@ -12,10 +12,8 @@
"google-play",
"app-store",
"app-store-connect",
"mobile-apps",
"mobile-games",
"iap",
"subscriptions",
"screenshots",
"app-icons",
"release",

View file

@ -1,5 +1,5 @@
---
description: Shipping a mobile app or game to Google Play or the App Store with storebound (listings, IAPs, subscriptions, screenshots, releases, review, compliance)
description: Shipping a mobile game to Google Play or the App Store with storebound (listings, IAPs, screenshots, releases, review, compliance)
alwaysApply: false
---
@ -17,8 +17,7 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
3. **Read before you write.** `storebound check` (offline) and `storebound validate` (read-only, both stores) tell you
what is missing and in which order to fix it.
4. **Credentials only from the environment or `.storebound/`** in the project (gitignored). Never ask for keys,
passwords or tokens in chat, never print them, never write them into the config, docs or commits. The same goes
for the App Review demo account (`reviewDemoAccount` in `.storebound/credentials.json`): the owner puts it there.
passwords or tokens in chat, never print them, never write them into the config, docs or commits.
5. **Never answer a compliance question you cannot know.** Export compliance, Data safety, App Privacy, age rating,
target audience: ask the owner when the code does not prove the answer. A wrong "no" is worse than a slow "ask".
6. **Pick builds by explicit number.** Use the build number / versionCode you just uploaded, never "the latest".
@ -38,28 +37,24 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
## Skills
- `skills/account-deletion/SKILL.md`: Make account deletion pass App Store and Google Play review for an app with sign-up or sign-in
- `skills/ads-levelplay-checks/SKILL.md`: Renamed to ads-mediation-checks (AdMob, AppLovin MAX and Unity LevelPlay / ironSource). Kept so existing installs and links keep working. Use ads-mediation-checks for any ad mediation, app-ads.txt, SKAdNetwork or "no fill" question
- `skills/ads-mediation-checks/SKILL.md`: Diagnose and verify ad mediation in a mobile app or game before and after store release
- `skills/app-icons/SKILL.md`: Generate every icon a mobile app or game needs from one artwork
- `skills/app-previews/SKILL.md`: Make App Store app preview videos and a Google Play promo video for a mobile app or game from real footage (gameplay or app flows)
- `skills/appstore-first-release/SKILL.md`: Step-by-step first (and later) App Store release of a mobile app or game
- `skills/aso-basics/SKILL.md`: App store optimization basics for a mobile app's or game's text
- `skills/export-compliance/SKILL.md`: Answer App Store export compliance (encryption) for a mobile app or game correctly
- `skills/play-first-release/SKILL.md`: Step-by-step first (and later) Google Play release of a mobile app or game
- `skills/portfolio-originality/SKILL.md`: Originality gate for studios and developers that ship many similar mobile apps or games (templates, white-label apps, reskins)
- `skills/privacy-manifest/SKILL.md`: Add and check Apple privacy manifests (PrivacyInfo.xcprivacy) for an iOS app or game
- `skills/privacy-policy/SKILL.md`: Write and host one studio-wide privacy policy page for all of a developer's mobile apps and games
- `skills/ads-levelplay-checks/SKILL.md`: Diagnose and verify ad mediation (Unity LevelPlay / ironSource and its networks like Unity Ads, InMobi, Liftoff, AdMob) in a mobile game before and after store release
- `skills/app-icons/SKILL.md`: Generate every app icon a mobile game needs from one artwork
- `skills/app-previews/SKILL.md`: Make App Store app preview videos and a Google Play promo video for a mobile game from real gameplay
- `skills/appstore-first-release/SKILL.md`: Step-by-step first (and later) App Store release of a mobile game
- `skills/aso-basics/SKILL.md`: App store optimization basics for a mobile game's text
- `skills/export-compliance/SKILL.md`: Answer App Store export compliance (encryption) for a mobile game correctly
- `skills/play-first-release/SKILL.md`: Step-by-step first (and later) Google Play release of a mobile game
- `skills/portfolio-originality/SKILL.md`: Originality gate for studios that ship many similar mobile games
- `skills/privacy-manifest/SKILL.md`: Add and check Apple privacy manifests (PrivacyInfo.xcprivacy) for an iOS game
- `skills/privacy-policy/SKILL.md`: Write and host one studio-wide privacy policy page for all of a developer's mobile games
- `skills/release-management/SKILL.md`: Ship updates safely after the first release
- `skills/review-access/SKILL.md`: Give App Store and Google Play reviewers working access to an app behind a sign-in
- `skills/review-rejections/SKILL.md`: Triage and answer an App Store or Google Play rejection, policy warning or strike for a mobile app or game
- `skills/review-replies/SKILL.md`: Reply to App Store and Google Play reviews of a mobile app or game the safe way
- `skills/store-analytics/SKILL.md`: Take store analytics snapshots for a mobile app or game (App Store impressions, product page views, downloads and conversion through the Analytics Reports API; Google Play store listing visitors, acquisitions and installs from the Play reports bucket) and compare them with listing, screenshot and experiment changes from git
- `skills/store-declarations/SKILL.md`: Answer the store compliance forms for a mobile app or game
- `skills/store-health/SKILL.md`: Watch a released mobile app's or game's crash and ANR health on both stores
- `skills/store-iap-setup/SKILL.md`: Create and price in-app purchases (consumables, non-consumables like "remove ads" or a Pro unlock, non-renewing passes, coin/gem packs, starter packs) on Google Play and App Store Connect from one product list
- `skills/store-preflight/SKILL.md`: Run and read the storebound readiness checks before submitting a mobile app or game
- `skills/store-screenshots/SKILL.md`: Produce store screenshots and the Play feature graphic for a mobile app or game in every required size and many languages
- `skills/store-subscriptions/SKILL.md`: Set up auto-renewable subscriptions on the App Store and Google Play from one config
- `skills/testflight/SKILL.md`: Run TestFlight for a mobile app or game through the App Store Connect API
- `skills/whats-new/SKILL.md`: Write user-facing release notes ("What's new") for a mobile app or game update from the git log since the last tag
- `skills/review-rejections/SKILL.md`: Triage and answer an App Store or Google Play rejection, policy warning or strike for a mobile game
- `skills/review-replies/SKILL.md`: Reply to App Store and Google Play reviews of a mobile game the safe way
- `skills/store-analytics/SKILL.md`: Take store analytics snapshots for a mobile game (App Store impressions, product page views, downloads and conversion through the Analytics Reports API; Google Play store listing visitors, acquisitions and installs from the Play reports bucket) and compare them with listing, screenshot and experiment changes from git
- `skills/store-declarations/SKILL.md`: Answer the store compliance forms for a mobile game
- `skills/store-health/SKILL.md`: Watch a released mobile game's crash and ANR health on both stores
- `skills/store-iap-setup/SKILL.md`: Create and price in-app purchases (consumables, non-consumables like "remove ads", coin/gem packs, starter packs) on Google Play and App Store Connect from one product list
- `skills/store-preflight/SKILL.md`: Run and read the storebound readiness checks before submitting a mobile game
- `skills/store-screenshots/SKILL.md`: Produce store screenshots and the Play feature graphic for a mobile game in every required size and many languages
- `skills/testflight/SKILL.md`: Run TestFlight for a mobile game through the App Store Connect API
- `skills/whats-new/SKILL.md`: Write player-facing release notes ("What's new") for a mobile game update from the git log since the last tag

View file

@ -2,8 +2,8 @@
# storebound for GitHub Copilot
Mobile app and game store releases (Google Play, App Store). Skills live in `skills/<name>/SKILL.md` (Agent Skills
format; `storebound install --agent copilot` copies them to `.github/skills/` of an app or game project).
Mobile game store releases (Google Play, App Store). Skills live in `skills/<name>/SKILL.md` (Agent Skills format;
`storebound install --agent copilot` copies them to `.github/skills/` of a game project).
These rules apply to every AI tool that uses storebound (skills, MCP server or the CLI in a terminal).
@ -17,8 +17,7 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
3. **Read before you write.** `storebound check` (offline) and `storebound validate` (read-only, both stores) tell you
what is missing and in which order to fix it.
4. **Credentials only from the environment or `.storebound/`** in the project (gitignored). Never ask for keys,
passwords or tokens in chat, never print them, never write them into the config, docs or commits. The same goes
for the App Review demo account (`reviewDemoAccount` in `.storebound/credentials.json`): the owner puts it there.
passwords or tokens in chat, never print them, never write them into the config, docs or commits.
5. **Never answer a compliance question you cannot know.** Export compliance, Data safety, App Privacy, age rating,
target audience: ask the owner when the code does not prove the answer. A wrong "no" is worse than a slow "ask".
6. **Pick builds by explicit number.** Use the build number / versionCode you just uploaded, never "the latest".
@ -40,28 +39,24 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
| skill | for |
|---|---|
| `account-deletion` | Make account deletion pass App Store and Google Play review for an app with sign-up or sign-in |
| `ads-levelplay-checks` | Renamed to ads-mediation-checks (AdMob, AppLovin MAX and Unity LevelPlay / ironSource). Kept so existing installs and links keep working. Use ads-mediation-checks for any ad mediation, app-ads.txt, SKAdNetwork or "no fill" question |
| `ads-mediation-checks` | Diagnose and verify ad mediation in a mobile app or game before and after store release |
| `app-icons` | Generate every icon a mobile app or game needs from one artwork |
| `app-previews` | Make App Store app preview videos and a Google Play promo video for a mobile app or game from real footage (gameplay or app flows) |
| `appstore-first-release` | Step-by-step first (and later) App Store release of a mobile app or game |
| `aso-basics` | App store optimization basics for a mobile app's or game's text |
| `export-compliance` | Answer App Store export compliance (encryption) for a mobile app or game correctly |
| `play-first-release` | Step-by-step first (and later) Google Play release of a mobile app or game |
| `portfolio-originality` | Originality gate for studios and developers that ship many similar mobile apps or games (templates, white-label apps, reskins) |
| `privacy-manifest` | Add and check Apple privacy manifests (PrivacyInfo.xcprivacy) for an iOS app or game |
| `privacy-policy` | Write and host one studio-wide privacy policy page for all of a developer's mobile apps and games |
| `ads-levelplay-checks` | Diagnose and verify ad mediation (Unity LevelPlay / ironSource and its networks like Unity Ads, InMobi, Liftoff, AdMob) in a mobile game before and after store release |
| `app-icons` | Generate every app icon a mobile game needs from one artwork |
| `app-previews` | Make App Store app preview videos and a Google Play promo video for a mobile game from real gameplay |
| `appstore-first-release` | Step-by-step first (and later) App Store release of a mobile game |
| `aso-basics` | App store optimization basics for a mobile game's text |
| `export-compliance` | Answer App Store export compliance (encryption) for a mobile game correctly |
| `play-first-release` | Step-by-step first (and later) Google Play release of a mobile game |
| `portfolio-originality` | Originality gate for studios that ship many similar mobile games |
| `privacy-manifest` | Add and check Apple privacy manifests (PrivacyInfo.xcprivacy) for an iOS game |
| `privacy-policy` | Write and host one studio-wide privacy policy page for all of a developer's mobile games |
| `release-management` | Ship updates safely after the first release |
| `review-access` | Give App Store and Google Play reviewers working access to an app behind a sign-in |
| `review-rejections` | Triage and answer an App Store or Google Play rejection, policy warning or strike for a mobile app or game |
| `review-replies` | Reply to App Store and Google Play reviews of a mobile app or game the safe way |
| `store-analytics` | Take store analytics snapshots for a mobile app or game (App Store impressions, product page views, downloads and conversion through the Analytics Reports API; Google Play store listing visitors, acquisitions and installs from the Play reports bucket) and compare them with listing, screenshot and experiment changes from git |
| `store-declarations` | Answer the store compliance forms for a mobile app or game |
| `store-health` | Watch a released mobile app's or game's crash and ANR health on both stores |
| `store-iap-setup` | Create and price in-app purchases (consumables, non-consumables like "remove ads" or a Pro unlock, non-renewing passes, coin/gem packs, starter packs) on Google Play and App Store Connect from one product list |
| `store-preflight` | Run and read the storebound readiness checks before submitting a mobile app or game |
| `store-screenshots` | Produce store screenshots and the Play feature graphic for a mobile app or game in every required size and many languages |
| `store-subscriptions` | Set up auto-renewable subscriptions on the App Store and Google Play from one config |
| `testflight` | Run TestFlight for a mobile app or game through the App Store Connect API |
| `whats-new` | Write user-facing release notes ("What's new") for a mobile app or game update from the git log since the last tag |
| `review-rejections` | Triage and answer an App Store or Google Play rejection, policy warning or strike for a mobile game |
| `review-replies` | Reply to App Store and Google Play reviews of a mobile game the safe way |
| `store-analytics` | Take store analytics snapshots for a mobile game (App Store impressions, product page views, downloads and conversion through the Analytics Reports API; Google Play store listing visitors, acquisitions and installs from the Play reports bucket) and compare them with listing, screenshot and experiment changes from git |
| `store-declarations` | Answer the store compliance forms for a mobile game |
| `store-health` | Watch a released mobile game's crash and ANR health on both stores |
| `store-iap-setup` | Create and price in-app purchases (consumables, non-consumables like "remove ads", coin/gem packs, starter packs) on Google Play and App Store Connect from one product list |
| `store-preflight` | Run and read the storebound readiness checks before submitting a mobile game |
| `store-screenshots` | Produce store screenshots and the Play feature graphic for a mobile game in every required size and many languages |
| `testflight` | Run TestFlight for a mobile game through the App Store Connect API |
| `whats-new` | Write player-facing release notes ("What's new") for a mobile game update from the git log since the last tag |

View file

@ -2,8 +2,7 @@
# storebound
Toolchain for taking mobile apps and games from nothing to "Submit for review" on Google Play and the App Store.
Before a store task, open the matching skill
Toolchain for shipping mobile games to Google Play and the App Store. Before a store task, open the matching skill
file below and follow it step by step.
These rules apply to every AI tool that uses storebound (skills, MCP server or the CLI in a terminal).
@ -18,8 +17,7 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
3. **Read before you write.** `storebound check` (offline) and `storebound validate` (read-only, both stores) tell you
what is missing and in which order to fix it.
4. **Credentials only from the environment or `.storebound/`** in the project (gitignored). Never ask for keys,
passwords or tokens in chat, never print them, never write them into the config, docs or commits. The same goes
for the App Review demo account (`reviewDemoAccount` in `.storebound/credentials.json`): the owner puts it there.
passwords or tokens in chat, never print them, never write them into the config, docs or commits.
5. **Never answer a compliance question you cannot know.** Export compliance, Data safety, App Privacy, age rating,
target audience: ask the owner when the code does not prove the answer. A wrong "no" is worse than a slow "ask".
6. **Pick builds by explicit number.** Use the build number / versionCode you just uploaded, never "the latest".
@ -39,31 +37,27 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
## Skills
- `skills/account-deletion/SKILL.md`: Make account deletion pass App Store and Google Play review for an app with sign-up or sign-in
- `skills/ads-levelplay-checks/SKILL.md`: Renamed to ads-mediation-checks (AdMob, AppLovin MAX and Unity LevelPlay / ironSource). Kept so existing installs and links keep working. Use ads-mediation-checks for any ad mediation, app-ads.txt, SKAdNetwork or "no fill" question
- `skills/ads-mediation-checks/SKILL.md`: Diagnose and verify ad mediation in a mobile app or game before and after store release
- `skills/app-icons/SKILL.md`: Generate every icon a mobile app or game needs from one artwork
- `skills/app-previews/SKILL.md`: Make App Store app preview videos and a Google Play promo video for a mobile app or game from real footage (gameplay or app flows)
- `skills/appstore-first-release/SKILL.md`: Step-by-step first (and later) App Store release of a mobile app or game
- `skills/aso-basics/SKILL.md`: App store optimization basics for a mobile app's or game's text
- `skills/export-compliance/SKILL.md`: Answer App Store export compliance (encryption) for a mobile app or game correctly
- `skills/play-first-release/SKILL.md`: Step-by-step first (and later) Google Play release of a mobile app or game
- `skills/portfolio-originality/SKILL.md`: Originality gate for studios and developers that ship many similar mobile apps or games (templates, white-label apps, reskins)
- `skills/privacy-manifest/SKILL.md`: Add and check Apple privacy manifests (PrivacyInfo.xcprivacy) for an iOS app or game
- `skills/privacy-policy/SKILL.md`: Write and host one studio-wide privacy policy page for all of a developer's mobile apps and games
- `skills/ads-levelplay-checks/SKILL.md`: Diagnose and verify ad mediation (Unity LevelPlay / ironSource and its networks like Unity Ads, InMobi, Liftoff, AdMob) in a mobile game before and after store release
- `skills/app-icons/SKILL.md`: Generate every app icon a mobile game needs from one artwork
- `skills/app-previews/SKILL.md`: Make App Store app preview videos and a Google Play promo video for a mobile game from real gameplay
- `skills/appstore-first-release/SKILL.md`: Step-by-step first (and later) App Store release of a mobile game
- `skills/aso-basics/SKILL.md`: App store optimization basics for a mobile game's text
- `skills/export-compliance/SKILL.md`: Answer App Store export compliance (encryption) for a mobile game correctly
- `skills/play-first-release/SKILL.md`: Step-by-step first (and later) Google Play release of a mobile game
- `skills/portfolio-originality/SKILL.md`: Originality gate for studios that ship many similar mobile games
- `skills/privacy-manifest/SKILL.md`: Add and check Apple privacy manifests (PrivacyInfo.xcprivacy) for an iOS game
- `skills/privacy-policy/SKILL.md`: Write and host one studio-wide privacy policy page for all of a developer's mobile games
- `skills/release-management/SKILL.md`: Ship updates safely after the first release
- `skills/review-access/SKILL.md`: Give App Store and Google Play reviewers working access to an app behind a sign-in
- `skills/review-rejections/SKILL.md`: Triage and answer an App Store or Google Play rejection, policy warning or strike for a mobile app or game
- `skills/review-replies/SKILL.md`: Reply to App Store and Google Play reviews of a mobile app or game the safe way
- `skills/store-analytics/SKILL.md`: Take store analytics snapshots for a mobile app or game (App Store impressions, product page views, downloads and conversion through the Analytics Reports API; Google Play store listing visitors, acquisitions and installs from the Play reports bucket) and compare them with listing, screenshot and experiment changes from git
- `skills/store-declarations/SKILL.md`: Answer the store compliance forms for a mobile app or game
- `skills/store-health/SKILL.md`: Watch a released mobile app's or game's crash and ANR health on both stores
- `skills/store-iap-setup/SKILL.md`: Create and price in-app purchases (consumables, non-consumables like "remove ads" or a Pro unlock, non-renewing passes, coin/gem packs, starter packs) on Google Play and App Store Connect from one product list
- `skills/store-preflight/SKILL.md`: Run and read the storebound readiness checks before submitting a mobile app or game
- `skills/store-screenshots/SKILL.md`: Produce store screenshots and the Play feature graphic for a mobile app or game in every required size and many languages
- `skills/store-subscriptions/SKILL.md`: Set up auto-renewable subscriptions on the App Store and Google Play from one config
- `skills/testflight/SKILL.md`: Run TestFlight for a mobile app or game through the App Store Connect API
- `skills/whats-new/SKILL.md`: Write user-facing release notes ("What's new") for a mobile app or game update from the git log since the last tag
- `skills/review-rejections/SKILL.md`: Triage and answer an App Store or Google Play rejection, policy warning or strike for a mobile game
- `skills/review-replies/SKILL.md`: Reply to App Store and Google Play reviews of a mobile game the safe way
- `skills/store-analytics/SKILL.md`: Take store analytics snapshots for a mobile game (App Store impressions, product page views, downloads and conversion through the Analytics Reports API; Google Play store listing visitors, acquisitions and installs from the Play reports bucket) and compare them with listing, screenshot and experiment changes from git
- `skills/store-declarations/SKILL.md`: Answer the store compliance forms for a mobile game
- `skills/store-health/SKILL.md`: Watch a released mobile game's crash and ANR health on both stores
- `skills/store-iap-setup/SKILL.md`: Create and price in-app purchases (consumables, non-consumables like "remove ads", coin/gem packs, starter packs) on Google Play and App Store Connect from one product list
- `skills/store-preflight/SKILL.md`: Run and read the storebound readiness checks before submitting a mobile game
- `skills/store-screenshots/SKILL.md`: Produce store screenshots and the Play feature graphic for a mobile game in every required size and many languages
- `skills/testflight/SKILL.md`: Run TestFlight for a mobile game through the App Store Connect API
- `skills/whats-new/SKILL.md`: Write player-facing release notes ("What's new") for a mobile game update from the git log since the last tag
## Working on storebound itself

View file

@ -1,55 +1,5 @@
# Changelog
## 0.5.0 · 2026-10-11
Apps and games: storebound is for every mobile app, not only games, and the in-app catalog is complete on both stores.
- **Positioning**: "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store"
across the README, the site (new "Apps and games" section, app screenshot style, og image), package, plugin and
adapter descriptions, CLI help, MCP server instructions and the skills. Game-specific advice stays, marked for games.
- **`init --profile app|game|subscription-app`** (default `app`): per profile a config, `declarations.md`,
`app-privacy.md`, the Data safety section, listing and screenshot copy and a privacy policy. app = utility /
productivity app with an optional account and analytics, no ads; subscription-app = accounts + auto-renewable
subscriptions with the disclosure text; game = the 0.4 templates. Every answer is flagged "edit to match your app".
Configs without `app.profile` keep working as games.
- **App screenshot style** (`shots.style: 'app'`, the default for the app profiles): calm gradient, a clean device frame,
headline + subline, no sparkles or badges (badges only as quiet chips), status bar text that follows the frame, Inter
by default, app palettes (mist, paper, mint, sand, rose, sky, ocean, slate), its own feature graphic. Game style
unchanged. New demo `examples/demo-app` ("Tidy Lists").
- **App identity**: `app.platforms` (default from the `apple` / `play` sections) and `platforms` on a product or
subscription to sell it on one store only; one shared catalog and shared listings, per-platform settings in
`apple` / `play`.
- **Subscriptions on both stores**: `apple subscriptions` (groups and display names, subscriptions with period, level,
family sharing, localizations, availability, prices from the USA price point and its equalizations plus overrides
and `--csv` rows of the prices sheet incl. scheduled changes, introductory offers per territory, promotional offers,
offer code campaigns, custom codes only with `--codes` after a terminal confirmation, review screenshots) and
`play subscriptions` (listings with benefits, one auto-renewing base plan with grace period and regional prices from
`convertRegionPrices`, overrides and CSV, activation, the intro offer for new subscribers and extra offers chosen by
your app through offer tags). Both print a plan, `--dry` stops there, a terminal run asks first; without a terminal
(MCP) only new records are created and live price changes wait for the owner. Skill `store-subscriptions`.
- **Full IAP catalog**: product type `non_renewing` (Apple NON_RENEWING_SUBSCRIPTION; a consumed one-time product on
Play), and **`catalog diff`**: the config's products and subscriptions against both stores (missing, extra, type,
billing period, level, US and override prices, localizations, offers) plus regions where the two stores price the
same item differently (same currency, `--threshold`). Read-only, exit 1 on mismatches.
- **Review access**: `apple review-details` sends `demoAccountRequired` / `demoAccountName` / `demoAccountPassword`
from `reviewDemoAccount` in `.storebound/credentials.json` (or `REVIEW_DEMO_USER` / `REVIEW_DEMO_PASSWORD`), masked
in every log line, and adds the sign-in steps (`reviewAccess.instructions`) and where account deletion is
(`accounts.inApp`) to the notes (4000-byte check). Skill `review-access`.
- **Account deletion**: `accounts { enabled, deletionUrl, inApp }`; skill `account-deletion` (Apple 5.1.1(v), Play's
in-app + web requirement and Data safety). `dataSafety.extra` adds CSV rows for questions Google does not document
(e.g. the delete-account URL id from a Console export).
- **Checks**: `check` reports the profile (delete-account URL, Data safety consistent with accounts, demo account
present, terms URL with subscriptions, subscription review screenshots); `validate` adds subscription states,
localizations, group names and review screenshots (App Store), active base plans (Play), the delete-account and
terms URLs answering, the demo account on App Review and a Terms of Use link in the descriptions.
- **Ad mediation**: `ads-levelplay-checks` became `ads-mediation-checks` (AdMob Ad Inspector, AppLovin MAX Mediation
Debugger, LevelPlay as a section, app-ads.txt, SKAdNetwork); the old name stays as a pointer skill.
- **MCP tools**: `apple_subscriptions`, `play_subscriptions` (dry run by default), `catalog_diff` (read-only). Custom
offer codes and live price changes are not reachable through MCP.
- Unverified until a live account run (see the README): free promotional offers / offer codes without a price point,
inline subscription prices and intro offers via `PATCH /v1/subscriptions/{id}`, Play relative-discount and untargeted
offers, the Play billing period strings and the undocumented Data safety ids.
## 0.4.0 · 2026-10-10
Wave 2: TestFlight and life after launch (stability, reviews, prices, analytics, experiments), plus MCP 2026-07-28.

View file

@ -2,7 +2,7 @@
# storebound
This extension ships Agent Skills (skills/) and the storebound MCP server for mobile app and game store releases.
This extension ships Agent Skills (skills/) and the storebound MCP server for mobile game store releases.
These rules apply to every AI tool that uses storebound (skills, MCP server or the CLI in a terminal).
@ -16,8 +16,7 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
3. **Read before you write.** `storebound check` (offline) and `storebound validate` (read-only, both stores) tell you
what is missing and in which order to fix it.
4. **Credentials only from the environment or `.storebound/`** in the project (gitignored). Never ask for keys,
passwords or tokens in chat, never print them, never write them into the config, docs or commits. The same goes
for the App Review demo account (`reviewDemoAccount` in `.storebound/credentials.json`): the owner puts it there.
passwords or tokens in chat, never print them, never write them into the config, docs or commits.
5. **Never answer a compliance question you cannot know.** Export compliance, Data safety, App Privacy, age rating,
target audience: ask the owner when the code does not prove the answer. A wrong "no" is worse than a slow "ask".
6. **Pick builds by explicit number.** Use the build number / versionCode you just uploaded, never "the latest".
@ -39,28 +38,24 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
| skill | for |
|---|---|
| `account-deletion` | Make account deletion pass App Store and Google Play review for an app with sign-up or sign-in |
| `ads-levelplay-checks` | Renamed to ads-mediation-checks (AdMob, AppLovin MAX and Unity LevelPlay / ironSource). Kept so existing installs and links keep working. Use ads-mediation-checks for any ad mediation, app-ads.txt, SKAdNetwork or "no fill" question |
| `ads-mediation-checks` | Diagnose and verify ad mediation in a mobile app or game before and after store release |
| `app-icons` | Generate every icon a mobile app or game needs from one artwork |
| `app-previews` | Make App Store app preview videos and a Google Play promo video for a mobile app or game from real footage (gameplay or app flows) |
| `appstore-first-release` | Step-by-step first (and later) App Store release of a mobile app or game |
| `aso-basics` | App store optimization basics for a mobile app's or game's text |
| `export-compliance` | Answer App Store export compliance (encryption) for a mobile app or game correctly |
| `play-first-release` | Step-by-step first (and later) Google Play release of a mobile app or game |
| `portfolio-originality` | Originality gate for studios and developers that ship many similar mobile apps or games (templates, white-label apps, reskins) |
| `privacy-manifest` | Add and check Apple privacy manifests (PrivacyInfo.xcprivacy) for an iOS app or game |
| `privacy-policy` | Write and host one studio-wide privacy policy page for all of a developer's mobile apps and games |
| `ads-levelplay-checks` | Diagnose and verify ad mediation (Unity LevelPlay / ironSource and its networks like Unity Ads, InMobi, Liftoff, AdMob) in a mobile game before and after store release |
| `app-icons` | Generate every app icon a mobile game needs from one artwork |
| `app-previews` | Make App Store app preview videos and a Google Play promo video for a mobile game from real gameplay |
| `appstore-first-release` | Step-by-step first (and later) App Store release of a mobile game |
| `aso-basics` | App store optimization basics for a mobile game's text |
| `export-compliance` | Answer App Store export compliance (encryption) for a mobile game correctly |
| `play-first-release` | Step-by-step first (and later) Google Play release of a mobile game |
| `portfolio-originality` | Originality gate for studios that ship many similar mobile games |
| `privacy-manifest` | Add and check Apple privacy manifests (PrivacyInfo.xcprivacy) for an iOS game |
| `privacy-policy` | Write and host one studio-wide privacy policy page for all of a developer's mobile games |
| `release-management` | Ship updates safely after the first release |
| `review-access` | Give App Store and Google Play reviewers working access to an app behind a sign-in |
| `review-rejections` | Triage and answer an App Store or Google Play rejection, policy warning or strike for a mobile app or game |
| `review-replies` | Reply to App Store and Google Play reviews of a mobile app or game the safe way |
| `store-analytics` | Take store analytics snapshots for a mobile app or game (App Store impressions, product page views, downloads and conversion through the Analytics Reports API; Google Play store listing visitors, acquisitions and installs from the Play reports bucket) and compare them with listing, screenshot and experiment changes from git |
| `store-declarations` | Answer the store compliance forms for a mobile app or game |
| `store-health` | Watch a released mobile app's or game's crash and ANR health on both stores |
| `store-iap-setup` | Create and price in-app purchases (consumables, non-consumables like "remove ads" or a Pro unlock, non-renewing passes, coin/gem packs, starter packs) on Google Play and App Store Connect from one product list |
| `store-preflight` | Run and read the storebound readiness checks before submitting a mobile app or game |
| `store-screenshots` | Produce store screenshots and the Play feature graphic for a mobile app or game in every required size and many languages |
| `store-subscriptions` | Set up auto-renewable subscriptions on the App Store and Google Play from one config |
| `testflight` | Run TestFlight for a mobile app or game through the App Store Connect API |
| `whats-new` | Write user-facing release notes ("What's new") for a mobile app or game update from the git log since the last tag |
| `review-rejections` | Triage and answer an App Store or Google Play rejection, policy warning or strike for a mobile game |
| `review-replies` | Reply to App Store and Google Play reviews of a mobile game the safe way |
| `store-analytics` | Take store analytics snapshots for a mobile game (App Store impressions, product page views, downloads and conversion through the Analytics Reports API; Google Play store listing visitors, acquisitions and installs from the Play reports bucket) and compare them with listing, screenshot and experiment changes from git |
| `store-declarations` | Answer the store compliance forms for a mobile game |
| `store-health` | Watch a released mobile game's crash and ANR health on both stores |
| `store-iap-setup` | Create and price in-app purchases (consumables, non-consumables like "remove ads", coin/gem packs, starter packs) on Google Play and App Store Connect from one product list |
| `store-preflight` | Run and read the storebound readiness checks before submitting a mobile game |
| `store-screenshots` | Produce store screenshots and the Play feature graphic for a mobile game in every required size and many languages |
| `testflight` | Run TestFlight for a mobile game through the App Store Connect API |
| `whats-new` | Write player-facing release notes ("What's new") for a mobile game update from the git log since the last tag |

141
README.md
View file

@ -3,32 +3,26 @@
**Website: [storebound.dev](https://storebound.dev)**
[![license: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
[![version 0.5.0](https://img.shields.io/badge/version-0.5.0-informational)](CHANGELOG.md)
[![version 0.4.0](https://img.shields.io/badge/version-0.4.0-informational)](CHANGELOG.md)
[![runtime: Bun](https://img.shields.io/badge/runtime-Bun%201.1%2B-f9f1e1)](https://bun.sh)
[![runtime dependencies: 0](https://img.shields.io/badge/runtime%20dependencies-0-brightgreen)](package.json)
[![Agent Skills: 25](https://img.shields.io/badge/Agent%20Skills-25-8a63d2)](skills)
[![Agent Skills: 21](https://img.shields.io/badge/Agent%20Skills-21-8a63d2)](skills)
[![MCP: 2026-07-28](https://img.shields.io/badge/MCP-2026--07--28-black)](#mcp-server)
**Take a mobile app or game from nothing to "Submit for review" on Google Play and the App Store: app records,
listings in every language, in-app products and subscriptions with regional prices, every questionnaire, account
deletion and review access, privacy, icons, screenshots and previews, with one config and your AI coding agent.**
**Take a mobile game from nothing to "Submit for review" on Google Play and the App Store: app records, listings in
every language, in-app products with regional prices, every questionnaire, privacy, icons, screenshots and previews,
with one config and your AI coding agent.**
Hey, I'm CRTkafa. I built this while getting my own game through both stores and hit every wall on the way: draft
apps, edits that die when you touch the Console, the "first IAP must ship with a version" dance, Data safety CSVs that
silently need one more answer, an IARC questionnaire, target audience, App Privacy labels that are saved but not
published, screenshots in 7 sizes x 14 languages... I wrote each fix down as code or as a checklist. None of those
walls is game-only: a to-do app with accounts and a subscription hits the same ones, plus a few of its own (a demo
account for the reviewer, account deletion, subscription disclosures), so storebound covers apps and games alike. It
works for me, so I open-sourced it. Use it too.
published, screenshots in 7 sizes x 14 languages... I wrote each fix down as code or as a checklist. It works for me,
so I open-sourced it. Use it too.
No account, no sign-up, no telemetry. A small Bun CLI that talks to the official store APIs,
Agent Skills that walk your AI coding tool (or you) through the parts that are still console clicks, and an MCP server
so agents can call the CLI safely. **storebound never presses Submit, Release or Publish for you.**
Pick a profile and start from honest templates: `init --profile app` (utility / productivity app, optional account,
analytics, no ads; the default), `--profile subscription-app` (accounts + auto-renewable subscriptions) or
`--profile game` (free-to-play with ads and IAP).
It keeps going after launch: TestFlight groups and testers, crash and ANR vitals against the store thresholds, review
replies you approve before they go out, prices for many products and regions from one CSV, store analytics next to
your listing changes, and App Store product page tests from your screenshot variants.
@ -37,7 +31,7 @@ your listing changes, and App Store product page tests from your screenshot vari
## The journey
Everything an app or game needs before review, in the order I do it. For each step: what storebound does through the store
Everything a game needs before review, in the order I do it. For each step: what storebound does through the store
APIs (or on your machine), what the skill walks your agent through where the stores have no public API, and what stays
your own click.
@ -49,20 +43,20 @@ your own click.
| # | step | storebound (API / local) | skill + agent (UI) | you |
|---|---|---|---|---|
| 1 | **Set up** | `init --profile app\|game\|subscription-app` (config, `store/*.md`, declarations, App Privacy and privacy templates per profile), `install --agent <tool>`, `check` | Play: service account + API access invite; App Store: API team key (`play-first-release`, `appstore-first-release`) | developer accounts; Paid Applications agreement, banking and tax; Play payments profile |
| 1 | **Set up** | `init` (config, `store/*.md`, declarations and privacy templates), `install --agent <tool>`, `check` | Play: service account + API access invite; App Store: API team key (`play-first-release`, `appstore-first-release`) | developer accounts; Paid Applications agreement, banking and tax; Play payments profile |
| 2 | **App records and bundle id** | `apple bundle` registers the bundle id, `apple status` finds the app record | App Store Connect > New App (no API); Play Console > Create app; the very first AAB upload when Play needs it from the Console | the declarations you accept when creating the Play app |
| 3 | **Builds and testers** | `play next-version-code`, `play release app.aab` (internal track), `apple next-build`, `xcodebuild` archive + upload with the API key (the skill has the commands), `apple encryption`, `apple testflight groups / what-to-test / info / distribute` (internal groups) | Play internal testers list, Apple sandbox testers (`play-first-release`, `testflight`) | `apple testflight testers` (Apple emails the invitations), external groups and Beta App Review (`distribute --submit-review`) |
| 4 | **In-app products and subscriptions** | `play products` (regional prices from USD + your overrides, activated), `apple iap` (consumable, non-consumable, non-renewing; localizations, price schedule, availability), `apple iap-review`, `apple subscriptions` (groups, levels, equalized prices, intro and promotional offers, offer codes), `play subscriptions` (base plans, regional prices, offers), `catalog diff` (both stores against one catalog) | Play license testers, Apple sandbox testers, "Add for Review" of the first IAPs and subscriptions into the version's submission, Play promo codes (`store-iap-setup`, `store-subscriptions`) | custom offer codes (`apple subscriptions --codes` asks first) |
| 4 | **In-app products** | `play products` (regional prices from USD + your overrides, activated), `apple iap` (localizations, price schedule, availability), `apple iap-review` (review screenshots) | Play license testers, Apple sandbox testers, "Add for Review" of the first IAPs into the version's submission (`store-iap-setup`) | |
| 5 | **Store listings, every language** | `play listing` (title, short / full description, contact email + website, promo video URL), `apple listing --version x --build N` (name, subtitle, description, keywords, promo text, URLs, privacy URL, manual release), `whats-new`, `check` (limits), `check --aso` | Play store settings: category and tags (`play-first-release`) | |
| 6 | **Play questionnaires** | `play data-safety`: the whole Data safety form from `dataSafety` in the config (CSV import through the API) | Policy and programs > App content, answers prepared in `store/declarations.md` (`store-declarations`): privacy policy, app access with the demo account (`review-access`), delete-account URL (`account-deletion`), ads, content rating (IARC), target audience and content, advertising ID, news, government, financial and health features; Data safety summary check | the answers themselves are your statements: the agent asks when the code does not prove them |
| 7 | **App Store questionnaires** | `apple appinfo` (categories, age rating declaration, content rights, Free price, availability), `apple encryption` (export compliance from `apple.usesNonExemptEncryption`, never guessed), `apple review-details` (contact, demo account from `.storebound/`, notes) | App Privacy nutrition labels from `store/app-privacy.md`, then **Publish** (`store-declarations`); encryption documentation when the answer is yes (`export-compliance`); the first availability record if the API refuses it | the export compliance answer (a legal statement, set once in the config) |
| 8 | **Privacy and accounts** | privacy policy page template (`init`), `privacy-manifest --ios <path>` (PrivacyInfo.xcprivacy, required-reason APIs, SDK manifests), `validate` checks the policy, delete-account and terms URLs answer | host the pages, link them in both consoles and inside the app; in-app account deletion (`privacy-policy`, `privacy-manifest`, `account-deletion`) | |
| 6 | **Play questionnaires** | `play data-safety`: the whole Data safety form from `dataSafety` in the config (CSV import through the API) | Policy and programs > App content, answers prepared in `store/declarations.md` (`store-declarations`): privacy policy, app access / sign-in details, ads, content rating (IARC), target audience and content, advertising ID, news, government, financial and health features; Data safety summary check | the answers themselves are your statements: the agent asks when the code does not prove them |
| 7 | **App Store questionnaires** | `apple appinfo` (categories, age rating declaration, content rights, Free price, availability), `apple encryption` (export compliance from `apple.usesNonExemptEncryption`, never guessed), `apple review-details` (contact + notes) | App Privacy nutrition labels from `store/app-privacy.md`, then **Publish** (`store-declarations`); encryption documentation when the answer is yes (`export-compliance`); the first availability record if the API refuses it | the export compliance answer (a legal statement, set once in the config) |
| 8 | **Privacy** | privacy policy page template (`init`), `privacy-manifest --ios <path>` (PrivacyInfo.xcprivacy, required-reason APIs, SDK manifests), `validate` checks the policy URL answers | host the page, link it in both consoles and inside the game (`privacy-policy`, `privacy-manifest`) | |
| 9 | **Icons** | `icons`: App Store 1024 without alpha, Play 512, adaptive + legacy Android launcher icons, web icons, Capacitor sources | | |
| 10 | **Screenshots and previews** | `shots capture / render / check / gallery`, `play images`, `apple screenshots`, `shots record / video`, `apple previews`, `apple ppo create / upload` (App Store product page tests from `shots` variants; see [Store art](#store-art)) | Play store listing experiments (optional, `store-screenshots`) | uploading the promo video to YouTube; `apple ppo start / stop` |
| 11 | **Validate** | `check` (offline) and `validate` (read-only on both stores: every blocker in fix order, plus the local renders) | the UI-only items `validate` cannot see (`store-preflight` lists them) | |
| 12 | **Submit** | `play release --version-code N --production draft`, `apple status` | Play: countries / regions, open the production draft and save it (`play-first-release`) | **Play: Send changes for review. App Store: Submit for Review.** |
| 13 | **After review** | `apple status --wait-review`, `apple release --phased on / pause`, `play rollout --halt`, reply drafts (`review-rejections`) | | releasing the approved version, resuming or completing a phased release or rollout (terminal commands that ask first, `release-management`) |
| 14 | **Live app** | `health [--weekly]` (crash / ANR vitals vs Play's thresholds, App Store diagnostics; also in `validate`), `reviews list / draft`, `analytics snapshot / compare`, `prices export`, `prices import --dry`, `apple ppo status` | `store-health`, `review-replies`, `store-analytics`; Play statistics come from the reports bucket (no API) | `reviews send` (approved drafts only), `prices import` (asks first) |
| 14 | **Live game** | `health [--weekly]` (crash / ANR vitals vs Play's thresholds, App Store diagnostics; also in `validate`), `reviews list / draft`, `analytics snapshot / compare`, `prices export`, `prices import --dry`, `apple ppo status` | `store-health`, `review-replies`, `store-analytics`; Play statistics come from the reports bucket (no API) | `reviews send` (approved drafts only), `prices import` (asks first) |
New personal Play developer accounts also need a closed test with 12+ testers for 14 days before production; the
`play-first-release` skill covers it.
@ -72,14 +66,13 @@ New personal Play developer accounts also need a closed test with 12+ testers fo
- **Through the API** (storebound does it): bundle id, builds on tracks, versions and build selection, listings in
every language, graphics, screenshots, app previews, in-app products and prices (also from one CSV), Play Data
safety, Apple age rating, categories, content rights, price and availability, export compliance answer, App Review
details with the demo account, subscriptions (Apple groups, levels, prices, introductory and promotional offers,
offer codes; Play base plans, regional prices, offers), phased release and staged rollout, TestFlight groups / testers / What to Test / Test Information, crash and
details, phased release and staged rollout, TestFlight groups / testers / What to Test / Test Information, crash and
ANR vitals and App Store diagnostics, review replies, App Store analytics reports, App Store Product Page
Optimization tests.
- **Console only** (no public API; the skill + your agent's browser, or you): creating the App Store Connect app record
and the Play app, Play App content (IARC content rating, target audience, ads, advertising ID, app access,
government / financial / health / news, app access with the demo account), Play category and tags, Play countries,
App Privacy labels and their Publish, adding first IAPs and subscriptions to the submission, Play promo codes, Play store listing experiments, test results of both stores' experiments.
government / financial / health / news), Play category and tags, Play countries, App Privacy labels and their
Publish, adding first IAPs to the submission, Play store listing experiments, test results of both stores' experiments.
Play store statistics have no API either: storebound reads the monthly exports from your Play reports bucket.
- **Only you**: agreements, banking and tax, and the final Send for review / Submit for Review. Releases and
rollouts after approval, Beta App Review, tester invitations, sending review replies, applying price changes and
@ -90,9 +83,9 @@ New personal Play developer accounts also need a closed test with 12+ testers fo
You need [Bun](https://bun.sh) 1.1+ (and `ffmpeg` for icons, screenshots and video).
```sh
cd my-app
cd my-game
bun add -d storebound playwright # or: bun add -d git+https://git.crt.fyi/CRT/storebound.git playwright
bunx storebound init # --profile app (default) | subscription-app | game: config, store/*.md, declarations, privacy policy, .storebound/ (gitignored)
bunx storebound init # storebound.config.ts, store/*.md, declarations, privacy policy, .storebound/ (gitignored)
# fill in storebound.config.ts and the store/ files
bunx storebound check # offline: config, copy limits, Data safety answers, products, files
```
@ -103,14 +96,11 @@ Add credentials (below), then walk the journey with dry runs first:
bunx storebound apple bundle --dry
bunx storebound play listing --dry
bunx storebound play products --dry && bunx storebound apple iap --dry
bunx storebound apple subscriptions --dry && bunx storebound play subscriptions --dry
bunx storebound apple review-details --dry # contact + demo account from .storebound/ (masked) + notes
bunx storebound play data-safety --dry --csv store/data-safety.csv
bunx storebound apple appinfo --dry
bunx storebound icons --dry
bunx storebound shots capture && bunx storebound shots render && bunx storebound shots gallery
bunx storebound validate # read-only: what still blocks a submission, per store, in fix order
bunx storebound catalog diff # read-only: products + subscriptions on both stores vs the config, prices per region
```
After launch:
@ -123,9 +113,8 @@ bunx storebound prices export && bunx storebound prices import --dry
bunx storebound analytics snapshot && bunx storebound analytics compare
```
Or ask your agent: "take my app to Google Play and the App Store", "fill in the store questionnaires", "set up the
in-app purchases and a yearly subscription with a free trial on both stores", "do both stores sell the same
catalog", "the reviewer could not sign in", "make store screenshots in 5 languages", "is my app ready to submit", "why was my
Or ask your agent: "take my game to Google Play and the App Store", "fill in the store questionnaires", "set up the
in-app purchases on both stores", "make store screenshots in 5 languages", "is my app ready to submit", "why was my
update rejected", "put build 42 on TestFlight", "how are our crash rates", "answer the new reviews", "did the new
screenshots help". The matching skill takes over.
@ -139,7 +128,6 @@ Read from environment variables, or from `.storebound/credentials.json` in your
| `ASC_KEY_ID`, `ASC_ISSUER_ID` | App Store Connect API team key (Users and Access > Integrations) |
| `ASC_P8` | path to `AuthKey_<id>.p8` (default `~/.appstoreconnect/private_keys/AuthKey_<id>.p8`) |
| `reviewContact` | (file only) App Review contact name / phone / email |
| `reviewDemoAccount` / `REVIEW_DEMO_USER`, `REVIEW_DEMO_PASSWORD` | demo account for App Review (`reviewAccess.signInRequired`); never in the config or the repo, masked in logs |
## Install for your AI tool
@ -171,11 +159,10 @@ run in the background with a log (`storebound shots render > .storebound/render.
| command | kind | what |
|---|---|---|
| `init [--profile app\|game\|subscription-app]` | local | copy the templates of a profile (default app), gitignore `.storebound/` |
| `init` | local | copy the templates, gitignore `.storebound/` |
| `install --agent <tool>` | local | skills + MCP entry for an AI tool |
| `mcp` | local | stdio MCP server wrapping the commands |
| `check` | local | config, copy limits, data safety, products, subscriptions, profile (delete-account URL, demo account, terms URL), files; warns on untranslated release notes |
| `catalog diff [--store] [--threshold 10]` | API, read-only | one catalog vs both stores: missing / extra / mismatched products and subscriptions, US and override prices, locales, offers, per-region price differences between the stores; exit 1 on mismatches |
| `check` | local | config, copy limits, data safety, products, files; warns on untranslated release notes |
| `check --aso` | local | keyword audit: App Store keyword field rules, Play stuffing / claims |
| `validate [--apple] [--play]` | API, read-only | readiness report with ordered blockers plus the local renders checks (`--no-local` skips); exit 1 while any blocker is left |
| `whats-new [--since <tag>]` | local | draft player-facing release notes from git log into both listing files |
@ -192,7 +179,6 @@ run in the background with a log (`storebound shots render > .storebound/render.
| `play listing` | API | app details, title / short / full description per language, promo video URL (`play.video`) |
| `play images [--variant b]` | API | icon, feature graphic, phone / 7" / 10" screenshots, one edit per language |
| `play products` | API | one-time products: regional prices from `convertRegionPrices` + your overrides, activate |
| `play subscriptions [--csv]` | API | subscriptions: listings + benefits, one auto-renewing base plan, regional prices, intro and extra offers, activate (plan first, asks) |
| `play data-safety` | API | Data safety form (CSV import); `--csv` writes the file |
| `play release <aab>` | API | upload + tracks (`--internal completed --production draft`, `--production inProgress --fraction 0.05`), release notes |
| `play rollout` | API | `--fraction x`, `--halt`, `--resume`, `--complete` (asks first, except halt) |
@ -210,10 +196,9 @@ run in the background with a log (`storebound shots render > .storebound/render.
| `apple listing --version x.y.z [--build N]` | API | version (manual release), the build with exactly that number, texts per locale |
| `apple screenshots [--variant b]` | API | 6.9" + 6.5" (+ 13" iPad with `apple.ipad`, + 6.3" with `apple.iphoneMedium`) per locale, MD5-idempotent |
| `apple previews [--poster 5]` | API | app preview videos per locale, checked first, MD5-idempotent, poster frame |
| `apple iap` / `apple iap-review` | API | IAPs (consumable, non-consumable, non-renewing), localizations, price schedules, availability / review screenshots |
| `apple subscriptions [--csv] [--codes]` | API | groups, subscriptions, levels, localizations, availability, equalized prices + overrides + CSV (scheduled changes), introductory and promotional offers, offer code campaigns, review screenshots (plan first, asks; custom codes only with `--codes`) |
| `apple iap` / `apple iap-review` | API | IAPs, localizations, price schedules, availability / review screenshots |
| `apple appinfo` | API | categories, age rating, content rights, Free, territories |
| `apple review-details` | API | App Review contact, demo account (from `.storebound/`, masked), notes (+ sign-in steps, where account deletion is) |
| `apple review-details` | API | App Review contact + notes |
| `apple encryption` | API | export compliance answer from `apple.usesNonExemptEncryption` (never guessed) |
| `apple release --phased on\|pause\|resume\|complete`, `--manual-release` | API | phased release, release an approved version (resume / complete / release ask first) |
| `apple next-build` | API, read-only | next safe build number |
@ -259,13 +244,13 @@ run in the background with a log (`storebound shots render > .storebound/render.
| command | kind | what |
|---|---|---|
| `shots capture [--source web\|ios-sim\|android-emu\|folder]` | local | raw frames from your running app or game |
| `shots capture [--source web\|ios-sim\|android-emu\|folder]` | local | raw frames from your running game |
| `shots fonts` | network | font subsets for your copy (Noto for CJK / Arabic / Cyrillic / Devanagari ...) |
| `shots render [--variant b \| --variants]` | local | every store size and language in the game or app style, feature graphic, contact sheet, overflow report |
| `shots render [--variant b \| --variants]` | local | every store size and language, feature graphic, contact sheet, overflow report |
| `shots jpeg` | local | JPEG q92 copies of the Play renders (about 4x faster uploads) |
| `shots check [--variants] [--json]` | local, read-only | store rules: sizes, alpha, format, bytes, counts, overflow, videos, folder frames |
| `shots gallery` | local | `<renders>/index.html` review page |
| `shots record [--source ...]` | local | app or gameplay clips: web (Chromium screencast), simulator, emulator, folder |
| `shots record [--source ...]` | local | gameplay clips: web (Chromium screencast), simulator, emulator, folder |
| `shots video [--target iphone,ipad,youtube]` | local | app previews + promo video with captions, poster, checks |
</details>
@ -273,13 +258,9 @@ run in the background with a log (`storebound shots render > .storebound/render.
## Store art
Screenshots and previews are one step of the journey, but the one that takes the longest by hand, so storebound
does a lot here. Two looks: `shots.style: 'game'` (sunburst, sparkles, badges) and `shots.style: 'app'` (calm
gradient, a clean device frame, headline + subline). Everything below was made by storebound itself from two tiny
fictional demos: [a game](examples/demo-game) ("Prism Puddle", procedural art) and [an app](examples/demo-app)
("Tidy Lists", one static page with sample data): raw frames captured from the web build, captions in several
languages, every store size, a review gallery and an app preview video. No store account needed to try it.
![App style: four calm screenshots and the feature graphic of the demo list app, rendered by storebound](https://git.crt.fyi/CRT/storebound/raw/branch/main/docs/img/app-style.jpg)
does a lot here. Everything below was made by storebound itself from [a tiny demo game](examples/demo-game) ("Prism
Puddle", fictional, procedural art): raw frames captured from the web build, captions in 4 languages, every store
size, a review gallery and an app preview video. No store account needed to try it.
![Store screenshots rendered by storebound: four scenes in English plus the hero scene in Turkish, Japanese and Arabic](https://git.crt.fyi/CRT/storebound/raw/branch/main/docs/img/showcase.jpg)
@ -298,10 +279,9 @@ languages, every store size, a review gallery and an app preview video. No store
### How it works
1. **Frames.** Give your app or game a few switches (language, demo data or a fixed seed, no ads, jump to a screen,
freeze, autoplay) and
1. **Frames.** Give your game a few switches (language, fixed seed, no ads, jump to a scene, freeze, autoplay) and
let `shots capture` take the frames: Playwright for a web build, `simctl` for anything that runs in the iOS
Simulator (Unity, Godot, Flutter, React Native, native, Capacitor), `adb` for an Android emulator or device, or bring a folder of
Simulator (Unity, Godot, Flutter, native, Capacitor), `adb` for an Android emulator or device, or bring a folder of
your own frames. The status bar is cropped off and redrawn clean (9:41, full battery).
2. **Copy.** Per language and scene: eyebrow, two-line title, subtitle, badges. Fonts are subset from Google Fonts to
exactly your characters, so Japanese, Chinese, Korean, Arabic (right to left) and Hindi just work.
@ -330,27 +310,24 @@ navigation.
| `play-first-release` | Google Play from zero to "In review" |
| `appstore-first-release` | App Store from API key to "Waiting for review", incl. xcodebuild with the API key |
| `testflight` | beta groups, testers from a CSV that never enters git, What to Test, Test Information, Beta App Review |
| `store-iap-setup` | in-app products on both stores (consumable, non-consumable, non-renewing), prices and the price sheet CSV, catalog diff, testers, the first-IAP-with-version rule |
| `store-subscriptions` | subscription groups, levels, base plans, prices, intro and promotional offers, offer codes, disclosure and Terms (3.1.2), first submission |
| `review-access` | demo account for reviewers (App Review fields, Play App access), never committed |
| `account-deletion` | Apple 5.1.1(v) in-app deletion, Play delete-account web page and Data safety |
| `store-iap-setup` | in-app products on both stores, prices and the price sheet CSV, testers, the first-IAP-with-version rule |
| `aso-basics` | keyword field, subtitle, cross-localization, Play placement without stuffing |
| `store-declarations` | every questionnaire: Play Data safety (API) and App content (IARC, target audience, ads, advertising ID, app access, government / financial / health), Apple App Privacy labels and age rating |
| `export-compliance` | encryption answer, Info.plist key, declarations; never exempt by default |
| `privacy-policy` | one policy page for all your apps with a per-app services table (templates per profile) |
| `privacy-policy` | one studio-wide policy page with a per-game services table |
| `privacy-manifest` | PrivacyInfo.xcprivacy, required-reason APIs, SDK manifests (ITMS-91053 / 91061) |
| `app-icons` | one artwork to every icon, adaptive / legacy launcher pitfalls |
| `store-screenshots` | capture from any engine, copy, fonts, render, checks, gallery, variants, App Store product page tests, Play experiments, upload |
| `app-previews` | app or gameplay clips, App Store previews, Play promo video, checks, upload |
| `app-previews` | gameplay clips, App Store previews, Play promo video, checks, upload |
| `store-preflight` | run and read `check`, `check --aso`, `validate`, `privacy-manifest` before submitting |
| `release-management` | updates: Apple phased + manual release, Play staged rollout, halt / pause (not a rollback), review wait |
| `store-health` | crash / ANR vitals vs Play's bad behavior thresholds, App Store diagnostics, weekly report |
| `review-replies` | reply drafts, tone, no incentives, store limits, the owner approves and sends |
| `store-analytics` | App Store analytics reports, Play reports bucket, before / after listing changes |
| `whats-new` | player-facing release notes from git, localized, within store limits |
| `review-rejections` | triage a rejection (fix / clarify / push back / appeal), reply template, the guidelines apps and games hit |
| `ads-mediation-checks` | AdMob, AppLovin MAX and LevelPlay: ids, debug tools, adapters, app-ads.txt, SKAdNetwork, no-fill (`ads-levelplay-checks` stays as a pointer) |
| `portfolio-originality` | Guideline 4.3 gate for developers shipping many similar apps or games |
| `review-rejections` | triage a rejection (fix / clarify / push back / appeal), reply template, the guidelines games hit |
| `ads-levelplay-checks` | LevelPlay / Unity Ads ids, adapters, app-ads.txt, SKAdNetwork, no-fill |
| `portfolio-originality` | Guideline 4.3 gate for studios shipping many similar games |
## MCP server
@ -359,13 +336,12 @@ per-request `_meta`, `resultType`, cacheable `tools/list`) and, on the same proc
`initialize` (2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05). It runs each tool as a CLI call in the project directory
(the server's working directory, or `STOREBOUND_PROJECT`) and returns the output.
- One tool per command. Read-only: `check`, `check_aso`, `validate`, `catalog_diff`, `health`, `reviews_list`, `prices_diff`,
- One tool per command. Read-only: `check`, `check_aso`, `validate`, `health`, `reviews_list`, `prices_diff`,
`analytics_compare`, `apple_status`, `apple_next_build`, `apple_testflight_status`, `apple_ppo_status`,
`play_status`, `play_next_version_code`, `privacy_manifest`, `shots_check`. Local writes: `whats_new`, `icons`,
`health_report`, `reviews_draft`, `prices_export`, `analytics_snapshot`, `shots_capture`, `shots_render`,
`shots_gallery`, `shots_record`, `shots_video`. Store writes: `play_listing`, `play_images`, `play_products`,
`play_data_safety`, `play_subscriptions`, `play_release_testing`, `apple_bundle`, `apple_iap`, `apple_iap_review`,
`apple_subscriptions`, `apple_listing`,
`play_data_safety`, `play_release_testing`, `apple_bundle`, `apple_iap`, `apple_iap_review`, `apple_listing`,
`apple_screenshots`, `apple_previews`, `apple_appinfo`, `apple_review_details`, `apple_encryption`,
`apple_phased_release`, `apple_testflight_groups`, `apple_testflight_what_to_test`, `apple_testflight_info`,
`apple_testflight_distribute` (internal groups only), `apple_ppo_create`, `apple_ppo_upload`, `analytics_setup`.
@ -385,11 +361,10 @@ absolute path of `bin/storebound` plus `mcp`).
- **Nothing public or irreversible through an agent.** Submitting for review (App Review and Beta App Review),
releasing a version, production releases, resuming or completing a rollout or phased release, canceling a
submission, deleting, inviting or removing testers, sending review replies, applying prices and starting or
stopping a product page test and creating custom offer codes are not MCP tools. Subscription syncs through MCP only
create what is new; price changes of live subscriptions wait for a terminal run. They stay terminal commands that ask for confirmation, and the skills tell every agent to ask the owner
stopping a product page test are not MCP tools. They stay terminal commands that ask for confirmation, and the skills tell every agent to ask the owner
first ([docs/agents-core.md](docs/agents-core.md)).
- **Personal data stays local.** Tester lists, the App Review demo account, reply drafts, health reports and analytics
snapshots live in the gitignored `.storebound/` (the demo account is masked in every log line); tester emails are masked in every log line, and the config refuses a tester CSV path
- **Personal data stays local.** Tester lists, reply drafts, health reports and analytics snapshots live in the
gitignored `.storebound/`; tester emails are masked in every log line, and the config refuses a tester CSV path
outside `.storebound/`.
- **Idempotent writes.** Re-running a command converges (MD5 checks for screenshots and previews, one Play edit per
language), so a failed upload is fixed by running it again.
@ -398,12 +373,6 @@ absolute path of `bin/storebound` plus `mcp`).
## FAQ
**Is it only for games?** No. It started with my game, but every command is about store records, not engines or
genres. `init --profile app` and `--profile subscription-app` give you templates for a utility app with accounts and
for a subscription app (Data safety, App Privacy, declarations, listing and screenshot copy), the `app` screenshot
style, account deletion and demo account checks, and subscriptions on both stores. Game-only advice (IARC game
questions, gameplay footage, ad mediation) is marked as such in the skills.
**Do I need Claude (or any AI tool)?** No. The CLI is a normal command and the skills are Markdown checklists you can
read yourself. The AI integrations are optional adapters generated from the same files.
@ -412,14 +381,13 @@ the config; the import replaces the form, so the config is the single truth), Ap
categories, price and availability, the export compliance answer and the App Review details. The stores have no
public API for Play's App content cards (IARC content rating, target audience, ads, advertising ID, app access,
government / financial / health / news) or for Apple's App Privacy labels. For those, `init` gives you prepared
answers (`store/declarations.md`, `store/app-privacy.md`, per profile: a utility app with an account, a subscription
app, or a free-to-play game with ads and IAP),
answers (`store/declarations.md`, `store/app-privacy.md`, written for a typical free-to-play game with ads and IAP),
and the `store-declarations` skill has the exact clicks: an agent with browser tools can fill them in while you
watch, or you copy them in yourself. Either way the answers are your statements to the stores: change what does not
match your app, and the agent asks you whenever the code does not prove an answer. `validate` cannot see these
match your game, and the agent asks you whenever the code does not prove an answer. `validate` cannot see these
forms, so `store-preflight` lists them as a manual check.
**My app or game is Unity / Godot / Flutter / React Native / native, not web.** Screenshots and clips come from the iOS Simulator
**My game is Unity / Godot / Flutter / native, not web.** Screenshots and clips come from the iOS Simulator
(`ios-sim`), an Android emulator or device (`android-emu`) or a folder you fill with any tool; only the rendering of
the store images uses a headless browser. The store commands do not care about the engine at all: they work on
your AAB / build numbers and listing files.
@ -446,12 +414,9 @@ are refused.
## Roadmap
Wave 2 (TestFlight, vitals, review replies, price sheets, analytics, MCP 2026-07-28, Product Page Optimization) shipped
in 0.4.0. 0.5.0 made storebound app-first (profiles, app screenshot style, account deletion, review access) and
brought the full in-app catalog: subscriptions on both stores with offers and offer codes, non-renewing products and
the cross-store `catalog diff`. Next, roughly in this order:
in 0.4.0. Next, roughly in this order:
- Offer codes for one-time products (`inAppPurchaseOfferCodes`), Play prepaid base plans for `non_renewing`, win-back
offers, and a `prices export` that includes subscriptions.
- Subscriptions (groups, levels, introductory offers) on both stores from the same product list.
- App Store custom product pages and in-app events from the same copy and renders.
- Play store listing experiments and their results, as soon as Google offers an API.
- App preview treatments and alternate icons in Product Page Optimization tests.
@ -487,13 +452,7 @@ Checked against each tool's own docs in October 2026:
warns), the TestFlight "What to Test" limit (4000 assumed), whether an analytics segment checksum covers the gzip
file or its content (both are accepted), that a new App Store price schedule replaces the old one (Apple's example
implies it), stopping a Product Page Optimization test with `started: false`, and `APP_IPHONE_61` for the 6.3"
iPhone set. From 0.5.0 (request bodies follow Apple's and Google's published schemas, tested with fixtures, not
yet run against a live account): free promotional offers and offer codes sent with territories but no price point,
subscription prices and introductory offers created inline through `PATCH /v1/subscriptions/{id}`, Play
pay-as-you-go offers as a `relativeDiscount`, Play "developer determined" offers as offers without targeting plus an
offer tag, the ISO 8601 strings for Play billing periods (Google lists them only in words), the Play subscription
benefit length (40, from Play Console), the Data safety sign-up method ids (`PSL_ACM_*`, Google publishes none:
compare with a Console export) and the delete-account URL question id (use `dataSafety.extra`).
iPhone set.
- **Apple IAP description**: 45 characters (App Store Connect Help, "In-app purchase information"); an older App Store
marketing page says 55. storebound checks 45.

View file

@ -1,6 +1,6 @@
// App-level App Store settings (idempotent), from apple.info in storebound.config.ts:
// storebound apple appinfo [--dry]
// - categories (primary + up to two subcategories for games, secondary)
// - categories (primary + up to two game subcategories, secondary)
// - age rating declaration: every content question NONE / false unless overridden in apple.info.ageRating
// - content rights declaration
// - price Free (USA base) and availability in every territory + new ones (when apple.info.free !== false)

View file

@ -1,5 +1,5 @@
// Register the bundle id (Certificates, Identifiers & Profiles) through the API. Idempotent.
// storebound apple bundle [--name "My App"] [--dry]
// storebound apple bundle [--name "My Game"] [--dry]
// The App Store Connect app record itself can NOT be created through the API: do that in the web UI afterwards
// (Apps > + > New App, pick this bundle id), see the appstore-first-release skill.
import type { Ctx } from '../lib/ctx';

View file

@ -15,7 +15,7 @@ import { ascClient, type J } from './asc';
export async function run(ctx: Ctx): Promise<void> {
const { config, root } = ctx.loaded;
const answer = config.apple?.usesNonExemptEncryption;
if (answer === undefined) throw new Error('apple.usesNonExemptEncryption is not set in storebound.config.ts. Decide it with the export-compliance skill (false only if the app uses no encryption beyond the OS); storebound never guesses it.');
if (answer === undefined) throw new Error('apple.usesNonExemptEncryption is not set in storebound.config.ts. Decide it with the export-compliance skill (false only if the game uses no encryption beyond the OS); storebound never guesses it.');
const dry = ctx.args.has('dry');
const c = await ascClient(root, need(config.apple?.bundleId, 'apple.bundleId'), config.apple?.appId);
const appId = await c.app();

View file

@ -4,7 +4,6 @@
// storebound apple iap [--dry] [--only id1,id2]
// Then `apple iap-review` for the review screenshots. First IAPs can only be submitted together with an app version,
// from the IAP page in the web UI (see the store-iap-setup skill).
import { sellsOn } from '../lib/config';
import { APPLE_IAP_LIMITS } from '../lib/copy';
import type { Ctx } from '../lib/ctx';
import { need } from '../lib/ctx';
@ -12,14 +11,11 @@ import { done, log, step } from '../lib/log';
import { appleTerritory, nearestPrices, samePrice } from '../lib/money';
import { ascClient, type J } from './asc';
/** Product type -> InAppPurchaseType (POST /v2/inAppPurchases). */
export const APPLE_IAP_TYPE = { consumable: 'CONSUMABLE', non_consumable: 'NON_CONSUMABLE', non_renewing: 'NON_RENEWING_SUBSCRIPTION' } as const;
export async function run(ctx: Ctx): Promise<void> {
const { config, root } = ctx.loaded;
const bundleId = need(config.apple?.bundleId, 'apple.bundleId');
const only = ctx.args.list('only');
const products = need(config.products, 'products').filter(p => (!only.length || only.includes(p.id)) && sellsOn(config, p, 'apple'));
const products = need(config.products, 'products').filter(p => !only.length || only.includes(p.id));
const dry = ctx.args.has('dry');
const c = await ascClient(root, bundleId, config.apple?.appId);
const appId = await c.app();
@ -43,7 +39,7 @@ export async function run(ctx: Ctx): Promise<void> {
if (!id) {
const first = Object.values(p.listings)[0]!;
id = (await c.asc('POST', '/v2/inAppPurchases', { data: { type: 'inAppPurchases',
attributes: { name: p.referenceName ?? first.title, productId: p.id, inAppPurchaseType: APPLE_IAP_TYPE[p.type],
attributes: { name: p.referenceName ?? first.title, productId: p.id, inAppPurchaseType: p.type === 'consumable' ? 'CONSUMABLE' : 'NON_CONSUMABLE',
familySharable: p.familySharable ?? false, ...(p.reviewNote ? { reviewNote: p.reviewNote } : {}) },
relationships: { app: { data: { type: 'apps', id: appId } } } } })).data.id;
log('apple', `${tag}: created`);

View file

@ -6,7 +6,7 @@
// create: one test (v2 experiment, platform IOS) with one treatment per variant (named after the variant, at most 3)
// and a treatment localization per App Store locale of the config. upload: the variant renders
// (<renders>/<variant>/<lang>/ios69 ... from `storebound shots render --variant b`) into each treatment localization's
// screenshot sets, MD5-idempotent like `apple screenshots`. start / stop change what users see (stop is final, a test
// screenshot sets, MD5-idempotent like `apple screenshots`. start / stop change what players see (stop is final, a test
// cannot be restarted) and ask first; they are not MCP tools. Google Play store listing experiments have no API: they
// stay in Play Console (store-screenshots skill). Pure planners: cli/lib/ppo.ts.
import { existsSync } from 'node:fs';

View file

@ -1,14 +1,11 @@
// App Review information on the editable version: contact, demo account, notes. Idempotent.
// App Review information on the editable version: contact, demo account (none), notes. Idempotent.
// storebound apple review-details [--contact-from <Apple ID of another app>] [--dry]
// The contact (name, phone, email) is personal data, so it is never in the config: it comes from
// .storebound/credentials.json "reviewContact", or is copied from another app of the same team with --contact-from.
// Demo account (reviewAccess.signInRequired: true): "reviewDemoAccount" in .storebound/credentials.json or
// REVIEW_DEMO_USER / REVIEW_DEMO_PASSWORD; masked in every log line. Notes: apple.info.reviewNotes plus
// reviewAccess.instructions and accounts.inApp (lib/review-details.ts).
// Notes: apple.info.reviewNotes in storebound.config.ts.
import type { Ctx } from '../lib/ctx';
import { need } from '../lib/ctx';
import { reviewContact, reviewDemoAccount } from '../lib/credentials';
import { reviewDetailPlan } from '../lib/review-details';
import { reviewContact } from '../lib/credentials';
import { done, log } from '../lib/log';
import { ascClient } from './asc';
@ -32,11 +29,11 @@ export async function run(ctx: Ctx): Promise<void> {
}
if (!contact) throw new Error('no review contact: add "reviewContact" to .storebound/credentials.json or pass --contact-from <app id>');
const { attributes, summary } = reviewDetailPlan(config, contact, reviewDemoAccount(root));
if (ctx.args.has('dry')) { log('apple', `would set review details (contact ${from ? 'copied from ' + from : 'from credentials'}, ${summary})`); return; }
const attributes = { ...contact, demoAccountRequired: false, demoAccountName: null, demoAccountPassword: null, notes: config.apple?.info?.reviewNotes ?? '' };
if (ctx.args.has('dry')) { log('apple', `would set review details (contact ${from ? 'copied from ' + from : 'from credentials'}, notes ${attributes.notes.length} chars)`); return; }
const cur = (await c.maybe(`/v1/appStoreVersions/${version.id}/appStoreReviewDetail`))?.data;
if (cur) await c.asc('PATCH', `/v1/appStoreReviewDetails/${cur.id}`, { data: { type: 'appStoreReviewDetails', id: cur.id, attributes } });
else await c.asc('POST', '/v1/appStoreReviewDetails', { data: { type: 'appStoreReviewDetails', attributes,
relationships: { appStoreVersion: { data: { type: 'appStoreVersions', id: version.id } } } } });
done('apple', `review details set on ${version.attributes.versionString} (${summary})`);
done('apple', `review details set on ${version.attributes.versionString} (no demo account, notes ${attributes.notes.length} chars)`);
}

View file

@ -1,182 +0,0 @@
// Auto-renewable subscriptions on App Store Connect from `subscriptions` in the config: groups and their display names,
// subscriptions (period, level, family sharing, review note), localizations, availability (every territory + new
// ones), prices (USA price point + its equalizations, your overrides, optional CSV rows from the prices sheet incl.
// future-dated changes), introductory offers per territory and the review screenshot. Idempotent: what exists is
// left alone, prices are compared per territory and only differences are sent.
// storebound apple subscriptions [--dry] [--only id1,id2] [--csv store/prices.csv] [--codes] [--yes]
// Also promotional offers (`offers`, signed by your server at purchase time) and offer code campaigns
// (`offerCodes`). Custom codes of a campaign (redeemable by anyone who has the code) are only created with --codes
// from a terminal that confirms; one-time-use codes are generated by the owner in App Store Connect.
// Prints the plan first. In a terminal it asks before writing anything. Without a terminal (MCP, CI) and without
// --yes it still creates what is new (nothing is public before App Review), but never changes prices of a
// subscription that already has them: that waits for the owner in a terminal. preserveCurrentPrice is always true
// (existing subscribers keep their price; raising theirs is a separate step in App Store Connect).
// First subscriptions are submitted with an app version, like first in-app purchases (store-subscriptions skill).
// Pure parts and sources: lib/subscriptions.ts.
import { existsSync, readFileSync } from 'node:fs';
import { type OfferCodeDef, sellsOn, type Subscription, type SubscriptionGroup } from '../lib/config';
import type { Ctx } from '../lib/ctx';
import { confirm, need } from '../lib/ctx';
import { done, log, step, warn } from '../lib/log';
import { parsePriceCsv, type PriceRow } from '../lib/prices';
import {
allSubscriptions, appleAvailabilityBody, appleCustomCodeBody, appleOfferCodeBody, applePromoOfferBody, appleGroupBody, appleGroupLocBody, appleIntroPatch, applePoints, applePriceChanges,
applePricesPatch, appleSubLocBody, appleSubPrices, appleSubscriptionBody, appleSubscriptionPlan, type AppleSubState, appleWantedPrices,
type ApplePoint, pickPoint,
} from '../lib/subscriptions';
import { pages } from '../prices';
import { type Asc, ascClient, type J } from './asc';
const TAG = 'apple';
/** CSV rows (prices sheet) of the configured subscriptions, when --csv is given. */
export function subscriptionCsv(ctx: Ctx, store: 'apple' | 'play'): PriceRow[] {
const path = ctx.args.get('csv');
if (!path) return [];
const file = ctx.loaded.resolve(path);
if (!existsSync(file)) throw new Error(`no prices CSV at ${file}`);
const { config } = ctx.loaded;
const subIds = allSubscriptions(config.subscriptions).map(x => x.sub.id);
const ids = [...(config.products ?? []).map(p => p.id), ...subIds];
return parsePriceCsv(readFileSync(file, 'utf8'), { products: ids }).filter(r => subIds.includes(r.product) && r.store === store);
}
async function readState(c: Asc, appId: string): Promise<AppleSubState> {
const state: AppleSubState = { groups: [], subscriptions: [] };
for (const g of await c.all(`/v1/apps/${appId}/subscriptionGroups?limit=200`)) {
const locales = (await c.all(`/v1/subscriptionGroups/${g.id}/subscriptionGroupLocalizations?limit=200`)).map((l: J) => l.attributes.locale);
state.groups.push({ id: g.id, referenceName: g.attributes.referenceName, locales });
for (const s of await c.all(`/v1/subscriptionGroups/${g.id}/subscriptions?limit=200`)) {
const locs = (await c.all(`/v1/subscriptions/${s.id}/subscriptionLocalizations?limit=200`)).map((l: J) => l.attributes.locale);
const prices = (await c.asc('GET', `/v1/subscriptions/${s.id}/prices?limit=1`)).data?.length ?? 0;
const intro = (await c.asc('GET', `/v1/subscriptions/${s.id}/introductoryOffers?limit=1`)).data?.length ?? 0;
const avail = !!(await c.maybe(`/v1/subscriptions/${s.id}/subscriptionAvailability`))?.data;
const shot = !!(await c.maybe(`/v1/subscriptions/${s.id}/appStoreReviewScreenshot`))?.data;
const promoOffers = (await c.all(`/v1/subscriptions/${s.id}/promotionalOffers?limit=200`)).map((o: J) => o.attributes.offerCode);
const offerCodes = (await c.all(`/v1/subscriptions/${s.id}/offerCodes?limit=200`)).map((o: J) => o.attributes.name);
state.subscriptions.push({ id: s.id, productId: s.attributes.productId, groupId: g.id, state: s.attributes.state, locales: locs,
hasPrices: prices > 0, introTerritories: intro, availability: avail, reviewScreenshot: shot, promoOffers, offerCodes });
}
}
return state;
}
export async function run(ctx: Ctx): Promise<void> {
const { config, root, resolve } = ctx.loaded;
const only = ctx.args.list('only');
const groups: SubscriptionGroup[] = need(config.subscriptions, 'subscriptions')
.map(g => ({ ...g, subscriptions: g.subscriptions.filter(s => (!only.length || only.includes(s.id)) && sellsOn(config, s, 'apple')) })).filter(g => g.subscriptions.length);
const dry = ctx.args.has('dry');
const csv = subscriptionCsv(ctx, 'apple');
const c = await ascClient(root, need(config.apple?.bundleId, 'apple.bundleId'), config.apple?.appId);
const appId = await c.app();
log(TAG, 'reading subscription groups, subscriptions, localizations, prices, offers');
const state = await readState(c, appId);
const plan = appleSubscriptionPlan(groups, config.languages, state);
for (const [i, s] of plan.entries()) log(TAG, `${step(i + 1, plan.length, s.what)}`);
if (dry) { done(TAG, `subscriptions planned (dry run, nothing written; prices are compared per territory on a real run${csv.length ? `, ${csv.length} CSV rows` : ''})`); return; }
const yes = ctx.args.has('yes');
let liveOk = yes;
if (process.stdin.isTTY && !yes) {
if (!(await confirm(ctx, 'Create / update these subscriptions on App Store Connect? Nothing is public before App Review, but price changes of existing subscriptions apply to new subscribers right away.'))) return;
liveOk = true;
} else if (!yes) log(TAG, 'not a terminal: creating what is new only; price changes of existing subscriptions wait for a terminal run');
const locale = new Map(config.languages.map(l => [l.id, l.apple] as const));
const territories: string[] = (await c.all('/v1/territories?limit=200')).map((t: J) => t.id);
for (const g of groups) {
let gid = state.groups.find(x => x.referenceName === g.name)?.id;
if (!gid) { gid = (await c.asc('POST', '/v1/subscriptionGroups', appleGroupBody(appId, g))).data.id as string; log(TAG, `group "${g.name}" created`); }
const gLocs = state.groups.find(x => x.id === gid)?.locales ?? [];
for (const [lang, l] of Object.entries(g.listings)) {
const loc = locale.get(lang);
if (!loc || gLocs.includes(loc)) continue;
await c.asc('POST', '/v1/subscriptionGroupLocalizations', appleGroupLocBody(gid, loc, l));
log(TAG, ` group ${loc}`);
}
for (const [i, s] of g.subscriptions.entries()) {
const tag = step(i + 1, g.subscriptions.length, s.id);
const cur = state.subscriptions.find(x => x.productId === s.id);
let id = cur?.id;
if (!id) { id = (await c.asc('POST', '/v1/subscriptions', appleSubscriptionBody(gid, s))).data.id as string; log(TAG, `${tag}: created`); }
for (const [lang, l] of Object.entries(s.listings)) {
const loc = locale.get(lang);
if (!loc || cur?.locales.includes(loc)) continue;
await c.asc('POST', '/v1/subscriptionLocalizations', appleSubLocBody(id, loc, l));
log(TAG, ` ${loc}`);
}
if (!cur?.availability) { await c.asc('POST', '/v1/subscriptionAvailabilities', appleAvailabilityBody(id, territories)); log(TAG, ` available in ${territories.length} territories + new ones`); }
// prices: USA point -> equalizations -> overrides / CSV; only what differs from today's prices
const usaPoints = applePoints(await pages(c, `/v1/subscriptions/${id}/pricePoints?filter[territory]=USA&include=territory&limit=200`));
const usa = pickPoint(usaPoints, 'USA', s.usd);
const equalized = applePoints(await pages(c, `/v1/subscriptionPricePoints/${usa.id}/equalizations?include=territory&limit=200`));
const known: ApplePoint[] = [usa, ...equalized];
const current = cur?.hasPrices ? appleSubPrices(await pages(c, `/v1/subscriptions/${id}/prices?include=subscriptionPricePoint,territory&limit=200`)) : [];
const changes = applePriceChanges(current, appleWantedPrices(s, equalized, csv), csv.filter(r => r.product === s.id));
if (!changes.length) log(TAG, ' prices up to date');
else if (current.length && !liveOk) warn(TAG, ` ${changes.length} price change(s) skipped: run in a terminal to confirm`);
else {
const resolved: { territory: string; pointId: string; startDate?: string | null }[] = [];
for (const ch of changes) {
let pt = known.find(p => p.territory === ch.territory && Math.round(p.price * 100) === Math.round(ch.to * 100));
if (!pt) {
const tp = applePoints(await pages(c, `/v1/subscriptions/${id}/pricePoints?filter[territory]=${ch.territory}&include=territory&limit=200`));
known.push(...tp);
pt = pickPoint(tp, ch.territory, ch.to);
}
resolved.push({ territory: ch.territory, pointId: pt.id, startDate: ch.startDate ?? null });
}
await c.asc('PATCH', `/v1/subscriptions/${id}`, applePricesPatch(id, resolved));
log(TAG, ` prices: ${changes.length} territor${changes.length === 1 ? 'y' : 'ies'}${current.length ? ' changed' : ' set'} (${changes.slice(0, 4).map(x => `${x.territory} ${x.to}${x.startDate ? ` from ${x.startDate}` : ''}`).join(', ')}${changes.length > 4 ? ', ...' : ''})`);
}
// offer prices: free = every territory without a price point; paid = the USA point of the offer price and its
// equalizations (one price per territory)
const offerPrices = async (o: { type: string; usd?: number }): Promise<{ territory: string; pointId?: string }[]> => {
if (o.type === 'free') return territories.map(territory => ({ territory }));
const ip = pickPoint(usaPoints, 'USA', o.usd!);
const eq = applePoints(await pages(c, `/v1/subscriptionPricePoints/${ip.id}/equalizations?include=territory&limit=200`));
return [{ territory: 'USA', pointId: ip.id }, ...eq.filter(p => p.territory !== 'USA').map(p => ({ territory: p.territory, pointId: p.id }))];
};
if (s.intro && !cur?.introTerritories) {
const offers = await offerPrices(s.intro);
await c.asc('PATCH', `/v1/subscriptions/${id}`, appleIntroPatch(id, s, offers));
log(TAG, ` introductory offer in ${offers.length} territories`);
}
for (const o of s.offers ?? []) {
if (cur?.promoOffers?.includes(o.id)) continue;
await c.asc('POST', '/v1/subscriptionPromotionalOffers', applePromoOfferBody(id, s, o, await offerPrices(o)));
log(TAG, ` promotional offer ${o.id}`);
}
for (const oc of s.offerCodes ?? []) {
let ocId: string | undefined;
if (!cur?.offerCodes?.includes(oc.name)) {
ocId = (await c.asc('POST', '/v1/subscriptionOfferCodes', appleOfferCodeBody(id, s, oc, await offerPrices(oc)))).data.id as string;
log(TAG, ` offer code campaign "${oc.name}"`);
}
if (oc.customCodes?.length) await customCodes(c, ctx, id, s, oc, ocId);
}
if (s.reviewScreenshot && !cur?.reviewScreenshot) {
await c.uploadAsset('subscriptionAppStoreReviewScreenshots', { subscription: { data: { type: 'subscriptions', id } } }, resolve(s.reviewScreenshot));
log(TAG, ` review screenshot ${s.reviewScreenshot}`);
}
}
}
done(TAG, 'subscriptions done (first ones are submitted with an app version: store-subscriptions skill)');
}
/** Custom codes of one offer code campaign: only with --codes, only after a confirmation in a terminal (anyone with
* the code can redeem it). Existing codes (same customCode) are left alone. */
async function customCodes(c: Asc, ctx: Ctx, subId: string, s: Subscription, oc: OfferCodeDef, ocId: string | undefined): Promise<void> {
if (!ctx.args.has('codes')) { log(TAG, ` ${oc.customCodes!.length} custom code(s) of "${oc.name}" not created (pass --codes from a terminal)`); return; }
if (!process.stdin.isTTY) { warn(TAG, ` custom codes of "${oc.name}" need a terminal confirmation`); return; }
const id = ocId ?? (await c.all(`/v1/subscriptions/${subId}/offerCodes?limit=200`)).find((x: J) => x.attributes.name === oc.name)?.id;
if (!id) throw new Error(`${s.id}: offer code campaign "${oc.name}" not found`);
const have = new Set((await c.all(`/v1/subscriptionOfferCodes/${id}/customCodes?limit=200`)).map((x: J) => x.attributes.customCode));
const todo = oc.customCodes!.filter(cc => !have.has(cc.code));
if (!todo.length) return;
if (!(await confirm({ ...ctx, args: { ...ctx.args, has: (n: string) => n !== 'yes' && ctx.args.has(n) } }, `Create ${todo.length} custom offer code(s) for ${s.id} (${todo.map(x => `${x.code} x${x.count}`).join(', ')})? Anyone with a code can redeem it.`))) return;
for (const cc of todo) { await c.asc('POST', '/v1/subscriptionOfferCodeCustomCodes', appleCustomCodeBody(id, cc)); log(TAG, ` custom code ${cc.code} (${cc.count})`); }
}

View file

@ -1,110 +0,0 @@
// Cross-store catalog parity report (read-only on both stores):
// storebound catalog diff [--store apple|play] [--threshold 10] [--json]
// One product definition (products + subscriptions in storebound.config.ts) against what exists on App Store Connect
// and Google Play: missing and extra items, kind / billing period / level mismatches, base (US) and override prices,
// localizations, offers, and a per-region price comparison between the stores (same currency, difference over
// --threshold percent). Exit 1 when an item is missing or mismatched; price differences between the stores are
// information (stores round to their own price tiers). Pure rules: lib/catalog.ts.
import { appleCurrent, pages, playProduct } from './prices';
import { ascClient, type J } from './apple/asc';
import { type CatalogRow, catalogDiff, fromApplePeriod, fromAppleType, regionOf, type StoreItem, wantedCatalog } from './lib/catalog';
import type { Ctx } from './lib/ctx';
import { done, log } from './lib/log';
import { fromMoney } from './lib/money';
import { listOneTimeProducts } from './play/products';
import { playClient } from './play/client';
import { appleSubPrices, basePlanId } from './lib/subscriptions';
import { textTable } from './lib/table';
const TAG = 'catalog';
async function appleItems(ctx: Ctx): Promise<StoreItem[]> {
const { config, root } = ctx.loaded;
const c = await ascClient(root, config.apple!.bundleId, config.apple?.appId);
const appId = await c.app();
const out: StoreItem[] = [];
const iaps = await c.all(`/v1/apps/${appId}/inAppPurchasesV2?limit=200`);
for (const [i, p] of iaps.entries()) {
log(TAG, `apple ${i + 1}/${iaps.length} ${p.attributes.productId}`);
const locales = (await c.all(`/v2/inAppPurchases/${p.id}/inAppPurchaseLocalizations?limit=50`)).map((l: J) => l.attributes.locale);
const hasSchedule = !!(await c.maybe(`/v2/inAppPurchases/${p.id}/iapPriceSchedule`))?.data;
const today = new Date().toISOString().slice(0, 10);
// today's price per territory: entries that started (or have no start), the latest start wins; manual over automatic
const rows = hasSchedule ? (await appleCurrent(c, p.id, p.attributes.productId, true)).rows.filter(r => (r.startDate ?? '') <= today)
.sort((x, y) => (x.kind === 'auto' ? 0 : 1) - (y.kind === 'auto' ? 0 : 1) || (x.startDate ?? '').localeCompare(y.startDate ?? '')) : [];
const byRegion = new Map(rows.map(r => [r.region, r] as const));
out.push({ id: p.attributes.productId, kind: fromAppleType(p.attributes.inAppPurchaseType), state: p.attributes.state, locales,
prices: [...byRegion.values()].map(r => ({ region: r.region, currency: r.currency, price: r.price })) });
}
for (const g of await c.all(`/v1/apps/${appId}/subscriptionGroups?limit=200`)) {
for (const s of await c.all(`/v1/subscriptionGroups/${g.id}/subscriptions?limit=200`)) {
log(TAG, `apple subscription ${s.attributes.productId}`);
const locales = (await c.all(`/v1/subscriptions/${s.id}/subscriptionLocalizations?limit=200`)).map((l: J) => l.attributes.locale);
const prices = appleSubPrices(await pages(c, `/v1/subscriptions/${s.id}/prices?include=subscriptionPricePoint,territory&limit=200`)).filter(p => !p.startDate);
const intro = (await c.asc('GET', `/v1/subscriptions/${s.id}/introductoryOffers?limit=1`)).data?.length ? ['intro'] : [];
const promos = (await c.all(`/v1/subscriptions/${s.id}/promotionalOffers?limit=200`)).map((o: J) => o.attributes.offerCode as string);
const codes = (await c.all(`/v1/subscriptions/${s.id}/offerCodes?limit=200`)).map((o: J) => `code:${o.attributes.name}`);
out.push({ id: s.attributes.productId, kind: 'subscription', state: s.attributes.state, period: fromApplePeriod(s.attributes.subscriptionPeriod),
level: s.attributes.groupLevel, locales, prices: prices.map(p => ({ region: regionOf(p.territory), currency: p.currency ?? '', price: p.price })),
offers: [...intro, ...promos, ...codes] });
}
}
return out;
}
async function playItems(ctx: Ctx): Promise<StoreItem[]> {
const { config, root } = ctx.loaded;
const play = await playClient(root, config.play!.packageName);
const out: StoreItem[] = [];
for (const { productId } of await listOneTimeProducts(play)) {
log(TAG, `play ${productId}`);
const p = await playProduct(play, productId);
if (!p) continue;
const opt = p.purchaseOptions?.find(o => o.purchaseOptionId === 'buy') ?? p.purchaseOptions?.[0];
out.push({ id: productId, kind: 'one_time', state: opt?.state, locales: ((p.listings as { languageCode: string }[] | undefined) ?? []).map(l => l.languageCode),
prices: (opt?.regionalPricingAndAvailabilityConfigs ?? []).filter(r => r.price && r.availability !== 'NO_LONGER_AVAILABLE').map(r => ({ region: r.regionCode, currency: r.price!.currencyCode, price: fromMoney(r.price!) })) });
}
let page = '';
do {
const r = await play.call<{ subscriptions?: J[]; nextPageToken?: string }>('GET', `${play.API}/subscriptions?pageSize=100${page ? '&pageToken=' + page : ''}`);
for (const s of r.subscriptions ?? []) {
log(TAG, `play subscription ${s.productId}`);
const subCfg = config.subscriptions?.flatMap(g => g.subscriptions).find(x => x.id === s.productId);
const bpId = subCfg ? basePlanId(subCfg) : undefined;
const plans: J[] = s.basePlans ?? [];
const bp = plans.find(b => b.basePlanId === bpId) ?? plans.find(b => b.autoRenewingBasePlanType?.billingPeriodDuration === subCfg?.period) ?? plans[0];
const offers = bp ? ((await play.call<{ subscriptionOffers?: { offerId: string }[] }>('GET', `${play.API}/subscriptions/${encodeURIComponent(s.productId)}/basePlans/${bp.basePlanId}/offers`)).subscriptionOffers ?? []).map(o => o.offerId) : [];
out.push({ id: s.productId, kind: 'subscription', state: bp?.state, period: bp?.autoRenewingBasePlanType?.billingPeriodDuration ?? bp?.prepaidBasePlanType?.billingPeriodDuration,
locales: (s.listings ?? []).map((l: J) => l.languageCode),
prices: (bp?.regionalConfigs ?? []).filter((x: J) => x.price).map((x: J) => ({ region: x.regionCode, currency: x.price.currencyCode, price: fromMoney(x.price) })), offers });
}
page = r.nextPageToken ?? '';
} while (page);
return out;
}
export async function run(ctx: Ctx): Promise<void> {
const { config } = ctx.loaded;
const a = ctx.args;
if (a._[0] !== 'diff') throw new Error('usage: storebound catalog diff [--store apple|play] [--threshold 10] [--json]');
const store = a.get('store');
if (store && store !== 'apple' && store !== 'play') throw new Error('--store apple | play');
const want = wantedCatalog(config);
const apple = (!store || store === 'apple') && config.apple ? await appleItems(ctx) : null;
const play = (!store || store === 'play') && config.play ? await playItems(ctx) : null;
const { rows, parity } = catalogDiff(want, { apple, play }, { threshold: a.num('threshold', 10) / 100 });
const errors = rows.filter(r => r.level === 'error').length;
if (a.has('json')) console.log(JSON.stringify({ errors, rows, parity }, null, 2));
else {
console.log(formatRows(rows));
if (parity.length) console.log(`\nprice differences between the stores (same currency, over ${a.num('threshold', 10)} %):\n` +
textTable(['product', 'region', 'currency', 'apple', 'play', 'diff %'], parity.map(p => [p.id, p.region, p.currency, p.apple.toFixed(2), p.play.toFixed(2), p.diffPct.toFixed(1)])));
}
done(TAG, `${want.length} catalog items: ${errors} mismatch(es), ${rows.filter(r => r.level === 'warn').length} warning(s), ${parity.length} price difference(s) between the stores`);
if (errors) process.exitCode = 1;
}
export function formatRows(rows: CatalogRow[]): string {
const tag = { error: 'ERROR', warn: 'warn ', ok: 'ok ' } as const;
return rows.map(r => `${tag[r.level]} [${r.store}] ${r.id}: ${r.msg}`).join('\n') || 'no catalog items';
}

View file

@ -1,6 +1,5 @@
// Offline sanity check of everything the store commands read: config, both listing files, the screenshot copy, data
// safety answers, product texts vs store limits, the app profile (accounts + deletion, demo account for review,
// subscriptions + terms URL) and the files the config points at. No network; credentials are only checked for presence.
// safety answers, product texts vs store limits, and the files the config points at. No network, no credentials.
// storebound check everything above
// storebound check --aso keyword audit of both listing files (App Store keyword field, Play stuffing); exit 1 on errors
import { existsSync, readFileSync } from 'node:fs';
@ -9,10 +8,7 @@ import { playCodes } from './lib/config';
import { APPLE_IAP_LIMITS, len, parseAppStoreListing, parsePlayListing } from './lib/copy';
import type { Ctx } from './lib/ctx';
import { dataSafetyRows } from './lib/data-safety';
import { reviewDemoAccount } from './lib/credentials';
import { log, warn } from './lib/log';
import { profileIssues } from './lib/profile';
import { allSubscriptions } from './lib/subscriptions';
import { type CopyFile, validateCopy } from './shots/lib';
function aso(ctx: Ctx): void {
@ -63,13 +59,8 @@ export async function run(ctx: Ctx): Promise<void> {
if (e.length) throw new Error(e.join('; '));
return `${Object.keys(copy).length} languages x ${config.shots!.scenes.length} scenes`;
});
for (const i of profileIssues(config, { demoAccount: !!reviewDemoAccount(ctx.loaded.root) })) {
if (i.level === 'error') problems.push(i.msg); else warn('check', i.msg);
}
const subs = allSubscriptions(config.subscriptions);
if (subs.length) log('check', `subscriptions: ${subs.length} in ${config.subscriptions!.length} group(s)`);
const files = [config.icons?.composite, config.icons?.foreground, config.icons?.background, config.shots?.logo,
...(config.products ?? []).map(p => p.reviewScreenshot), ...subs.map(x => x.sub.reviewScreenshot)].filter((f): f is string => !!f);
...(config.products ?? []).map(p => p.reviewScreenshot)].filter((f): f is string => !!f);
for (const f of new Set(files)) if (!existsSync(resolve(f))) problems.push(`missing file: ${f}`);
if (existsSync(resolve('.gitignore')) && !/^\/?\.storebound\/?$/m.test(readFileSync(resolve('.gitignore'), 'utf8')))
problems.push('.gitignore does not ignore .storebound/ (credentials live there)');

View file

@ -1,4 +1,4 @@
// Crash and vitals health of the released app or game, read-only on both stores.
// Crash and vitals health of the released game, read-only on both stores.
// storebound health [--apple] [--play] [--days 7] [--json]
// storebound health --weekly [--out .storebound/health] [--dry] also writes <date>.md (+ <date>.json for the next
// comparison); --dry prints the report instead of writing it

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bun
// storebound: ship a mobile app or game to Google Play and the App Store from the terminal.
// storebound: ship a mobile game to Google Play and the App Store from the terminal.
// Run `storebound help` for the command list. Config: storebound.config.ts; credentials: env or .storebound/.
import { parseArgs } from './lib/args';
import { loadConfig } from './lib/config';
@ -9,22 +9,20 @@ type Mod = { run(ctx: Ctx): Promise<void> };
type Plain = { run(args: ReturnType<typeof parseArgs>): Promise<void> };
/** Commands that work without a storebound.config.ts. */
const PLAIN: Record<string, [() => Promise<Plain>, string]> = {
'init': [() => import('./init'), 'copy the templates (config, listing, copy, declarations, privacy policy) into this project; --profile app|game|subscription-app (default app)'],
'init': [() => import('./init'), 'copy the templates (config, listing, copy, privacy policy) into this project'],
'install': [() => import('./install'), 'skills + MCP server for --agent claude|codex|cursor|copilot|windsurf|gemini|opencode'],
'mcp': [async () => ({ run: async () => (await import('./mcp')).serve() }), 'stdio MCP server wrapping these commands (for any MCP-capable AI tool)'],
'privacy-manifest': [() => import('./privacy-manifest'), 'iOS PrivacyInfo.xcprivacy + required-reason API + SDK manifest scan (--ios <path>)'],
};
const COMMANDS: Record<string, [() => Promise<Mod>, string]> = {
'check': [() => import('./check'), 'validate config, copy files, data safety answers, products, subscriptions and the app profile (offline); --aso keyword audit'],
'check': [() => import('./check'), 'validate config, copy files, data safety answers and products (offline); --aso keyword audit'],
'validate': [() => import('./validate'), 'read-only store readiness report with ordered blockers (--apple / --play), plus local renders checks (--no-local skips); exit 1 on blockers'],
'analytics': [() => import('./analytics'), 'setup (App Store report request) | snapshot (impressions, page views, installs, conversion -> .storebound/analytics) | compare (vs listing changes in git)'],
'health': [() => import('./health'), 'crash / ANR vitals (Play) and diagnostics (App Store), read-only; --weekly writes a markdown report; exit 1 over a threshold'],
'catalog': [() => import('./catalog'), 'diff: cross-store parity of products + subscriptions (missing / extra / mismatched, prices per region, offers); read-only, exit 1 on mismatches'],
'prices': [() => import('./prices'), 'export | import a CSV of product x store x region prices (diff first, asks before writing; Apple future-dated changes)'],
'reviews': [() => import('./reviews'), 'list | draft (local reply drafts in .storebound/replies) | send (approved drafts only, asks first)'],
'whats-new': [() => import('./whats-new'), 'draft user-facing release notes from git log into the listing files (--since <tag>)'],
'whats-new': [() => import('./whats-new'), 'draft player-facing release notes from git log into the listing files (--since <tag>)'],
'play products': [() => import('./play/products'), 'one-time products: create / update, regional prices, activate'],
'play subscriptions': [() => import('./play/subscriptions'), 'auto-renewable subscriptions: listings, base plan, regional prices, intro offer, activate (--csv prices sheet; asks first)'],
'play listing': [() => import('./play/listing'), 'app details + title / short / full description per language'],
'play images': [() => import('./play/images'), 'icon, feature graphic, phone / 7" / 10" screenshots per language; --variant <id>'],
'play data-safety': [() => import('./play/data-safety'), 'Data safety form (CSV import through the API)'],
@ -34,12 +32,11 @@ const COMMANDS: Record<string, [() => Promise<Mod>, string]> = {
'play next-version-code': [() => import('./play/next-version-code'), 'next free versionCode (prints the number)'],
'apple bundle': [() => import('./apple/bundle'), 'register the bundle id; finds the app record'],
'apple iap': [() => import('./apple/iap'), 'in-app purchases, localizations, price schedules, availability'],
'apple subscriptions': [() => import('./apple/subscriptions'), 'subscription groups, subscriptions, localizations, prices (equalized + overrides + --csv), intro offers, availability, review screenshot (asks first)'],
'apple iap-review': [() => import('./apple/iap-review'), 'IAP review screenshots + product states'],
'apple listing': [() => import('./apple/listing'), 'version, build, name / subtitle / description / keywords per locale'],
'apple screenshots': [() => import('./apple/screenshots'), '6.9" + 6.5" (+ 13" iPad) screenshots per locale; --variant <id>'],
'apple appinfo': [() => import('./apple/appinfo'), 'categories, age rating, content rights, Free price, territories'],
'apple review-details': [() => import('./apple/review-details'), 'App Review contact, demo account (from .storebound/, masked) + notes'],
'apple review-details': [() => import('./apple/review-details'), 'App Review contact + notes'],
'apple status': [() => import('./apple/status'), 'versions, builds, IAPs, review submissions (--wait-review, --cancel-submission <id>)'],
'apple previews': [() => import('./apple/previews'), 'app preview videos per locale (MD5-idempotent, poster frame time code); --dry'],
'apple release': [() => import('./apple/release'), 'phased release on|pause|resume|complete, --manual-release (asks first)'],
@ -53,13 +50,13 @@ const COMMANDS: Record<string, [() => Promise<Mod>, string]> = {
'shots render': [() => import('./shots/render'), 'store screenshots + feature graphic in every size and language'],
'shots jpeg': [() => import('./shots/jpeg'), 'JPEG q92 copies of the Play renders (4x faster uploads)'],
'shots check': [() => import('./shots/check'), 'local store checks of the renders (size, alpha, counts, overflow) and folder frames; --variants, --json'],
'shots record': [() => import('./shots/record'), 'app or gameplay clips for app previews: --source web (playwright video) | ios-sim (simctl recordVideo) | android-emu (screenrecord) | folder; --dry'],
'shots record': [() => import('./shots/record'), 'gameplay clips for app previews: --source web (playwright video) | ios-sim (simctl recordVideo) | android-emu (screenrecord) | folder; --dry'],
'shots video': [() => import('./shots/video'), 'App Store app previews (886x1920, 1200x1600) + YouTube promo video from the clips, captions, poster, store checks; --dry'],
'shots gallery': [() => import('./shots/gallery'), 'review page <renders>/index.html: every language, size, scene and variant, issues highlighted'],
};
function help(): void {
console.log(`storebound · take mobile apps and games from nothing to Submit for review on Google Play and the App Store
console.log(`storebound · ship mobile games to Google Play and the App Store
usage: storebound <command> [options]
@ -67,7 +64,7 @@ ${Object.entries(PLAIN).map(([k, [, d]]) => ` ${k.padEnd(25)} ${d}`).join('\n')
${Object.entries(COMMANDS).map(([k, [, d]]) => ` ${k.padEnd(25)} ${d}`).join('\n')}
common options: --config <path> --dry (no writes) --only <ids> --yes (skip confirmations)
credentials: PLAY_SERVICE_ACCOUNT, ASC_KEY_ID, ASC_ISSUER_ID, ASC_P8, REVIEW_DEMO_USER / REVIEW_DEMO_PASSWORD (env or .storebound/credentials.json)
credentials: PLAY_SERVICE_ACCOUNT, ASC_KEY_ID, ASC_ISSUER_ID, ASC_P8 (env or .storebound/credentials.json)
docs: README.md and the skills/ folder of the toolchain`);
}

View file

@ -1,18 +1,12 @@
// Copies the templates into the current project without overwriting anything, and makes sure .storebound/ is ignored.
// storebound init [--dir .] [--profile app|game|subscription-app]
// Profiles (default app): app = utility / productivity app with an optional account and analytics, no ads;
// game = free-to-play game with ads and in-app purchases (the templates storebound shipped before 0.5.0);
// subscription-app = accounts plus auto-renewable subscriptions. Each profile has its own config, declarations,
// App Privacy answers, Data safety section, listing copy and screenshot copy; every answer is a starting point to edit.
// Lookup per file: templates/profiles/<profile>/<file>, then the profile it builds on, then templates/<file>.
// storebound init [--dir .]
import { appendFileSync, copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
import { dirname, join, resolve } from 'node:path';
import type { Args } from './lib/args';
import { type AppProfile, PROFILES } from './lib/config';
import { log } from './lib/log';
const T = join(import.meta.dir, '..', 'templates');
export const FILES: [string, string][] = [
const FILES: [string, string][] = [
['storebound.config.ts', 'storebound.config.ts'],
['listing.md', 'store/listing.md'],
['appstore.md', 'store/appstore.md'],
@ -24,29 +18,13 @@ export const FILES: [string, string][] = [
['testers.csv', '.storebound/testers.csv'],
];
/** Template folders a profile reads from, most specific first. game = the root templates. */
const CHAIN: Record<AppProfile, string[]> = {
'game': [T],
'app': [join(T, 'profiles', 'app'), T],
'subscription-app': [join(T, 'profiles', 'subscription-app'), join(T, 'profiles', 'app'), T],
};
/** Source file of one template for a profile. Pure apart from existsSync. */
export function templateFor(profile: AppProfile, name: string): string {
for (const dir of CHAIN[profile]) if (existsSync(join(dir, name))) return join(dir, name);
throw new Error(`template ${name} not found`);
}
export async function run(args: Args): Promise<void> {
const root = resolve(args.str('dir', '.'));
const profile = args.str('profile', 'app') as AppProfile;
if (!PROFILES.includes(profile)) throw new Error(`--profile ${profile}: one of ${PROFILES.join(', ')}`);
log('init', `profile ${profile} (templates are starting points: edit every answer to match your app)`);
for (const [from, to] of FILES) {
const dest = join(root, to);
if (existsSync(dest)) { log('init', `keep ${to} (exists)`); continue; }
mkdirSync(dirname(dest), { recursive: true });
copyFileSync(templateFor(profile, from), dest);
copyFileSync(join(T, from), dest);
log('init', `create ${to}`);
}
const gi = join(root, '.gitignore');
@ -56,5 +34,5 @@ export async function run(args: Args): Promise<void> {
else writeFileSync(gi, '# storebound: credentials, fonts, temp files\n.storebound/\n');
log('init', '.gitignore: added .storebound/');
}
log('init', 'next: edit storebound.config.ts, store/*.md and .storebound/credentials.json, then `storebound check`');
log('init', 'next: edit storebound.config.ts and .storebound/credentials.json, then `storebound check`');
}

View file

@ -1,4 +1,4 @@
// Put the storebound skills and MCP server into an app or game project for one or more AI coding tools.
// Put the storebound skills and MCP server into a game project for one or more AI coding tools.
// storebound install --agent claude|codex|cursor|copilot|windsurf|gemini|opencode[,...] [--dir .] [--dry]
// [--no-skills] [--no-mcp] [--command "bunx storebound"]
// Skills are copied to the tool's skills folder (our own skill folders are updated, nothing else is touched). The MCP

View file

@ -1,141 +0,0 @@
// Cross-store catalog parity, as pure parts: one product definition (products + subscriptions in the config) against
// what exists on the App Store and on Google Play. `storebound catalog diff` collects the store side (read-only) and
// prints these rows. Kinds compared: Apple CONSUMABLE / NON_CONSUMABLE / NON_RENEWING_SUBSCRIPTION / auto-renewable
// subscriptions; Play one-time products (every non-subscription kind) and subscriptions (base plan billing period).
import { type ShipConfig, playCodes, type ProductType, sellsOn, type Platform } from './config';
import { ALPHA3 } from './money';
import { allSubscriptions, offerId } from './subscriptions';
export type Kind = ProductType | 'subscription';
export type Store = 'apple' | 'play';
/** One product as a store has it. Prices: what applies today, one per region (ISO alpha-2), in the local currency. */
export interface StoreItem {
id: string;
/** Apple: the IAP type or subscription; Play: 'one_time' or 'subscription'. */
kind: Kind | 'one_time';
state?: string;
/** Subscriptions: ISO period (P1M ...); Apple level inside the group. */
period?: string;
level?: number;
locales: string[];
prices: { region: string; currency: string; price: number }[];
/** Offer ids (Play offer ids; Apple: "intro" when there is an introductory offer, promotional offer codes,
* "code:<name>" for offer code campaigns). */
offers?: string[];
}
export interface WantItem {
id: string;
kind: Kind;
stores: Store[];
period?: string;
level?: number;
usd: number;
overrides: { region: string; currency: string; price: number }[];
locales: Record<Store, string[]>;
offers: Record<Store, string[]>;
}
export interface CatalogRow { id: string; store: Store; level: 'error' | 'warn' | 'ok'; code: string; msg: string }
export interface ParityRow { id: string; region: string; currency: string; apple: number; play: number; diffPct: number }
const APPLE_PERIOD: Record<string, string> = { ONE_WEEK: 'P1W', ONE_MONTH: 'P1M', TWO_MONTHS: 'P2M', THREE_MONTHS: 'P3M', SIX_MONTHS: 'P6M', ONE_YEAR: 'P1Y' };
const APPLE_KIND: Record<string, Kind> = { CONSUMABLE: 'consumable', NON_CONSUMABLE: 'non_consumable', NON_RENEWING_SUBSCRIPTION: 'non_renewing' };
/** App Store Connect subscriptionPeriod / inAppPurchaseType -> catalog values. */
export const fromApplePeriod = (p: string | undefined): string | undefined => (p ? APPLE_PERIOD[p] ?? p : undefined);
export const fromAppleType = (t: string | undefined): Kind | 'one_time' => APPLE_KIND[t ?? ''] ?? 'one_time';
/** The config's catalog per store (products + subscriptions, `platforms` respected). */
export function wantedCatalog(config: ShipConfig): WantItem[] {
const langs = config.languages;
const appleLoc = (ids: string[]) => ids.map(id => langs.find(l => l.id === id)?.apple).filter((x): x is string => !!x);
const playLoc = (ids: string[]) => ids.flatMap(id => { const l = langs.find(x => x.id === id); return l ? playCodes(l) : []; });
const stores = (item: { platforms?: Platform[] }): Store[] => (['apple', 'play'] as const).filter(s => sellsOn(config, item, s));
const out: WantItem[] = [];
for (const p of config.products ?? []) {
const ids = Object.keys(p.listings);
out.push({ id: p.id, kind: p.type, stores: stores(p), usd: p.usd, overrides: (p.overrides ?? []).map(o => ({ region: o.region, currency: o.currency, price: o.price })),
locales: { apple: appleLoc(ids), play: playLoc(ids) }, offers: { apple: [], play: [] } });
}
for (const { sub } of allSubscriptions(config.subscriptions)) {
const ids = Object.keys(sub.listings);
out.push({ id: sub.id, kind: 'subscription', stores: stores(sub), period: sub.period, level: sub.level, usd: sub.usd,
overrides: (sub.overrides ?? []).map(o => ({ region: o.region, currency: o.currency, price: o.price })),
locales: { apple: appleLoc(ids), play: playLoc(ids) },
offers: {
apple: [...(sub.intro ? ['intro'] : []), ...(sub.offers ?? []).map(o => o.id), ...(sub.offerCodes ?? []).map(o => `code:${o.name}`)],
play: [...(sub.intro ? [offerId(sub)] : []), ...(sub.offers ?? []).map(o => o.id)],
} });
}
return out;
}
const cents = (n: number) => Math.round(n * 100);
const fmt = (n: number) => (Math.round(n * 100) / 100).toFixed(2);
/**
* Config vs both stores. `state.apple` / `state.play` null = that store was not read (no section / --store). Rows:
* missing (error), extra on the store (warn), kind / billing period (error), Apple level (warn), base price (US) and
* override regions (error), missing localizations and offers (warn). Parity: regions both stores price in the same
* currency, where the prices differ by more than `threshold` (default 10 %).
*/
export function catalogDiff(want: WantItem[], state: { apple: StoreItem[] | null; play: StoreItem[] | null }, o: { threshold?: number } = {}): { rows: CatalogRow[]; parity: ParityRow[] } {
const rows: CatalogRow[] = [];
const parity: ParityRow[] = [];
const add = (id: string, store: Store, level: CatalogRow['level'], code: string, msg: string) => rows.push({ id, store, level, code, msg });
const threshold = o.threshold ?? 0.1;
for (const store of ['apple', 'play'] as const) {
const items = state[store];
if (!items) continue;
const have = new Map(items.map(i => [i.id, i] as const));
for (const w of want.filter(x => x.stores.includes(store))) {
const h = have.get(w.id);
if (!h) { add(w.id, store, 'error', 'missing', `not on ${store === 'apple' ? 'App Store Connect' : 'Google Play'} (storebound ${store} ${w.kind === 'subscription' ? 'subscriptions' : store === 'apple' ? 'iap' : 'products'})`); continue; }
const kindOk = store === 'play' ? (w.kind === 'subscription') === (h.kind === 'subscription') : h.kind === w.kind;
if (!kindOk) { add(w.id, store, 'error', 'kind', `${h.kind} on the store, ${w.kind} in the config (a product type cannot change: use a new id)`); continue; }
if (w.period && h.period && w.period !== h.period) add(w.id, store, 'error', 'period', `bills every ${h.period} on the store, ${w.period} in the config`);
if (store === 'apple' && w.level !== undefined && h.level !== undefined && w.level !== h.level) add(w.id, store, 'warn', 'level', `group level ${h.level} on the store, ${w.level} in the config`);
const price = new Map(h.prices.map(p => [p.region, p] as const));
const us = price.get('US');
if (!h.prices.length) add(w.id, store, 'error', 'price', 'no prices on the store');
else if (!us) add(w.id, store, 'warn', 'price', 'no US price on the store');
else if (cents(us.price) !== cents(w.usd)) add(w.id, store, 'error', 'price', `US ${fmt(us.price)} USD on the store, ${fmt(w.usd)} in the config`);
for (const ov of w.overrides) {
const p = price.get(ov.region);
if (!p) add(w.id, store, 'error', 'price', `${ov.region}: no price on the store, ${ov.price} ${ov.currency} in the config`);
else if (p.currency !== ov.currency || cents(p.price) !== cents(ov.price)) add(w.id, store, 'error', 'price', `${ov.region}: ${fmt(p.price)} ${p.currency} on the store, ${fmt(ov.price)} ${ov.currency} in the config`);
}
const missingLoc = w.locales[store].filter(l => !h.locales.includes(l));
if (missingLoc.length) add(w.id, store, 'warn', 'locale', `no ${store === 'apple' ? 'localization' : 'listing'} for ${missingLoc.join(', ')}`);
const missingOffers = w.offers[store].filter(x => !(h.offers ?? []).includes(x));
if (missingOffers.length) add(w.id, store, 'warn', 'offer', `offers missing: ${missingOffers.join(', ')}`);
if (!rows.some(r => r.id === w.id && r.store === store)) add(w.id, store, 'ok', 'ok', `${w.kind}${w.period ? ` ${w.period}` : ''}, ${h.prices.length} region prices${h.state ? `, ${h.state}` : ''}`);
}
const known = new Set(want.map(w => w.id));
for (const h of items) if (!known.has(h.id)) add(h.id, store, 'warn', 'extra', `on the store but not in the config (${h.kind}${h.state ? `, ${h.state}` : ''})`);
}
if (state.apple && state.play) {
const a = new Map(state.apple.map(i => [i.id, i] as const));
const p = new Map(state.play.map(i => [i.id, i] as const));
for (const w of want) {
const ai = a.get(w.id), pi = p.get(w.id);
if (!ai || !pi) continue;
const pp = new Map(pi.prices.map(x => [x.region, x] as const));
for (const ap of ai.prices) {
const q = pp.get(ap.region);
if (!q || q.currency !== ap.currency || !(ap.price > 0) || !(q.price > 0)) continue;
const diff = Math.abs(ap.price - q.price) / Math.max(ap.price, q.price);
if (diff > threshold) parity.push({ id: w.id, region: ap.region, currency: ap.currency, apple: ap.price, play: q.price, diffPct: Math.round(diff * 1000) / 10 });
}
}
}
const rank = { error: 0, warn: 1, ok: 2 } as const;
rows.sort((x, y) => rank[x.level] - rank[y.level] || x.id.localeCompare(y.id) || x.store.localeCompare(y.store));
parity.sort((x, y) => y.diffPct - x.diffPct || x.id.localeCompare(y.id) || x.region.localeCompare(y.region));
return { rows, parity };
}
/** Apple territory (alpha-3) -> region (alpha-2). */
const A2 = Object.fromEntries(Object.entries(ALPHA3).map(([a2, a3]) => [a3, a2]));
export const regionOf = (territory: string): string => A2[territory] ?? territory;

View file

@ -1,19 +1,11 @@
// Per-project config (storebound.config.ts at the project root). Everything app-specific lives here; credentials never
// Per-project config (storebound.config.ts at the project root). Everything game-specific lives here; credentials never
// do (see credentials.ts). The file default-exports a plain object; `import type { ShipConfig }` is optional.
import { existsSync } from 'node:fs';
import { dirname, isAbsolute, join, resolve } from 'node:path';
import { validateCapture, validateRecord } from '../shots/devices';
import { validateSubscriptions } from './subscriptions';
import { type TfConfig, validateTestflight } from './testflight';
/** consumable / non_consumable: both stores. non_renewing: Apple NON_RENEWING_SUBSCRIPTION (access for a fixed time,
* you track the expiry); Google Play has no such type, so it becomes a one-time product your app consumes when the
* access ends (or model it as a prepaid base plan in Play Console). */
export type ProductType = 'consumable' | 'non_consumable' | 'non_renewing';
/** Which stores sell an item (app identity: one catalog, per-platform availability). Default: every store the config
* has a section for (apple = iOS / iPadOS App Store, play = Google Play). */
export type Platform = 'ios' | 'android';
export type ProductType = 'consumable' | 'non_consumable';
export interface PriceOverride {
/** ISO 3166-1 alpha-2 region for Play, e.g. "TR". */
@ -44,8 +36,6 @@ export interface Product {
/** Apple only: review screenshot (path relative to the project root). */
reviewScreenshot?: string;
familySharable?: boolean;
/** Sell this product only on these platforms (default: all of app.platforms). */
platforms?: Platform[];
}
export interface Language {
@ -78,13 +68,6 @@ export interface DataSafety {
accountCreation?: string[];
/** Play data type id (e.g. "PSL_DEVICE_ID") -> usage. Types not listed are "not collected". */
data: Record<string, DataUsage>;
/**
* Extra CSV rows for questions storebound does not model, appended as they are. Google does not publish every
* question id (e.g. the delete-account URL asked when accountCreation is not PSL_ACM_NONE): export the form from
* Play Console (App content > Data safety > Export to CSV), copy the exact ids from it, e.g.
* { question: '<id from the export>', value: 'https://example.com/delete-account' }.
*/
extra?: { question: string; response?: string; value: string; label?: string }[];
}
export interface ShotBadgeSlot { y: number; side: 'l' | 'r'; icon?: string; iconBg?: string; hot?: boolean; stars?: boolean; rot?: number }
@ -93,10 +76,6 @@ export interface Palette { bg: [string, string, string]; glow: string; ink: stri
export interface ShotScene { id: string; palette: string | Palette; hero?: boolean; frames: ShotFrame[]; badges?: ShotBadgeSlot[]; over?: number }
export interface ShotsConfig {
/** Look of the rendered screenshots: game (sunburst, sparkles, badges, bold outlined titles) or app (calm gradient,
* device frame, headline + subline, no sparkles or badges). Default: app for the app / subscription-app profiles,
* else game. */
style?: 'game' | 'app';
/** JSON file: { [languageId]: { [sceneId]: { eyebrow, title: [line1, line2], sub, badges: [[big, small?]] } } } */
copy: string;
/** Raw frames: <frames>/<languageId>/<phone|tablet>/<name>.png */
@ -144,7 +123,7 @@ export interface ShotSpec {
export interface ShotsCapture {
/** Where frames come from. Default "web". */
source?: 'web' | 'ios-sim' | 'android-emu' | 'folder';
/** web: URL of the running app or game, e.g. http://127.0.0.1:5173 */
/** web: URL of the running game, e.g. http://127.0.0.1:5173 */
baseUrl?: string;
/** web: appended to every URL, e.g. "lang={lang}&noads=1". */
query?: string;
@ -277,157 +256,16 @@ export interface AppleAppInfo {
reviewNotes?: string;
}
/** What kind of app this is. Picks the `init` templates, the default screenshot style and the profile checks of
* `check` / `validate`. game = free-to-play game with ads + IAP; app = utility / productivity app (optional account,
* analytics, no ads); subscription-app = app with accounts and auto-renewable subscriptions. */
export type AppProfile = 'game' | 'app' | 'subscription-app';
export const PROFILES: readonly AppProfile[] = ['app', 'game', 'subscription-app'];
/** Accounts in the app (sign-up / sign-in). Both stores then want account deletion: Apple 5.1.1(v) inside the app,
* Google Play inside the app and on the web (the URL goes into Data safety). See the account-deletion skill. */
export interface AccountsConfig {
/** The app lets people create an account (or sign in with one you create for them). */
enabled: boolean;
/** Public https page where people request account + data deletion without the app (Play "Delete account URL"). */
deletionUrl?: string;
/** Where deletion starts inside the app, e.g. "Settings > Account > Delete account" (goes into the review notes). */
inApp?: string;
}
/** How a reviewer gets past a sign-in (App Review demo account, Play App content > App access). The credentials
* themselves are never in the config: "reviewDemoAccount" in .storebound/credentials.json or REVIEW_DEMO_USER /
* REVIEW_DEMO_PASSWORD. See the review-access skill. */
export interface ReviewAccess {
/** Some or all features need a sign-in: App Review gets demoAccountRequired + the demo account. */
signInRequired: boolean;
/** Steps for the reviewer, appended to the App Review notes, e.g. "Sign in with the demo account, open Projects." */
instructions?: string;
}
export type SubscriptionPeriod = 'P1W' | 'P1M' | 'P2M' | 'P3M' | 'P6M' | 'P1Y';
/** Introductory offer for new subscribers. Apple: subscriptionIntroductoryOffers (first-time subscribers of the group,
* per territory). Play: an offer on the base plan for users who never had this subscription. */
export interface IntroOffer {
/** free = free trial; pay-as-you-go = a lower price for `periods` billing periods; pay-up-front = one price for `duration`. */
type: 'free' | 'pay-as-you-go' | 'pay-up-front';
/** free / pay-up-front: P3D, P1W, P2W, P1M, P2M, P3M, P6M or P1Y. pay-as-you-go: the subscription period (default). */
duration?: string;
/** pay-as-you-go: number of discounted periods (1-12). */
periods?: number;
/** pay-as-you-go: price per period, pay-up-front: the whole price, in USD (Apple: equalized price points; Play: converted). */
usd?: number;
/** Play offer id (lowercase letters, digits, hyphens). Default "intro". */
playOfferId?: string;
}
/** A promotional / developer-determined offer. Apple: subscriptionPromotionalOffers (offerCode = id). Play: a base
* plan offer with offer tag = id and no acquisition targeting (your app decides who sees it). */
export interface SubscriptionOfferDef {
/** Apple offer code / Play offer id: lowercase letters, digits, hyphens (Play rule; Apple accepts it too). */
id: string;
/** Apple reference name (default: the id). */
name?: string;
type: 'free' | 'pay-as-you-go' | 'pay-up-front';
/** free / pay-up-front: P3D ... P1Y; pay-as-you-go: the subscription period (default). */
duration?: string;
/** pay-as-you-go: number of discounted periods (1-12). */
periods?: number;
/** USD price (per period for pay-as-you-go, total for pay-up-front). */
usd?: number;
}
/** Apple subscription offer code campaign. Custom codes (e.g. "SPRING26") are created only from a terminal run that
* confirms; one-time-use codes are generated by you in App Store Connect (or later with the API). */
export interface OfferCodeDef {
/** Reference name of the offer code campaign. */
name: string;
/** Who may redeem: NEW (never subscribed), EXISTING, EXPIRED. */
eligibility: ('NEW' | 'EXISTING' | 'EXPIRED')[];
/** true = stack with the introductory offer (STACK_WITH_INTRO_OFFERS), false = replace it (default). */
stackWithIntro?: boolean;
type: 'free' | 'pay-as-you-go' | 'pay-up-front';
duration?: string;
periods?: number;
usd?: number;
/** Custom codes: the code, how many redemptions, optional expiry (YYYY-MM-DD). */
customCodes?: { code: string; count: number; expires?: string }[];
}
export interface SubscriptionListing {
/** Apple display name (30) / Play title. */
title: string;
/** Apple description (45) / Play description. */
description: string;
/** Play only: up to 4 benefits shown on the purchase screen (40 characters each). */
benefits?: string[];
}
export interface Subscription {
/** Product id, same on both stores, e.g. "com.example.app.pro_monthly". */
id: string;
period: SubscriptionPeriod;
/** Rank inside the group, 1 = highest level of service (Apple groupLevel; up / downgrades follow it). */
level: number;
/** Base price per period in USD. Apple: the USA price point and its equalizations; Play: convertRegionPrices. */
usd: number;
/** Regions set by hand (Apple needs a price point with exactly that value). */
overrides?: PriceOverride[];
/** Language id -> display name + description (+ Play benefits). */
listings: Record<string, SubscriptionListing>;
/** Apple only: internal reference name (defaults to the first listing title). */
referenceName?: string;
/** Apple only: note for the reviewer on this subscription. */
reviewNote?: string;
/** Apple only: review screenshot of the purchase screen (path relative to the project root). */
reviewScreenshot?: string;
familySharable?: boolean;
intro?: IntroOffer;
/** More offers people get when your app decides (Apple promotional offers, signed by your server; Play offers
* without acquisition targeting, picked by offer tag in your app). */
offers?: SubscriptionOfferDef[];
/** Apple subscription offer codes (redeemed in the App Store or in the app), with optional custom codes. */
offerCodes?: OfferCodeDef[];
/** Sell this subscription only on these platforms (default: all of app.platforms). */
platforms?: Platform[];
/** Play base plan id (lowercase letters, digits, hyphens). Default from the period: weekly, monthly, yearly, ... */
basePlanId?: string;
/** Play grace period (ISO 8601: P3D, P7D, P14D, P30D). Default: Play's default. */
gracePeriod?: string;
}
/** One subscription group. Apple: a subscription group (people can hold one subscription per group and move between
* its levels). Play has no groups: each subscription becomes a Play subscription with one auto-renewing base plan. */
export interface SubscriptionGroup {
/** Apple reference name of the group (internal, unique per app). */
name: string;
/** Language id -> group display name on the App Store (+ optional custom app name). */
listings: Record<string, { name: string; customAppName?: string }>;
subscriptions: Subscription[];
}
export interface ShipConfig {
app: {
name: string;
/** game | app | subscription-app (see AppProfile). Default: game for configs written before 0.5.0. */
profile?: AppProfile;
/** App identity: the platforms this one app ships on. Default: ios when there is an `apple` section, android when
* there is a `play` section. `apple` / `play` hold the per-platform settings; languages, listings, products and
* subscriptions are shared, with `platforms` on an item to sell it on one store only. */
platforms?: Platform[];
copyright?: string;
privacyPolicyUrl: string;
/** Terms of Use / EULA page. Needed with subscriptions (Apple 3.1.2: in the app and in the metadata). */
termsUrl?: string;
supportUrl: string;
marketingUrl?: string;
website: string;
contactEmail: string;
};
/** Accounts in the app: account deletion checks (Apple 5.1.1(v), Play Data safety delete-account URL). */
accounts?: AccountsConfig;
/** Sign-in for store reviewers (demo account; credentials live in .storebound/ only). */
reviewAccess?: ReviewAccess;
languages: Language[];
play?: {
packageName: string; defaultLanguage?: string; listing?: string; icon?: string;
@ -440,7 +278,7 @@ export interface ShipConfig {
apple?: {
bundleId: string; appId?: string; primaryLocale?: string; listing?: string; info?: AppleAppInfo; reviewShots?: string;
/**
* Export compliance answer for every build (`storebound apple encryption`, `validate`). false ONLY when the app uses
* Export compliance answer for every build (`storebound apple encryption`, `validate`). false ONLY when the game uses
* no encryption beyond what the OS provides (HTTPS / TLS through the system, standard auth). Never set it to false
* to skip the question: a wrong answer is a legal problem, not a store one. Unset = storebound will not answer.
*/
@ -460,8 +298,6 @@ export interface ShipConfig {
testflight?: TfConfig;
};
products?: Product[];
/** Auto-renewable subscriptions (`storebound apple subscriptions`, `storebound play subscriptions`). */
subscriptions?: SubscriptionGroup[];
/** Price sheet for `storebound prices export | import` (product x store x region). */
prices?: {
/** CSV path. Default store/prices.csv. */
@ -478,22 +314,6 @@ export interface ShipConfig {
icons?: IconsConfig;
}
/** Platforms of the app (app identity): app.platforms, else from the store sections. */
export const platformsOf = (c: Pick<ShipConfig, 'app' | 'apple' | 'play'>): Platform[] =>
c.app.platforms ?? [...(c.apple ? ['ios' as const] : []), ...(c.play ? ['android' as const] : [])];
/** Is a catalog item (product / subscription) sold on this store? Pure. */
export const sellsOn = (c: Pick<ShipConfig, 'app' | 'apple' | 'play'>, item: { platforms?: Platform[] }, store: 'apple' | 'play'): boolean => {
const p: Platform = store === 'apple' ? 'ios' : 'android';
return platformsOf(c).includes(p) && (!item.platforms || item.platforms.includes(p));
};
/** The profile of a config: app.profile, else "game" (configs written before profiles existed were games). */
export const profileOf = (c: Pick<ShipConfig, 'app'>): AppProfile => c.app.profile ?? 'game';
/** Screenshot style: shots.style, else app for the app / subscription-app profiles, else game. */
export const shotsStyle = (c: Pick<ShipConfig, 'app' | 'shots'>): 'game' | 'app' => c.shots?.style ?? (profileOf(c) === 'game' ? 'game' : 'app');
/** Identity helper for typed configs: `export default defineConfig({...})`. */
export const defineConfig = (c: ShipConfig): ShipConfig => c;
@ -513,21 +333,7 @@ export function validateConfig(c: unknown): string[] {
for (const k of ['privacyPolicyUrl', 'supportUrl', 'website'] as const) if (!URL_RE.test(app[k] ?? '')) e.push(`app.${k}: must be an https URL`);
if (app.marketingUrl && !URL_RE.test(app.marketingUrl)) e.push('app.marketingUrl: must be an https URL');
if (!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(app.contactEmail ?? '')) e.push('app.contactEmail: not an email address');
if (app.termsUrl && !URL_RE.test(app.termsUrl)) e.push('app.termsUrl: must be an https URL');
if (app.profile !== undefined && !PROFILES.includes(app.profile)) e.push(`app.profile: one of ${PROFILES.join(', ')}`);
if (app.platforms !== undefined) {
if (!Array.isArray(app.platforms) || !app.platforms.length || !app.platforms.every(x => x === 'ios' || x === 'android')) e.push('app.platforms: a list of ios | android');
else {
if (app.platforms.includes('ios') && !cfg.apple) e.push('app.platforms: ios needs an apple section');
if (app.platforms.includes('android') && !cfg.play) e.push('app.platforms: android needs a play section');
}
}
}
if (cfg.accounts) {
if (typeof cfg.accounts.enabled !== 'boolean') e.push('accounts.enabled: true | false');
if (cfg.accounts.deletionUrl !== undefined && !URL_RE.test(cfg.accounts.deletionUrl)) e.push('accounts.deletionUrl: must be an https URL');
}
if (cfg.reviewAccess && typeof cfg.reviewAccess.signInRequired !== 'boolean') e.push('reviewAccess.signInRequired: true | false');
const langs = cfg.languages;
if (!Array.isArray(langs) || !langs.length) e.push('languages: at least one language');
const ids = new Set<string>();
@ -557,8 +363,7 @@ export function validateConfig(c: unknown): string[] {
if (!PRODUCT_RE.test(p.id ?? '')) e.push(`${at}.id: letters, digits, "." and "_" only`);
if (seen.has(p.id)) e.push(`${at}.id: duplicate "${p.id}"`);
seen.add(p.id);
if (p.type !== 'consumable' && p.type !== 'non_consumable' && p.type !== 'non_renewing') e.push(`${at}.type: consumable | non_consumable | non_renewing`);
if (p.platforms !== undefined && !(Array.isArray(p.platforms) && p.platforms.length && p.platforms.every(x => x === 'ios' || x === 'android'))) e.push(`${at}.platforms: a list of ios | android`);
if (p.type !== 'consumable' && p.type !== 'non_consumable') e.push(`${at}.type: consumable | non_consumable`);
if (!(typeof p.usd === 'number' && p.usd > 0)) e.push(`${at}.usd: positive number`);
if (!p.listings || !Object.keys(p.listings).length) e.push(`${at}.listings: at least one language`);
for (const [lang, l] of Object.entries(p.listings ?? {})) {
@ -573,7 +378,6 @@ export function validateConfig(c: unknown): string[] {
if (!(o.price > 0)) e.push(`${at}.overrides: price must be positive`);
}
}
e.push(...validateSubscriptions(cfg.subscriptions, ids, seen));
if (cfg.prices?.baseTerritory && !/^[A-Z]{3}$/.test(cfg.prices.baseTerritory)) e.push('prices.baseTerritory: App Store territory, alpha-3 (USA)');
if (cfg.dataSafety) {
for (const [t, u] of Object.entries(cfg.dataSafety.data ?? {})) {
@ -581,13 +385,10 @@ export function validateConfig(c: unknown): string[] {
if (!u.collect?.length) e.push(`dataSafety.data.${t}: at least one collection purpose`);
if (u.shared && !u.share?.length) e.push(`dataSafety.data.${t}: shared, so it needs sharing purposes`);
}
for (const [i, x] of (cfg.dataSafety.extra ?? []).entries()) if (!/^[A-Z][A-Z0-9_:]+$/.test(x?.question ?? '') || typeof x.value !== 'string')
e.push(`dataSafety.extra[${i}]: { question: "<PSL_... id from a Play Console export>", value: "..." }`);
}
if (cfg.shots) {
const s = cfg.shots;
for (const k of ['copy', 'frames', 'out'] as const) if (!s[k]) e.push(`shots.${k}: missing`);
if (s.style !== undefined && s.style !== 'game' && s.style !== 'app') e.push('shots.style: game | app');
if (!s.scenes?.length) e.push('shots.scenes: at least one scene');
for (const sc of s.scenes ?? []) if (!sc.frames?.length) e.push(`shots.scenes[${sc.id}].frames: at least one frame`);
e.push(...validateCapture(s.capture));

View file

@ -3,9 +3,7 @@
// ASC_P8 (path to AuthKey_<id>.p8, or the PEM itself)
// 2. <project>/.storebound/credentials.json (gitignored), same names:
// { "PLAY_SERVICE_ACCOUNT": "...", "ASC_KEY_ID": "...", "ASC_ISSUER_ID": "...", "ASC_P8": "...",
// "reviewContact": { "firstName": "", "lastName": "", "phone": "", "email": "" },
// "reviewDemoAccount": { "username": "", "password": "" } }
// The demo account for App Review can also come from env: REVIEW_DEMO_USER, REVIEW_DEMO_PASSWORD.
// "reviewContact": { "firstName": "", "lastName": "", "phone": "", "email": "" } }
// 3. ASC_P8 only: ~/.appstoreconnect/private_keys/AuthKey_<ASC_KEY_ID>.p8 (where Xcode / altool keep it)
import { existsSync, readFileSync } from 'node:fs';
import { homedir } from 'node:os';
@ -61,22 +59,3 @@ export function reviewContact(root: string): ReviewContact | null {
if (!c?.email) return null;
return { firstName: c.firstName ?? '', lastName: c.lastName ?? '', phone: c.phone ?? '', email: c.email };
}
export interface DemoAccount { username: string; password: string }
/** App Review demo account (sign-in for the reviewer): env REVIEW_DEMO_USER + REVIEW_DEMO_PASSWORD, else
* "reviewDemoAccount" in .storebound/credentials.json. Never in the config or the repo. */
export function reviewDemoAccount(root: string): DemoAccount | null {
const eu = process.env.REVIEW_DEMO_USER, ep = process.env.REVIEW_DEMO_PASSWORD;
if (eu && ep) return { username: eu, password: ep };
const d = fileStore(root).reviewDemoAccount as Partial<DemoAccount> | undefined;
if (typeof d?.username === 'string' && d.username && typeof d.password === 'string' && d.password) return { username: d.username, password: d.password };
return null;
}
/** For logs: "d***@example.com" / "d***"; a password is never shown, only its length class. */
export const maskUser = (u: string): string => {
const at = u.indexOf('@');
return at > 0 ? `${u[0]}***${u.slice(at)}` : `${u[0] ?? ''}***`;
};
export const maskSecret = (s: string): string => (s ? '********' : '(empty)');

View file

@ -63,7 +63,6 @@ export function dataSafetyRows(ds: DataSafety): string[][] {
for (const p of PURPOSES) rows.push([q('DATA_USAGE_COLLECTION_PURPOSE'), p, pick(collect.has(p)), 'MULTIPLE_CHOICE', label + ' / Collection purpose']);
for (const p of PURPOSES) rows.push([q('DATA_USAGE_SHARING_PURPOSE'), p, pick(share.has(p)), 'MULTIPLE_CHOICE', label + ' / Sharing purpose']);
}
for (const x of ds.extra ?? []) rows.push([x.question, x.response ?? '', x.value, x.response ? 'MULTIPLE_CHOICE' : 'MAYBE_REQUIRED', x.label ?? x.question]);
return rows;
}

View file

@ -1,4 +1,4 @@
// Crash and vitals health of a released app or game, as pure parts: request builders, response parsers, threshold findings
// Crash and vitals health of a released game, as pure parts: request builders, response parsers, threshold findings
// and the report. `storebound health` and `storebound validate` collect the data (read-only) and use these.
//
// Google Play Developer Reporting API v1beta1 (scope playdeveloperreporting; the service account needs "View app

View file

@ -8,7 +8,7 @@ export const REQUIRED_REASON_APIS: Record<string, { symbols: RegExp; reasons: st
NSPrivacyAccessedAPICategoryUserDefaults: {
symbols: /\b(NSUserDefaults|UserDefaults)\b/,
reasons: ['CA92.1', '1C8F.1', 'C56D.1', 'AC6B.1'],
note: 'CA92.1 = read / write data only this app uses (typical for app data, game saves and settings)',
note: 'CA92.1 = read / write data only this app uses (typical for game saves and settings)',
},
NSPrivacyAccessedAPICategoryFileTimestamp: {
symbols: /\b(creationDate|modificationDate|fileModificationDate|contentModificationDateKey|creationDateKey|NSFileCreationDate|NSFileModificationDate|getattrlist|fstatat|lstat)\b/,
@ -28,7 +28,7 @@ export const REQUIRED_REASON_APIS: Record<string, { symbols: RegExp; reasons: st
NSPrivacyAccessedAPICategoryActiveKeyboards: {
symbols: /\bactiveInputModes\b/,
reasons: ['3EC4.1', '54BD.1'],
note: 'rare in apps and games',
note: 'rare in games',
},
};

View file

@ -1,36 +0,0 @@
// Offline profile checks for `storebound check`: what an app with accounts, a sign-in for review or subscriptions
// must have in the config before any store sees it. Pure. The online counterparts (URLs answer, the demo account is
// on App Review, subscription states) are in validate-rules.ts (profileRules, appleSubscriptionRules).
import { profileOf, type ShipConfig } from './config';
import { allSubscriptions } from './subscriptions';
export interface ProfileIssue { level: 'error' | 'warn'; msg: string }
export function profileIssues(config: ShipConfig, o: { demoAccount: boolean }): ProfileIssue[] {
const out: ProfileIssue[] = [];
const err = (msg: string) => out.push({ level: 'error', msg });
const warn = (msg: string) => out.push({ level: 'warn', msg });
const accounts = !!config.accounts?.enabled;
const acm = config.dataSafety?.accountCreation ?? ['PSL_ACM_NONE'];
if (accounts) {
if (config.play && !config.accounts!.deletionUrl) err('accounts.enabled: set accounts.deletionUrl (Play asks for a web page to request account deletion; account-deletion skill)');
if (config.apple && !config.accounts!.inApp) warn('accounts.enabled: set accounts.inApp to where deletion starts in the app (Apple 5.1.1(v); it goes into the review notes)');
if (config.dataSafety) {
if (acm.includes('PSL_ACM_NONE')) err('accounts.enabled but dataSafety.accountCreation says PSL_ACM_NONE: list the sign-up methods you offer');
if (!config.dataSafety.deletionRequest) err('accounts.enabled but dataSafety.deletionRequest is false: people must be able to delete their account and data');
}
} else if (config.dataSafety && !acm.includes('PSL_ACM_NONE')) warn('dataSafety.accountCreation lists sign-up methods but accounts.enabled is not set: add accounts { enabled: true, deletionUrl, inApp }');
if (config.reviewAccess?.signInRequired) {
if (!o.demoAccount) err('reviewAccess.signInRequired: no demo account ("reviewDemoAccount" in .storebound/credentials.json, or REVIEW_DEMO_USER / REVIEW_DEMO_PASSWORD; review-access skill)');
if (!config.reviewAccess.instructions) warn('reviewAccess.instructions: tell the reviewer how to sign in and where the main features are');
} else if (accounts && config.reviewAccess === undefined) warn('the app has accounts: set reviewAccess { signInRequired } so App Review and Play App access get a demo account when needed');
const subs = allSubscriptions(config.subscriptions);
if (subs.length) {
if (!config.app.termsUrl) err('subscriptions: set app.termsUrl (Terms of Use / EULA, linked in the app and the metadata; Apple 3.1.2)');
if (config.apple && subs.some(x => !x.sub.reviewScreenshot)) warn(`subscriptions without reviewScreenshot: ${subs.filter(x => !x.sub.reviewScreenshot).map(x => x.sub.id).join(', ')} (App Store review needs one each)`);
}
const p = profileOf(config);
if (p === 'subscription-app' && !subs.length) warn('app.profile is subscription-app but there are no subscriptions in the config');
if (p === 'game' && config.shots?.style === 'app') warn('app.profile is game but shots.style is app (fine if intended)');
return out;
}

View file

@ -1,41 +0,0 @@
// App Review information as pure parts: the appStoreReviewDetails attributes from the config, the review contact and
// the demo account, plus the notes (review notes, sign-in instructions, where account deletion is). Apple: the notes
// field takes up to 4000 bytes; a demo account must keep working during the whole review (Guideline 2.1).
// https://developer.apple.com/help/app-store-connect/reference/app-information/platform-version-information
// https://developer.apple.com/documentation/appstoreconnectapi/appstorereviewdetail/attributes-data.dictionary
import type { ShipConfig } from './config';
import { type DemoAccount, maskSecret, maskUser } from './credentials';
export const NOTES_MAX_BYTES = 4000;
/** Notes for the reviewer: apple.info.reviewNotes, then reviewAccess.instructions, then where account deletion is. */
export function reviewNotes(config: Pick<ShipConfig, 'apple' | 'reviewAccess' | 'accounts'>): string {
const parts = [config.apple?.info?.reviewNotes?.trim() ?? ''];
const ins = config.reviewAccess?.instructions?.trim();
if (ins && !parts[0]!.includes(ins)) parts.push(`Sign-in: ${ins}`);
const del = config.accounts?.enabled ? config.accounts.inApp?.trim() : '';
if (del && !parts.join('\n').includes(del)) parts.push(`Account deletion: ${del}`);
return parts.filter(Boolean).join('\n\n');
}
export interface ReviewDetailPlan {
attributes: Record<string, string | boolean | null>;
/** Log line without secrets. */
summary: string;
}
/**
* Attributes for POST / PATCH appStoreReviewDetails. With reviewAccess.signInRequired the demo account is required
* (throws when it is missing, so a submission never goes out with "sign-in required" and no account); without it the
* demo fields are cleared.
*/
export function reviewDetailPlan(config: Pick<ShipConfig, 'apple' | 'reviewAccess' | 'accounts'>, contact: Record<string, string>, demo: DemoAccount | null): ReviewDetailPlan {
const notes = reviewNotes(config);
const bytes = new TextEncoder().encode(notes).length;
if (bytes > NOTES_MAX_BYTES) throw new Error(`review notes are ${bytes} bytes; App Store Connect takes ${NOTES_MAX_BYTES}`);
const required = !!config.reviewAccess?.signInRequired;
if (required && !demo) throw new Error('reviewAccess.signInRequired is true but there is no demo account: add "reviewDemoAccount": { "username", "password" } to .storebound/credentials.json (or set REVIEW_DEMO_USER / REVIEW_DEMO_PASSWORD); see the review-access skill');
const attributes = { ...contact, demoAccountRequired: required, demoAccountName: required ? demo!.username : null, demoAccountPassword: required ? demo!.password : null, notes };
const summary = `${required ? `demo account ${maskUser(demo!.username)} / ${maskSecret(demo!.password)}` : 'no demo account (no sign-in needed)'}, notes ${bytes} bytes`;
return { attributes, summary };
}

View file

@ -72,7 +72,7 @@ export function filterReviews(rs: Review[], o: { since?: string; unanswered?: bo
/** File name of a draft: <store>-<review id>.md with unsafe characters replaced. */
export const draftName = (r: Pick<Review, 'store' | 'id'>): string => `${r.store}-${r.id.replace(/[^A-Za-z0-9._-]/g, '_').slice(0, 120)}.md`;
export const REPLY_PLACEHOLDER = '<!-- Write the reply below. Plain text, the reviewer\'s language. -->';
export const REPLY_PLACEHOLDER = '<!-- Write the reply below. Plain text, the player\'s language. -->';
/** A new draft: front matter (approved: false), the review as a quote, an empty "## Reply" section. */
export function draftMarkdown(r: Review): string {
@ -125,7 +125,7 @@ export function checkReply(reply: string, store: ReviewStore): ReplyIssue[] {
if (store === 'play' && n > REPLY_LIMITS.play) e.push({ level: 'error', msg: `${n} > ${REPLY_LIMITS.play} characters (Google Play limit)` });
if (store === 'apple' && n > REPLY_LIMITS.apple) e.push({ level: 'warn', msg: `${n} characters: App Store Connect is reported to stop at ${REPLY_LIMITS.apple}` });
if (INCENTIVE.some(re => re.test(text))) e.push({ level: 'error', msg: 'offers something for a rating or asks to change / give stars: not allowed (no incentives, no rating manipulation)' });
if (/[^@\s]+@[^@\s]+\.[a-z]{2,}/i.test(text)) e.push({ level: 'warn', msg: 'contains an email address: only your public support address, never a user\'s' });
if (/[^@\s]+@[^@\s]+\.[a-z]{2,}/i.test(text)) e.push({ level: 'warn', msg: 'contains an email address: only your public support address, never a player\'s' });
if (/(\+?\d[\d\s().-]{7,}\d)/.test(text)) e.push({ level: 'warn', msg: 'contains a phone-like number: no personal data in public replies' });
if (/https?:\/\//i.test(text)) e.push({ level: 'warn', msg: 'contains a link: support pages only, no marketing' });
if (/[A-Z]{6,}/.test(text) || /!{3,}/.test(text)) e.push({ level: 'warn', msg: 'shouting (caps / !!!): keep it calm' });

View file

@ -1,507 +0,0 @@
// Auto-renewable subscriptions on both stores, as pure parts: config checks, the period / offer mappings, the App
// Store Connect request bodies and plan, and the Google Play subscription / base plan / offer bodies and diff.
// The commands (cli/apple/subscriptions.ts, cli/play/subscriptions.ts) read the current state, call these, print the
// plan and only then write.
// Sources (checked October 2026):
// Apple: subscription groups, group localizations, subscriptions, subscription localizations, price points and their
// equalizations, subscription prices, introductory offers, availability, review screenshots.
// https://developer.apple.com/documentation/appstoreconnectapi/subscription-groups
// https://developer.apple.com/documentation/appstoreconnectapi/subscriptions
// https://developer.apple.com/documentation/appstoreconnectapi/subscription-prices
// https://developer.apple.com/documentation/appstoreconnectapi/subscription-price-points
// https://developer.apple.com/documentation/appstoreconnectapi/subscription-introductory-offers
// https://developer.apple.com/documentation/appstoreconnectapi/subscription-availabilities
// Google Play: monetization.subscriptions (create / patch / list), basePlans:activate, basePlans.offers (create,
// activate), pricing:convertRegionPrices.
// https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.subscriptions
// https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans
// https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers
import type { IntroOffer, Language, OfferCodeDef, PriceOverride, Subscription, SubscriptionGroup, SubscriptionOfferDef, SubscriptionPeriod } from './config';
import { playCodes } from './config';
import { ALPHA3, type Money, toMoney } from './money';
import type { PriceRow } from './prices';
// ---- mappings ----
export const PERIODS: readonly SubscriptionPeriod[] = ['P1W', 'P1M', 'P2M', 'P3M', 'P6M', 'P1Y'];
/** Subscription.subscriptionPeriod on App Store Connect. */
export const APPLE_PERIOD: Record<SubscriptionPeriod, string> = {
P1W: 'ONE_WEEK', P1M: 'ONE_MONTH', P2M: 'TWO_MONTHS', P3M: 'THREE_MONTHS', P6M: 'SIX_MONTHS', P1Y: 'ONE_YEAR',
};
/** SubscriptionOfferDuration on App Store Connect (introductory offers). */
export const APPLE_OFFER_DURATION: Record<string, string> = {
P3D: 'THREE_DAYS', P1W: 'ONE_WEEK', P2W: 'TWO_WEEKS', P1M: 'ONE_MONTH', P2M: 'TWO_MONTHS', P3M: 'THREE_MONTHS', P6M: 'SIX_MONTHS', P1Y: 'ONE_YEAR',
};
/** SubscriptionOfferMode on App Store Connect. */
export const APPLE_OFFER_MODE = { 'free': 'FREE_TRIAL', 'pay-as-you-go': 'PAY_AS_YOU_GO', 'pay-up-front': 'PAY_UP_FRONT' } as const;
/** Default Play base plan id per period. */
export const DEFAULT_BASE_PLAN: Record<SubscriptionPeriod, string> = {
P1W: 'weekly', P1M: 'monthly', P2M: 'every-2-months', P3M: 'quarterly', P6M: 'every-6-months', P1Y: 'yearly',
};
/** Play subscription listing limits: description 200 and at most 4 benefits (Subscription resource reference);
* 40 characters per benefit is the Play Console field limit (not in the API reference). */
export const PLAY_SUB_LIMITS = { description: 200, benefits: 4, benefit: 40 } as const;
/** Apple subscription display name / description (same limits as other in-app purchases: 30 / 45). */
export const APPLE_SUB_LIMITS = { name: 30, description: 45 } as const;
const PRODUCT_RE = /^[a-z0-9][a-z0-9._]*$/;
const PLAY_ID_RE = /^[a-z0-9][a-z0-9-]{0,62}$/;
const GRACE = ['P3D', 'P7D', 'P14D', 'P30D'];
const len = (s: string): number => [...s].length;
export const basePlanId = (s: Subscription): string => s.basePlanId ?? DEFAULT_BASE_PLAN[s.period];
export const offerId = (s: Subscription): string => s.intro?.playOfferId ?? 'intro';
/** Any offer's phase length: free / pay-up-front as configured, pay-as-you-go = one subscription period. */
export const offerDuration = (s: Subscription, o: { type: string; duration?: string } | undefined): string =>
(o?.type === 'pay-as-you-go' ? o.duration ?? s.period : o?.duration ?? '');
/** Intro offer duration. */
export const introDuration = (s: Subscription): string => offerDuration(s, s.intro);
type OfferLike = Pick<IntroOffer, 'type' | 'duration' | 'periods' | 'usd'>;
/** Checks shared by intro offers, promotional offers and offer codes. */
function validateOffer(at: string, s: Subscription, o: OfferLike): string[] {
const e: string[] = [];
if (!(o.type in APPLE_OFFER_MODE)) e.push(`${at}.type: free | pay-as-you-go | pay-up-front`);
if (o.type === 'pay-as-you-go') {
if (!(Number.isInteger(o.periods) && o.periods! >= 1 && o.periods! <= 12)) e.push(`${at}.periods: 1-12 discounted periods`);
if (o.duration !== undefined && o.duration !== s.period) e.push(`${at}.duration: pay-as-you-go runs in the subscription period (${s.period}); leave it out`);
} else if (!o.duration || !APPLE_OFFER_DURATION[o.duration]) e.push(`${at}.duration: one of ${Object.keys(APPLE_OFFER_DURATION).join(', ')}`);
if (o.type === 'free' && o.usd !== undefined) e.push(`${at}.usd: a free offer has no price`);
if (o.type !== 'free') {
if (!(typeof o.usd === 'number' && o.usd > 0)) e.push(`${at}.usd: positive number`);
else if (o.type === 'pay-as-you-go' && o.usd >= s.usd) e.push(`${at}.usd: must be below the regular price ${s.usd}`);
}
return e;
}
/** Every subscription of every group, with its group. */
export const allSubscriptions = (groups: SubscriptionGroup[] | undefined): { group: SubscriptionGroup; sub: Subscription }[] =>
(groups ?? []).flatMap(group => group.subscriptions.map(sub => ({ group, sub })));
/** Problems with `subscriptions` in the config (empty = fine). `langIds` = language ids, `productIds` = one-time
* product ids (a subscription may not reuse one). */
export function validateSubscriptions(groups: unknown, langIds: Set<string>, productIds: Set<string>): string[] {
const e: string[] = [];
if (groups === undefined) return e;
if (!Array.isArray(groups)) return ['subscriptions: a list of groups'];
const seen = new Set<string>();
const groupNames = new Set<string>();
for (const [gi, g] of (groups as SubscriptionGroup[]).entries()) {
const at = `subscriptions[${gi}]`;
if (!g?.name) e.push(`${at}.name: missing (Apple subscription group reference name)`);
else if (groupNames.has(g.name)) e.push(`${at}.name: duplicate "${g.name}"`);
groupNames.add(g?.name);
if (!g?.listings || !Object.keys(g.listings).length) e.push(`${at}.listings: at least one language (group display name)`);
for (const [lang, l] of Object.entries(g?.listings ?? {})) {
if (!langIds.has(lang)) e.push(`${at}.listings.${lang}: not in languages`);
if (!l?.name) e.push(`${at}.listings.${lang}.name: missing`);
}
if (!Array.isArray(g?.subscriptions) || !g.subscriptions.length) { e.push(`${at}.subscriptions: at least one`); continue; }
const levels = new Set<number>();
for (const [si, s] of g.subscriptions.entries()) {
const sat = `${at}.subscriptions[${si}]`;
if (!PRODUCT_RE.test(s.id ?? '') || s.id.length > 40) e.push(`${sat}.id: 1-40 lowercase letters, digits, "." and "_", starting with a letter or digit (Play rule)`);
if (seen.has(s.id)) e.push(`${sat}.id: duplicate "${s.id}"`);
if (productIds.has(s.id)) e.push(`${sat}.id: "${s.id}" is already a one-time product`);
seen.add(s.id);
if (!PERIODS.includes(s.period)) e.push(`${sat}.period: one of ${PERIODS.join(', ')}`);
if (!(Number.isInteger(s.level) && s.level >= 1)) e.push(`${sat}.level: integer from 1 (1 = highest level of service)`);
else if (levels.has(s.level)) e.push(`${sat}.level: ${s.level} used twice in the group`);
levels.add(s.level);
if (!(typeof s.usd === 'number' && s.usd > 0)) e.push(`${sat}.usd: positive number`);
if (s.basePlanId !== undefined && !PLAY_ID_RE.test(s.basePlanId)) e.push(`${sat}.basePlanId: lowercase letters, digits and "-", max 63`);
if (s.gracePeriod !== undefined && !GRACE.includes(s.gracePeriod)) e.push(`${sat}.gracePeriod: one of ${GRACE.join(', ')}`);
for (const o of s.overrides ?? []) {
if (!/^[A-Z]{2}$/.test(o.region)) e.push(`${sat}.overrides: region "${o.region}" must be ISO alpha-2 (TR)`);
if (!/^[A-Z]{3}$/.test(o.currency)) e.push(`${sat}.overrides: currency "${o.currency}" must be ISO 4217 (TRY)`);
if (!(o.price > 0)) e.push(`${sat}.overrides: price must be positive`);
}
if (!s.listings || !Object.keys(s.listings).length) e.push(`${sat}.listings: at least one language`);
for (const [lang, l] of Object.entries(s.listings ?? {})) {
const lat = `${sat}.listings.${lang}`;
if (!langIds.has(lang)) e.push(`${lat}: not in languages`);
if (!l?.title) e.push(`${lat}.title: missing`);
else if (len(l.title) > APPLE_SUB_LIMITS.name) e.push(`${lat}.title: over ${APPLE_SUB_LIMITS.name} characters (App Store limit)`);
if (!l?.description) e.push(`${lat}.description: missing`);
else if (len(l.description) > APPLE_SUB_LIMITS.description) e.push(`${lat}.description: over ${APPLE_SUB_LIMITS.description} characters (App Store limit)`);
if ((l?.benefits?.length ?? 0) > PLAY_SUB_LIMITS.benefits) e.push(`${lat}.benefits: at most ${PLAY_SUB_LIMITS.benefits} (Play)`);
for (const b of l?.benefits ?? []) if (len(b) > PLAY_SUB_LIMITS.benefit) e.push(`${lat}.benefits: "${b.slice(0, 20)}..." over ${PLAY_SUB_LIMITS.benefit} characters (Play)`);
}
if (s.intro) {
e.push(...validateOffer(`${sat}.intro`, s, s.intro));
if (s.intro.playOfferId !== undefined && !PLAY_ID_RE.test(s.intro.playOfferId)) e.push(`${sat}.intro.playOfferId: lowercase letters, digits and "-", max 63`);
}
const offerIds = new Set<string>(s.intro ? [offerId(s)] : []);
for (const [oi, o] of (s.offers ?? []).entries()) {
const oat = `${sat}.offers[${oi}]`;
if (!PLAY_ID_RE.test(o.id ?? '')) e.push(`${oat}.id: lowercase letters, digits and "-", max 63 (Play offer id, Apple offer code)`);
if (offerIds.has(o.id)) e.push(`${oat}.id: duplicate offer id "${o.id}"`);
offerIds.add(o.id);
e.push(...validateOffer(oat, s, o));
}
const codeNames = new Set<string>();
for (const [ci, oc] of (s.offerCodes ?? []).entries()) {
const cat = `${sat}.offerCodes[${ci}]`;
if (!oc.name) e.push(`${cat}.name: missing`);
if (codeNames.has(oc.name)) e.push(`${cat}.name: duplicate "${oc.name}"`);
codeNames.add(oc.name);
if (!Array.isArray(oc.eligibility) || !oc.eligibility.length || !oc.eligibility.every(x => ['NEW', 'EXISTING', 'EXPIRED'].includes(x))) e.push(`${cat}.eligibility: a list of NEW | EXISTING | EXPIRED`);
e.push(...validateOffer(cat, s, oc));
for (const cc of oc.customCodes ?? []) {
if (!/^[A-Z0-9]{1,64}$/.test(cc.code ?? '')) e.push(`${cat}.customCodes: "${cc.code}" must be upper-case letters and digits`);
if (!(Number.isInteger(cc.count) && cc.count >= 1)) e.push(`${cat}.customCodes ${cc.code}: count must be a positive integer`);
if (cc.expires !== undefined && !/^\d{4}-\d{2}-\d{2}$/.test(cc.expires)) e.push(`${cat}.customCodes ${cc.code}: expires YYYY-MM-DD`);
}
}
if (s.platforms !== undefined && !(Array.isArray(s.platforms) && s.platforms.length && s.platforms.every(x => x === 'ios' || x === 'android'))) e.push(`${sat}.platforms: a list of ios | android`);
}
}
return e;
}
// ---- Apple: request bodies ----
const rel = (type: string, id: string) => ({ data: { type, id } });
export const appleGroupBody = (appId: string, g: SubscriptionGroup) =>
({ data: { type: 'subscriptionGroups', attributes: { referenceName: g.name }, relationships: { app: rel('apps', appId) } } });
export const appleGroupLocBody = (groupId: string, locale: string, l: { name: string; customAppName?: string }) =>
({ data: { type: 'subscriptionGroupLocalizations', attributes: { locale, name: l.name, ...(l.customAppName ? { customAppName: l.customAppName } : {}) },
relationships: { subscriptionGroup: rel('subscriptionGroups', groupId) } } });
export function appleSubscriptionBody(groupId: string, s: Subscription) {
const first = Object.values(s.listings)[0]!;
return { data: { type: 'subscriptions', attributes: {
name: s.referenceName ?? first.title, productId: s.id, subscriptionPeriod: APPLE_PERIOD[s.period], groupLevel: s.level,
familySharable: s.familySharable ?? false, ...(s.reviewNote ? { reviewNote: s.reviewNote } : {}),
}, relationships: { group: rel('subscriptionGroups', groupId) } } };
}
export const appleSubLocBody = (subId: string, locale: string, l: { title: string; description: string }) =>
({ data: { type: 'subscriptionLocalizations', attributes: { locale, name: l.title, description: l.description },
relationships: { subscription: rel('subscriptions', subId) } } });
export const appleAvailabilityBody = (subId: string, territories: string[]) =>
({ data: { type: 'subscriptionAvailabilities', attributes: { availableInNewTerritories: true },
relationships: { subscription: rel('subscriptions', subId), availableTerritories: { data: territories.map(id => ({ type: 'territories', id })) } } } });
/**
* Prices for many territories in one request: PATCH /v1/subscriptions/{id} with `prices` and the inline-created
* subscriptionPrices in `included` (SubscriptionUpdateRequest). startDate null = now, a date = a scheduled change;
* preserveCurrentPrice true keeps existing subscribers on their current price (a price increase for them is a
* separate, consent-bound step in App Store Connect).
*/
export function applePricesPatch(subId: string, prices: { territory: string; pointId: string; startDate?: string | null }[], o: { preserveCurrentPrice?: boolean } = {}) {
const ids = prices.map((_, i) => `\${price-${i}}`);
return {
data: { type: 'subscriptions', id: subId, relationships: { prices: { data: ids.map(id => ({ type: 'subscriptionPrices', id })) } } },
included: prices.map((p, i) => ({ type: 'subscriptionPrices', id: ids[i], attributes: { startDate: p.startDate ?? null, preserveCurrentPrice: o.preserveCurrentPrice ?? true },
relationships: { subscriptionPricePoint: rel('subscriptionPricePoints', p.pointId), territory: rel('territories', p.territory) } })),
};
}
/** Introductory offers for many territories in one request (PATCH /v1/subscriptions/{id}, `introductoryOffers` +
* inline creates). A free trial has no price point; a paid offer needs one per territory. */
export function appleIntroPatch(subId: string, s: Subscription, territories: { territory: string; pointId?: string }[]) {
const o = s.intro!;
const ids = territories.map((_, i) => `\${intro-${i}}`);
return {
data: { type: 'subscriptions', id: subId, relationships: { introductoryOffers: { data: ids.map(id => ({ type: 'subscriptionIntroductoryOffers', id })) } } },
included: territories.map((t, i) => {
if (o.type !== 'free' && !t.pointId) throw new Error(`${s.id}: paid introductory offer in ${t.territory} needs a price point`);
return { type: 'subscriptionIntroductoryOffers', id: ids[i], attributes: {
duration: APPLE_OFFER_DURATION[introDuration(s)], offerMode: APPLE_OFFER_MODE[o.type],
numberOfPeriods: o.type === 'pay-as-you-go' ? o.periods! : 1, startDate: null, endDate: null,
}, relationships: { territory: rel('territories', t.territory), ...(o.type !== 'free' ? { subscriptionPricePoint: rel('subscriptionPricePoints', t.pointId!) } : {}) } };
}),
};
}
/** Promotional offer (Apple subscriptionPromotionalOffers): one price entry per territory; a free offer sends the
* territory without a price point (the schema marks the price point optional; not verified against a live account). */
export function applePromoOfferBody(subId: string, s: Subscription, o: SubscriptionOfferDef, prices: { territory: string; pointId?: string }[]) {
const ids = prices.map((_, i) => `\${promo-${i}}`);
return {
data: { type: 'subscriptionPromotionalOffers', attributes: { name: o.name ?? o.id, offerCode: o.id, duration: APPLE_OFFER_DURATION[offerDuration(s, o)],
offerMode: APPLE_OFFER_MODE[o.type], numberOfPeriods: o.type === 'pay-as-you-go' ? o.periods! : 1 },
relationships: { subscription: rel('subscriptions', subId), prices: { data: ids.map(id => ({ type: 'subscriptionPromotionalOfferPrices', id })) } } },
included: prices.map((p, i) => offerPrice('subscriptionPromotionalOfferPrices', ids[i]!, o, p, s.id)),
};
}
/** Offer code campaign (Apple subscriptionOfferCodes) with its per-territory prices. */
export function appleOfferCodeBody(subId: string, s: Subscription, oc: OfferCodeDef, prices: { territory: string; pointId?: string }[]) {
const ids = prices.map((_, i) => `\${code-${i}}`);
return {
data: { type: 'subscriptionOfferCodes', attributes: { name: oc.name, customerEligibilities: oc.eligibility,
offerEligibility: oc.stackWithIntro ? 'STACK_WITH_INTRO_OFFERS' : 'REPLACE_INTRO_OFFERS', duration: APPLE_OFFER_DURATION[offerDuration(s, oc)],
offerMode: APPLE_OFFER_MODE[oc.type], numberOfPeriods: oc.type === 'pay-as-you-go' ? oc.periods! : 1 },
relationships: { subscription: rel('subscriptions', subId), prices: { data: ids.map(id => ({ type: 'subscriptionOfferCodePrices', id })) } } },
included: prices.map((p, i) => offerPrice('subscriptionOfferCodePrices', ids[i]!, oc, p, s.id)),
};
}
function offerPrice(type: string, id: string, o: OfferLike, p: { territory: string; pointId?: string }, product: string) {
if (o.type !== 'free' && !p.pointId) throw new Error(`${product}: paid offer in ${p.territory} needs a price point`);
return { type, id, relationships: { territory: rel('territories', p.territory), ...(p.pointId ? { subscriptionPricePoint: rel('subscriptionPricePoints', p.pointId) } : {}) } };
}
/** Custom code of an offer code campaign (POST /v1/subscriptionOfferCodeCustomCodes). */
export const appleCustomCodeBody = (offerCodeId: string, cc: { code: string; count: number; expires?: string }) =>
({ data: { type: 'subscriptionOfferCodeCustomCodes', attributes: { customCode: cc.code, numberOfCodes: cc.count, ...(cc.expires ? { expirationDate: cc.expires } : {}) },
relationships: { offerCode: rel('subscriptionOfferCodes', offerCodeId) } } });
// ---- Apple: prices ----
export interface ApplePoint { id: string; territory: string; price: number }
/**
* The manual price per territory: the USA point's equalizations for every territory, then the config overrides, then
* CSV rows without start_date (CSV wins). Returns territory -> wanted price. Pure; points are looked up by the caller.
*/
export function appleWantedPrices(s: Subscription, equalized: ApplePoint[], csv: PriceRow[] = []): Map<string, number> {
const out = new Map<string, number>([['USA', s.usd]]);
for (const p of equalized) if (p.territory !== 'USA') out.set(p.territory, p.price);
for (const o of s.overrides ?? []) out.set(territoryOf(o), o.price);
for (const r of csv) if (r.product === s.id && r.store === 'apple' && !r.startDate && r.kind !== 'auto') out.set(r.territory ?? ALPHA3[r.region] ?? r.region, r.price);
return out;
}
function territoryOf(o: PriceOverride): string {
const t = o.territory ?? ALPHA3[o.region];
if (!t) throw new Error(`no App Store territory known for region ${o.region}; set "territory" (alpha-3)`);
return t;
}
const cents = (n: number): number => Math.round(n * 100);
export interface PriceChange { territory: string; from: number | null; to: number; startDate?: string }
/** Wanted prices (now) + CSV scheduled rows vs the current prices: only what differs. `current` = prices in effect now
* (startDate null or in the past) and scheduled ones (future startDate). */
export function applePriceChanges(current: { territory: string; price: number; startDate?: string | null }[], wanted: Map<string, number>,
scheduled: PriceRow[] = []): PriceChange[] {
const now = new Map(current.filter(c => !c.startDate).map(c => [c.territory, c.price] as const));
const future = new Set(current.filter(c => c.startDate).map(c => `${c.territory}|${c.startDate}|${cents(c.price)}`));
const out: PriceChange[] = [];
for (const [territory, to] of [...wanted.entries()].sort(([a], [b]) => (a === 'USA' ? -1 : b === 'USA' ? 1 : a.localeCompare(b)))) {
const from = now.get(territory) ?? null;
if (from === null || cents(from) !== cents(to)) out.push({ territory, from, to });
}
for (const r of scheduled.filter(x => x.store === 'apple' && x.startDate)) {
const territory = r.territory ?? ALPHA3[r.region] ?? r.region;
if (!future.has(`${territory}|${r.startDate}|${cents(r.price)}`)) out.push({ territory, from: now.get(territory) ?? null, to: r.price, startDate: r.startDate });
}
return out;
}
// ---- Apple: plan ----
export interface AppleSubState {
groups: { id: string; referenceName: string; locales: string[] }[];
subscriptions: { id: string; productId: string; groupId: string; state?: string; locales: string[]; hasPrices: boolean; introTerritories: number; availability: boolean; reviewScreenshot: boolean;
/** offerCode of each promotional offer; name of each offer code campaign (optional for older fixtures). */
promoOffers?: string[]; offerCodes?: string[] }[];
}
export interface AppleStep { group: string; product?: string; kind: 'group' | 'group-loc' | 'sub' | 'sub-loc' | 'availability' | 'prices' | 'intro' | 'promo' | 'offer-code' | 'review-shot'; what: string }
/** What `apple subscriptions` would do, in order (prices are refined by the command once the price points are known). */
export function appleSubscriptionPlan(groups: SubscriptionGroup[], langs: Language[], state: AppleSubState): AppleStep[] {
const steps: AppleStep[] = [];
const locale = new Map(langs.map(l => [l.id, l.apple] as const));
for (const g of groups) {
const cur = state.groups.find(x => x.referenceName === g.name);
if (!cur) steps.push({ group: g.name, kind: 'group', what: `create subscription group "${g.name}"` });
for (const [lang, l] of Object.entries(g.listings)) {
const loc = locale.get(lang);
if (loc && !cur?.locales.includes(loc)) steps.push({ group: g.name, kind: 'group-loc', what: `group ${loc}: "${l.name}"` });
}
for (const s of [...g.subscriptions].sort((a, b) => a.level - b.level)) {
const sc = state.subscriptions.find(x => x.productId === s.id);
if (sc && cur && sc.groupId !== cur.id) throw new Error(`${s.id} exists in another subscription group on App Store Connect (a subscription cannot move between groups)`);
const p = { group: g.name, product: s.id };
if (!sc) steps.push({ ...p, kind: 'sub', what: `create ${s.id} (${APPLE_PERIOD[s.period]}, level ${s.level})` });
for (const [lang, l] of Object.entries(s.listings)) {
const loc = locale.get(lang);
if (loc && !sc?.locales.includes(loc)) steps.push({ ...p, kind: 'sub-loc', what: `${s.id} ${loc}: "${l.title}"` });
}
if (!sc?.availability) steps.push({ ...p, kind: 'availability', what: `${s.id}: available in every territory + new ones` });
steps.push({ ...p, kind: 'prices', what: sc?.hasPrices ? `${s.id}: compare prices (USA ${s.usd} base)` : `${s.id}: prices from USA ${s.usd} (equalized) + ${(s.overrides ?? []).length} override(s)` });
if (s.intro && !(sc?.introTerritories)) steps.push({ ...p, kind: 'intro', what: `${s.id}: introductory offer ${APPLE_OFFER_MODE[s.intro.type]} ${introDuration(s)}${s.intro.type === 'pay-as-you-go' ? ` x${s.intro.periods}` : ''}${s.intro.usd ? ` at USA ${s.intro.usd}` : ''}` });
for (const o of s.offers ?? []) if (!sc?.promoOffers?.includes(o.id)) steps.push({ ...p, kind: 'promo', what: `${s.id}: promotional offer ${o.id} (${APPLE_OFFER_MODE[o.type]} ${offerDuration(s, o)})` });
for (const oc of s.offerCodes ?? []) if (!sc?.offerCodes?.includes(oc.name)) steps.push({ ...p, kind: 'offer-code', what: `${s.id}: offer code campaign "${oc.name}" (${oc.eligibility.join('/')}, ${APPLE_OFFER_MODE[oc.type]})${oc.customCodes?.length ? ` + ${oc.customCodes.length} custom code(s) with --codes` : ''}` });
if (s.reviewScreenshot && !sc?.reviewScreenshot) steps.push({ ...p, kind: 'review-shot', what: `${s.id}: review screenshot ${s.reviewScreenshot}` });
}
}
return steps;
}
// ---- Play ----
export interface PlayRegionPrice { regionCode: string; price: Money }
/** Regional base plan prices: converted (convertRegionPrices of the USD price), then overrides, then CSV rows. */
export function playSubRegions(s: Subscription, converted: Record<string, { regionCode: string; price: Money }>, csv: PriceRow[] = []): PlayRegionPrice[] {
const by = new Map(Object.values(converted).map(r => [r.regionCode, r.price] as const));
for (const o of s.overrides ?? []) {
if (!by.has(o.region)) throw new Error(`${s.id}: Play does not sell in region ${o.region}`);
by.set(o.region, toMoney(o.currency, o.price));
}
for (const r of csv) {
if (r.product !== s.id || r.store !== 'play' || r.kind === 'auto') continue;
const known = by.get(r.region);
if (!known) throw new Error(`${s.id}: Play does not sell in region ${r.region}`);
if (known.currencyCode !== r.currency) throw new Error(`${s.id} ${r.region}: Play prices this region in ${known.currencyCode}, the CSV says ${r.currency}`);
by.set(r.region, toMoney(r.currency, r.price));
}
return [...by.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([regionCode, price]) => ({ regionCode, price }));
}
export interface PlaySubscription {
packageName?: string;
productId: string;
listings?: { languageCode: string; title: string; description?: string; benefits?: string[] }[];
basePlans?: {
basePlanId: string; state?: string;
autoRenewingBasePlanType?: { billingPeriodDuration: string; gracePeriodDuration?: string; resubscribeState?: string; legacyCompatible?: boolean; [k: string]: unknown };
regionalConfigs?: { regionCode: string; newSubscriberAvailability?: boolean; price?: Money }[];
otherRegionsConfig?: { usdPrice: Money; eurPrice: Money; newSubscriberAvailability?: boolean };
[k: string]: unknown;
}[];
[k: string]: unknown;
}
/** Subscription resource for create / patch: listings per Play language, one auto-renewing base plan. */
export function playSubscriptionBody(pkg: string, s: Subscription, langs: Language[], regions: PlayRegionPrice[], other: { usdPrice: Money; eurPrice: Money }): PlaySubscription {
const byId = new Map(langs.map(l => [l.id, l] as const));
const listings = Object.entries(s.listings).flatMap(([id, l]) => {
const lang = byId.get(id);
return lang ? playCodes(lang).map(languageCode => ({ languageCode, title: l.title, description: l.description, ...(l.benefits?.length ? { benefits: l.benefits } : {}) })) : [];
});
if (!listings.length) throw new Error(`${s.id}: no listing language has a Play code`);
return {
packageName: pkg, productId: s.id, listings,
basePlans: [{
basePlanId: basePlanId(s),
autoRenewingBasePlanType: { billingPeriodDuration: s.period, ...(s.gracePeriod ? { gracePeriodDuration: s.gracePeriod } : {}), resubscribeState: 'RESUBSCRIBE_STATE_ACTIVE', legacyCompatible: true },
regionalConfigs: regions.map(r => ({ regionCode: r.regionCode, newSubscriberAvailability: true, price: r.price })),
otherRegionsConfig: { usdPrice: other.usdPrice, eurPrice: other.eurPrice, newSubscriberAvailability: true },
}],
};
}
/**
* An offer on the base plan: the introductory offer (for people who never had this subscription), or with `extra`
* one of `offers` (no acquisition targeting, offer tag = its id; your app decides who gets it). free = free trial phase;
* pay-as-you-go = `periods` phases at a relative discount (so it follows every regional price, overrides included);
* pay-up-front = one phase priced from convertRegionPrices of the offer price (`offerRegions`).
*/
export function playOfferBody(pkg: string, s: Subscription, regions: PlayRegionPrice[], offerRegions?: { regions: PlayRegionPrice[]; other: { usdPrice: Money; eurPrice: Money } },
extra?: SubscriptionOfferDef) {
const o: OfferLike = extra ?? s.intro!;
const codes = regions.map(r => r.regionCode);
let regionalConfigs: Record<string, unknown>[];
let otherRegionsConfig: Record<string, unknown>;
if (o.type === 'free') {
regionalConfigs = codes.map(regionCode => ({ regionCode, free: {} }));
otherRegionsConfig = { free: {} };
} else if (o.type === 'pay-as-you-go') {
const relativeDiscount = Math.round((1 - o.usd! / s.usd) * 100) / 100;
regionalConfigs = codes.map(regionCode => ({ regionCode, relativeDiscount }));
otherRegionsConfig = { relativeDiscount };
} else {
if (!offerRegions) throw new Error(`${s.id}: pay-up-front offer needs converted offer prices`);
const by = new Map(offerRegions.regions.map(r => [r.regionCode, r.price] as const));
regionalConfigs = codes.filter(c => by.has(c)).map(regionCode => ({ regionCode, price: by.get(regionCode) }));
otherRegionsConfig = { otherRegionsPrices: { usdPrice: offerRegions.other.usdPrice, eurPrice: offerRegions.other.eurPrice } };
}
return {
packageName: pkg, productId: s.id, basePlanId: basePlanId(s), offerId: extra ? extra.id : offerId(s),
phases: [{ recurrenceCount: o.type === 'pay-as-you-go' ? o.periods! : 1, duration: offerDuration(s, o), regionalConfigs, otherRegionsConfig }],
// intro: people who never had this subscription; extra offers: no targeting, your app picks them by offer tag
...(extra ? { offerTags: [{ tag: extra.id }] } : { targeting: { acquisitionRule: { scope: { thisSubscription: {} } } } }),
regionalConfigs: codes.map(regionCode => ({ regionCode, newSubscriberAvailability: true })),
otherRegionsConfig: { otherRegionsNewSubscriberAvailability: true },
};
}
const moneyKey = (m?: Money): string => (m ? `${m.currencyCode} ${cents(Number(m.units) + (m.nanos ?? 0) / 1e9)}` : '-');
export interface PlaySubDiff { create: boolean; listings: string[]; basePlan: 'new' | 'same' | 'changed'; priceChanges: { regionCode: string; from: string; to: string }[]; activate: boolean }
/** Current Play subscription (or null) vs the wanted body: what a patch would change. Price changes on an existing
* base plan apply to new subscribers; existing ones keep their price until you run a price migration in the Console. */
export function playSubDiff(cur: PlaySubscription | null, want: PlaySubscription): PlaySubDiff {
const wb = want.basePlans![0]!;
if (!cur) return { create: true, listings: (want.listings ?? []).map(l => l.languageCode), basePlan: 'new', priceChanges: [], activate: true };
const curL = new Map((cur.listings ?? []).map(l => [l.languageCode, l] as const));
const listings = (want.listings ?? []).filter(l => {
const c = curL.get(l.languageCode);
return !c || c.title !== l.title || (c.description ?? '') !== (l.description ?? '') || JSON.stringify(c.benefits ?? []) !== JSON.stringify(l.benefits ?? []);
}).map(l => l.languageCode);
const cb = cur.basePlans?.find(b => b.basePlanId === wb.basePlanId);
if (!cb) return { create: false, listings, basePlan: 'new', priceChanges: [], activate: true };
const cr = new Map((cb.regionalConfigs ?? []).map(r => [r.regionCode, r.price] as const));
const priceChanges = (wb.regionalConfigs ?? []).filter(r => moneyKey(cr.get(r.regionCode)) !== moneyKey(r.price))
.map(r => ({ regionCode: r.regionCode, from: moneyKey(cr.get(r.regionCode)), to: moneyKey(r.price) }));
const typeSame = cb.autoRenewingBasePlanType?.billingPeriodDuration === wb.autoRenewingBasePlanType?.billingPeriodDuration
&& (cb.autoRenewingBasePlanType?.gracePeriodDuration ?? '') === (wb.autoRenewingBasePlanType?.gracePeriodDuration ?? cb.autoRenewingBasePlanType?.gracePeriodDuration ?? '');
if (cb.autoRenewingBasePlanType && cb.autoRenewingBasePlanType.billingPeriodDuration !== wb.autoRenewingBasePlanType?.billingPeriodDuration)
throw new Error(`${want.productId}: base plan ${wb.basePlanId} bills every ${cb.autoRenewingBasePlanType.billingPeriodDuration} on Play, the config says ${wb.autoRenewingBasePlanType?.billingPeriodDuration} (a billing period cannot change; use a new basePlanId)`);
return { create: false, listings, basePlan: priceChanges.length || !typeSame ? 'changed' : 'same', priceChanges, activate: cb.state !== 'ACTIVE' };
}
/** The patch body keeps base plans the config does not manage (Play would otherwise drop them) and output-only fields out. */
export function playPatchSubscription(cur: PlaySubscription, want: PlaySubscription): PlaySubscription {
const wb = want.basePlans![0]!;
const keep = (cur.basePlans ?? []).filter(b => b.basePlanId !== wb.basePlanId).map(({ state: _s, ...b }) => b);
const curMine = cur.basePlans?.find(b => b.basePlanId === wb.basePlanId);
const { state: _st, ...mine } = { ...(curMine ?? {}), ...wb, autoRenewingBasePlanType: { ...(curMine?.autoRenewingBasePlanType ?? {}), ...wb.autoRenewingBasePlanType! } };
return { ...want, basePlans: [...keep, mine as NonNullable<PlaySubscription['basePlans']>[number]] };
}
// ---- Apple: reading responses ----
interface JsonApi { data?: { id: string; type?: string; attributes?: Record<string, unknown>; relationships?: Record<string, { data?: { id: string; type?: string } | null }> }[]; included?: { id: string; type: string; attributes?: Record<string, unknown> }[] }
/** Price points (GET /v1/subscriptions/{id}/pricePoints or .../equalizations, include=territory) -> points. */
export function applePoints(resp: JsonApi): ApplePoint[] {
return (resp.data ?? []).flatMap(p => {
const territory = p.relationships?.territory?.data?.id;
const price = Number(p.attributes?.customerPrice);
return territory && !Number.isNaN(price) ? [{ id: p.id, territory, price }] : [];
});
}
/** GET /v1/subscriptions/{id}/prices?include=subscriptionPricePoint,territory -> per territory the price in effect
* today (the latest start date not after `today`; startDate null) plus scheduled future prices (startDate set). */
export function appleSubPrices(resp: JsonApi, today = new Date().toISOString().slice(0, 10)): { territory: string; price: number; startDate: string | null; pointId: string; currency?: string }[] {
const points = new Map((resp.included ?? []).filter(x => x.type === 'subscriptionPricePoints').map(x => [x.id, Number(x.attributes?.customerPrice)] as const));
const currency = new Map((resp.included ?? []).filter(x => x.type === 'territories').map(x => [x.id, x.attributes?.currency as string | undefined] as const));
const now = new Map<string, { territory: string; price: number; startDate: string | null; pointId: string; since: string; currency?: string }>();
const future: { territory: string; price: number; startDate: string | null; pointId: string; currency?: string }[] = [];
for (const p of resp.data ?? []) {
const territory = p.relationships?.territory?.data?.id;
const pointId = p.relationships?.subscriptionPricePoint?.data?.id ?? '';
const price = points.get(pointId);
const start = (p.attributes?.startDate as string | null | undefined) ?? '';
if (!territory || price === undefined || Number.isNaN(price)) continue;
const cc = currency.get(territory);
if (start > today) { future.push({ territory, price, pointId, startDate: start, ...(cc ? { currency: cc } : {}) }); continue; }
const cur = now.get(territory);
if (!cur || start >= cur.since) now.set(territory, { territory, price, pointId, startDate: null, since: start, ...(cc ? { currency: cc } : {}) });
}
return [...[...now.values()].map(({ since: _s, ...x }) => x), ...future];
}
/** Price point with exactly this customer price (cents), or a helpful error with the nearest ones. */
export function pickPoint(points: ApplePoint[], territory: string, price: number): ApplePoint {
const inT = points.filter(p => p.territory === territory);
const hit = inT.find(p => cents(p.price) === cents(price));
if (hit) return hit;
const near = [...inT].sort((a, b) => Math.abs(a.price - price) - Math.abs(b.price - price)).slice(0, 3).map(p => p.price);
throw new Error(`${territory} has no subscription price point ${price}${near.length ? ` (nearest ${near.join(', ')})` : ''}`);
}

View file

@ -48,40 +48,6 @@ export interface AppleSnapshot {
privacyUrl: UrlCheck;
/** Local renders (Apple sizes only), checked before upload. Optional: validate fills it when a renders dir exists. */
renders?: RendersCheck;
/** Auto-renewable subscriptions on App Store Connect (validate reads them when the config has subscriptions). */
subscriptions?: AppleSubSnapshot[];
/** Subscription product ids of the config, with the App Store locales their listings need. */
expectedSubscriptions?: { id: string; group: string; locales: string[] }[];
/** App profile facts (accounts, sign-in for review, terms URL); see profileRules. */
profile?: ProfileFacts;
}
export interface AppleSubSnapshot {
productId: string;
group: string;
state: string;
locales: { locale: string; state?: string }[];
groupLocales: { locale: string; state?: string }[];
reviewScreenshot: boolean;
}
/** What the profile checks need, collected by validate (local config + credentials + public URL checks). */
export interface ProfileFacts {
profile: 'game' | 'app' | 'subscription-app';
/** accounts.enabled */
accounts: boolean;
/** accounts.inApp is set (where in-app deletion is). */
inAppDeletion: boolean;
/** accounts.deletionUrl, checked (null = not set). */
deletionUrl: UrlCheck | null;
/** reviewAccess.signInRequired */
signInRequired: boolean;
/** A demo account exists locally (.storebound/credentials.json reviewDemoAccount or REVIEW_DEMO_USER / _PASSWORD). */
demoAccountLocal: boolean;
/** The config has subscriptions. */
subscriptions: boolean;
/** app.termsUrl, checked (null = not set). */
termsUrl: UrlCheck | null;
}
export interface PlaySnapshot {
@ -98,10 +64,6 @@ export interface PlaySnapshot {
expectedProducts: string[];
/** Local renders (Play sizes only), checked before upload. */
renders?: RendersCheck;
/** Play subscriptions and their base plans (validate reads them when the config has subscriptions). */
subscriptions?: { productId: string; basePlans: { basePlanId: string; state?: string }[] }[];
expectedSubscriptions?: { id: string; basePlanId: string }[];
profile?: ProfileFacts;
}
const EDITABLE = ['PREPARE_FOR_SUBMISSION', 'DEVELOPER_REJECTED', 'REJECTED', 'METADATA_REJECTED', 'INVALID_BINARY'];
@ -170,9 +132,7 @@ export function appleRules(s: AppleSnapshot): Finding[] {
}
if (s.iaps.length && !f.some(x => x.code === 'iap')) add('ok', 'iap', `${s.iaps.length} in-app purchases ready`);
f.push(...appleSubscriptionRules(s));
add(urlOk(s.privacyUrl) ? 'ok' : 'blocker', 'privacy-url', `privacy policy ${s.privacyUrl.url}: ${urlMsg(s.privacyUrl)}`, 'privacy-policy skill');
if (s.profile) f.push(...profileRules('apple', s.profile, { reviewDetail: s.reviewDetail, descriptions: s.locales.map(l => ({ locale: l.locale, text: l.description ?? '' })) }));
f.push(...rendersFindings('apple', s.renders));
return sortFindings(f);
}
@ -199,11 +159,11 @@ export function playRules(s: PlaySnapshot): Finding[] {
if (s.appAdsLines.length || s.adsLikely) {
if (!s.website) add('blocker', 'app-ads', 'no developer website on the listing (app-ads.txt is looked up there)', 'storebound play listing (app.website)');
else if (!s.appAds || !urlOk(s.appAds)) add(s.appAdsLines.length ? 'blocker' : 'warn', 'app-ads', `${s.website.replace(/\/$/, '')}/app-ads.txt: ${s.appAds ? urlMsg(s.appAds) : 'not checked'}`, 'ads-mediation-checks skill');
else if (!s.appAds || !urlOk(s.appAds)) add(s.appAdsLines.length ? 'blocker' : 'warn', 'app-ads', `${s.website.replace(/\/$/, '')}/app-ads.txt: ${s.appAds ? urlMsg(s.appAds) : 'not checked'}`, 'ads-levelplay-checks skill');
else if (s.appAdsLines.length) {
const body = new Set((s.appAds.body ?? '').split(/\r?\n/).map(normAdsLine).filter(Boolean));
const missing = s.appAdsLines.filter(l => !body.has(normAdsLine(l)));
if (missing.length) add('blocker', 'app-ads', `app-ads.txt lacks ${missing.length} line(s): ${missing.slice(0, 3).join(' | ')}${missing.length > 3 ? ' ...' : ''}`, 'ads-mediation-checks skill');
if (missing.length) add('blocker', 'app-ads', `app-ads.txt lacks ${missing.length} line(s): ${missing.slice(0, 3).join(' | ')}${missing.length > 3 ? ' ...' : ''}`, 'ads-levelplay-checks skill');
else add('ok', 'app-ads', `app-ads.txt has all ${s.appAdsLines.length} lines`);
} else add('warn', 'app-ads', 'app-ads.txt reachable; set ads.appAdsTxt in the config to check its lines');
}
@ -223,84 +183,10 @@ export function playRules(s: PlaySnapshot): Finding[] {
else if (!p.states.includes('ACTIVE')) add('blocker', 'products', `${id}: purchase option ${p.states.join(',') || 'no state'}`, 'storebound play products');
}
if (s.expectedProducts.length && !f.some(x => x.code === 'products')) add('ok', 'products', `${s.expectedProducts.length} products active`);
const subs = new Map((s.subscriptions ?? []).map(x => [x.productId, x] as const));
for (const e of s.expectedSubscriptions ?? []) {
const cur = subs.get(e.id);
const bp = cur?.basePlans.find(b => b.basePlanId === e.basePlanId);
if (!cur) add('blocker', 'subscriptions', `${e.id}: subscription not on Play`, 'storebound play subscriptions');
else if (!bp) add('blocker', 'subscriptions', `${e.id}: no base plan ${e.basePlanId}`, 'storebound play subscriptions');
else if (bp.state !== 'ACTIVE') add('blocker', 'subscriptions', `${e.id}: base plan ${e.basePlanId} is ${bp.state ?? 'not active'}`, 'storebound play subscriptions (activates it)');
}
if (s.expectedSubscriptions?.length && !f.some(x => x.code === 'subscriptions')) add('ok', 'subscriptions', `${s.expectedSubscriptions.length} subscriptions with an active base plan`);
if (s.profile) f.push(...profileRules('play', s.profile, {}));
f.push(...rendersFindings('play', s.renders));
return sortFindings(f);
}
const SUB_OK = ['READY_TO_SUBMIT', 'WAITING_FOR_REVIEW', 'IN_REVIEW', 'APPROVED', 'PENDING_BINARY_APPROVAL'];
/** Subscriptions on App Store Connect vs the config: present, state, localizations (and their review state), group
* display names, review screenshot. */
export function appleSubscriptionRules(s: Pick<AppleSnapshot, 'subscriptions' | 'expectedSubscriptions'>): Finding[] {
const f: Finding[] = [];
const add = (level: Level, msg: string, fix?: string) => f.push({ store: 'apple', level, code: 'subscriptions', msg, fix });
const have = new Map((s.subscriptions ?? []).map(x => [x.productId, x] as const));
const groupsDone = new Set<string>();
for (const e of s.expectedSubscriptions ?? []) {
const cur = have.get(e.id);
if (!cur) { add('blocker', `${e.id}: subscription not on App Store Connect`, 'storebound apple subscriptions'); continue; }
if (!groupsDone.has(cur.group)) {
groupsDone.add(cur.group);
if (!cur.groupLocales.length) add('blocker', `group "${cur.group}": no localization (display name)`, 'storebound apple subscriptions');
for (const l of cur.groupLocales) if (l.state === 'REJECTED') add('blocker', `group "${cur.group}" ${l.locale}: localization rejected`, 'fix the group display name, then storebound apple subscriptions');
}
if (cur.state === 'MISSING_METADATA') add('blocker', `${e.id}: MISSING_METADATA (localization, price, availability or review screenshot missing)`, 'storebound apple subscriptions');
else if (!SUB_OK.includes(cur.state)) add('blocker', `${e.id}: ${cur.state}`, cur.state === 'REJECTED' || cur.state === 'DEVELOPER_ACTION_NEEDED' ? 'review-rejections skill; fix and resubmit with a version' : 'store-subscriptions skill');
const locs = new Map(cur.locales.map(l => [l.locale, l] as const));
for (const loc of e.locales) if (!locs.has(loc)) add('blocker', `${e.id}: no ${loc} localization`, 'storebound apple subscriptions');
for (const l of cur.locales) if (l.state === 'REJECTED') add('blocker', `${e.id} ${l.locale}: localization rejected`, 'fix the display name / description, then storebound apple subscriptions');
if (!cur.reviewScreenshot && cur.state !== 'APPROVED') add('blocker', `${e.id}: no review screenshot`, 'subscriptions[].reviewScreenshot, then storebound apple subscriptions');
}
if (s.expectedSubscriptions?.length && !f.length) add('ok', `${s.expectedSubscriptions.length} subscriptions ready (state, localizations, review screenshots)`);
return f;
}
/**
* App profile checks. Accounts: Apple 5.1.1(v) wants deletion inside the app (no API can see it: a reminder unless
* accounts.inApp says where), Play wants a reachable delete-account URL as well. Sign-in for review: the demo account
* must exist locally and be on the App Review details. Subscriptions: a reachable Terms of Use (EULA) URL, and Apple
* metadata (description) that links it (3.1.2).
*/
export function profileRules(store: 'apple' | 'play', p: ProfileFacts, o: { reviewDetail?: AppleSnapshot['reviewDetail']; descriptions?: { locale: string; text: string }[] }): Finding[] {
const f: Finding[] = [];
const add = (level: Level, code: string, msg: string, fix?: string) => f.push({ store, level, code, msg, fix });
if (p.accounts) {
if (store === 'play') {
if (!p.deletionUrl) add('blocker', 'account-deletion', 'the app has accounts but accounts.deletionUrl is not set (Play Data safety asks for a delete-account URL)', 'account-deletion skill');
else if (!urlOk(p.deletionUrl)) add('blocker', 'account-deletion', `delete-account page ${p.deletionUrl.url}: ${urlMsg(p.deletionUrl)}`, 'account-deletion skill');
else add('ok', 'account-deletion', `delete-account page ${p.deletionUrl.url} answers`);
} else if (!p.inAppDeletion) add('warn', 'account-deletion', 'the app has accounts: deletion must start inside the app (5.1.1(v)); set accounts.inApp to where it is, it goes into the review notes', 'account-deletion skill');
else add('ok', 'account-deletion', 'in-app account deletion named in the config (5.1.1(v); test it before review)');
}
if (p.signInRequired) {
if (!p.demoAccountLocal) add('blocker', 'demo-account', 'sign-in required for review but no demo account in .storebound/credentials.json (reviewDemoAccount) or REVIEW_DEMO_USER / REVIEW_DEMO_PASSWORD', 'review-access skill');
if (store === 'apple' && o.reviewDetail && !(o.reviewDetail.demoAccountRequired && o.reviewDetail.demoAccountName))
add('blocker', 'demo-account', 'App Review information has no demo account although the app needs a sign-in (Guideline 2.1)', 'storebound apple review-details');
if (store === 'play') add('warn', 'app-access', 'sign-in required: Play Console > App content > App access must list the demo credentials and steps (no API)', 'review-access skill');
if (!f.some(x => x.code === 'demo-account')) add('ok', 'demo-account', 'demo account for review present');
}
if (p.subscriptions) {
if (!p.termsUrl) add('blocker', 'terms-url', 'subscriptions need a Terms of Use (EULA) link in the app and the metadata: app.termsUrl is not set', 'store-subscriptions skill');
else if (!urlOk(p.termsUrl)) add('blocker', 'terms-url', `terms of use ${p.termsUrl.url}: ${urlMsg(p.termsUrl)}`, 'store-subscriptions skill');
else {
add('ok', 'terms-url', `terms of use ${p.termsUrl.url} answers`);
const missing = (o.descriptions ?? []).filter(d => d.text && !d.text.includes(p.termsUrl!.url) && !/terms of use|\beula\b|license agreement/i.test(d.text)).map(d => d.locale);
if (store === 'apple' && missing.length) add('warn', 'terms-url', `description without a Terms of Use link: ${missing.join(', ')} (3.1.2; or set a custom EULA in App Information)`, 'store-subscriptions skill');
}
}
return f;
}
/** Blockers first, then warnings, then ok; stable inside a level (rule order). */
export function sortFindings(f: Finding[]): Finding[] {
const rank: Record<Level, number> = { blocker: 0, warn: 1, ok: 2 };

View file

@ -1,5 +1,5 @@
// User-facing release notes from commit subjects, and writing them into the two listing files. Pure.
// The draft is a starting point for a human: commit messages are written for developers, notes are for users.
// Player-facing release notes from commit subjects, and writing them into the two listing files. Pure.
// The draft is a starting point for a human: commit messages are written for developers, notes are for players.
import { len, PLAY_LIMITS } from './copy';
export const NOTES_LIMITS = { play: PLAY_LIMITS.whatsNew, apple: 4000 } as const;

View file

@ -39,7 +39,7 @@ export const TOOLS: ToolDef[] = [
props: { storefront: { type: 'string', description: 'App Store storefront for the cross-locale hint', default: 'US' } },
args: i => ['--aso', ...opt('storefront', i.storefront)] },
{ name: 'validate', title: 'Store readiness report', command: ['validate'], write: false, network: true,
description: 'Read-only readiness report for App Store Connect and/or Google Play with ordered blockers (build, encryption, metadata, screenshots, review details and demo account, age rating, prices, IAPs, subscriptions, privacy, delete-account and terms URLs, app-ads.txt, tracks, products, base plans).',
description: 'Read-only readiness report for App Store Connect and/or Google Play with ordered blockers (build, encryption, metadata, screenshots, review details, age rating, prices, IAPs, privacy URL, app-ads.txt, tracks, products).',
props: { store: { type: 'string', enum: ['both', 'apple', 'play'], default: 'both' } },
args: i => (i.store === 'apple' ? ['--apple'] : i.store === 'play' ? ['--play'] : []) },
{ name: 'health', title: 'Crash and vitals health', command: ['health'], write: false, network: true,
@ -60,10 +60,6 @@ export const TOOLS: ToolDef[] = [
props: { store: { type: 'string', enum: ['apple', 'play'], description: 'Default: both' }, days: { type: 'integer', minimum: 1, maximum: 365, default: 14 },
rating: { type: 'string', pattern: '^[1-5](,[1-5])*$', description: 'Only these star ratings, e.g. 1,2,3' } },
args: i => [...opt('store', i.store), ...opt('days', i.days), ...opt('rating', i.rating)] },
{ name: 'catalog_diff', title: 'Cross-store catalog parity', command: ['catalog', 'diff'], write: false, network: true,
description: 'Read-only parity report: the products and subscriptions of the config against App Store Connect and Google Play (missing / extra items, type, billing period, level, US and override prices, localizations, offers) plus regions where the two stores price the same product differently (same currency, over the threshold).',
props: { store: { type: 'string', enum: ['apple', 'play'] }, threshold: { type: 'integer', minimum: 0, maximum: 100, default: 10, description: 'Percent difference between the stores to report' }, json: { type: 'boolean', default: false } },
args: i => [...opt('store', i.store), ...opt('threshold', i.threshold), ...flag('json', i.json)] },
{ name: 'prices_diff', title: 'Price sheet diff', command: ['prices', 'import'], write: false, network: true,
description: 'Read-only: compare the prices CSV (product, store, region, currency, price, start_date) with the current App Store and Google Play prices and print the diff table. Applying it is an owner-only terminal command (storebound prices import, asks first).',
props: { csv: { type: 'string', description: 'CSV path (default prices.csv in the config, else store/prices.csv)' }, store: { type: 'string', enum: ['apple', 'play'] }, only, all: { type: 'boolean', default: false, description: 'Also list unchanged rows' } },
@ -100,7 +96,7 @@ export const TOOLS: ToolDef[] = [
required: ['ios'], args: i => [...opt('ios', i.ios), ...opt('sdk-dirs', i.sdk_dirs)] },
{ name: 'whats_new', title: 'Draft release notes', command: ['whats-new'], write: true, network: false, idempotent: true,
description: 'Draft user-facing release notes from the git log since a tag; with dry_run false writes the draft into the listing files (local text only, nothing is sent to a store).',
description: 'Draft player-facing release notes from the git log since a tag; with dry_run false writes the draft into the listing files (local text only, nothing is sent to a store).',
props: { since: { type: 'string', description: 'Git tag or ref (default: latest tag)' }, lang: { type: 'string' }, all_languages: { type: 'boolean', default: false } },
args: i => [...opt('since', i.since), ...opt('lang', i.lang), ...flag('all', i.all_languages)] },
{ name: 'play_listing', title: 'Push Play listing text', command: ['play', 'listing'], write: true, network: true, idempotent: true,
@ -112,10 +108,6 @@ export const TOOLS: ToolDef[] = [
{ name: 'play_products', title: 'Sync Play one-time products', command: ['play', 'products'], write: true, network: true, idempotent: true,
description: 'Create / update one-time products with regional prices and activate their purchase option.',
props: { only }, args: i => opt('only', i.only) },
{ name: 'play_subscriptions', title: 'Sync Play subscriptions', command: ['play', 'subscriptions'], write: true, network: true, idempotent: true,
description: 'Auto-renewable subscriptions on Google Play from the config: listings per language (title, description, benefits), one auto-renewing base plan with regional prices (convertRegionPrices + overrides + optional prices CSV), activation, and the introductory offer for new subscribers. dry_run prints the plan. Without a terminal it creates only what is new; price changes of existing base plans are an owner terminal run.',
props: { only, csv: { type: 'string', description: 'Prices CSV with rows for subscription ids' } },
args: i => [...opt('only', i.only), ...opt('csv', i.csv)] },
{ name: 'play_data_safety', title: 'Push Play Data safety', command: ['play', 'data-safety'], write: true, destructive: true, network: true, idempotent: true,
description: 'Replace the whole Play Data safety form with the answers from the config (CSV import). dry_run prints the CSV.' },
{ name: 'play_release_testing', title: 'Release to a Play testing track', command: ['play', 'release'], write: true, network: true,
@ -128,10 +120,6 @@ export const TOOLS: ToolDef[] = [
{ name: 'apple_iap', title: 'Sync App Store IAPs', command: ['apple', 'iap'], write: true, network: true, idempotent: true,
description: 'Create missing in-app purchases, localizations, price schedules and availability. Never submits.',
props: { only }, args: i => opt('only', i.only) },
{ name: 'apple_subscriptions', title: 'Sync App Store subscriptions', command: ['apple', 'subscriptions'], write: true, network: true, idempotent: true,
description: 'Auto-renewable subscriptions from the config: subscription groups and display names, subscriptions (period, level), localizations, availability, prices (USA price point + equalizations + overrides, optional prices CSV), introductory offers, review screenshot. dry_run prints the plan. Without a terminal it creates only what is new; price changes of existing subscriptions are an owner terminal run. Never submits.',
props: { only, csv: { type: 'string', description: 'Prices CSV (product, store, region, currency, price, start_date) with rows for subscription ids' } },
args: i => [...opt('only', i.only), ...opt('csv', i.csv)] },
{ name: 'apple_iap_review', title: 'IAP review screenshots', command: ['apple', 'iap-review'], write: true, destructive: true, network: true, idempotent: true,
description: 'Upload (replace when changed) the App Review screenshot of every in-app purchase. Never submits.' },
{ name: 'apple_listing', title: 'Push App Store version + text', command: ['apple', 'listing'], write: true, network: true, idempotent: true,
@ -144,7 +132,7 @@ export const TOOLS: ToolDef[] = [
{ name: 'apple_appinfo', title: 'App Store app info', command: ['apple', 'appinfo'], write: true, network: true, idempotent: true,
description: 'Categories, age rating declaration, content rights, Free price and availability (when missing).' },
{ name: 'apple_review_details', title: 'App Review information', command: ['apple', 'review-details'], write: true, network: true, idempotent: true,
description: 'App Review contact and, when reviewAccess.signInRequired, the demo account (both from .storebound/credentials.json or env, masked in the output), plus the review notes (apple.info.reviewNotes, sign-in instructions, where account deletion is).' },
description: 'App Review contact (from .storebound/credentials.json) and review notes from the config.' },
{ name: 'apple_encryption', title: 'Export compliance answer', command: ['apple', 'encryption'], write: true, network: true, idempotent: true,
description: 'Answer export compliance for builds from apple.usesNonExemptEncryption in the config (never guesses).',
props: { build: { type: 'string', description: 'Build number (default: every build without an answer)' } }, args: i => opt('build', i.build) },
@ -153,7 +141,7 @@ export const TOOLS: ToolDef[] = [
props: { action: { type: 'string', enum: ['on', 'pause'] }, version: { type: 'string' } }, required: ['action'],
args: i => ['--phased', String(i.action), ...opt('version', i.version)] },
{ name: 'shots_capture', title: 'Capture raw frames', command: ['shots', 'capture'], write: true, network: false, idempotent: true,
description: 'Raw app or game frames per language into shots.frames from a web build (Playwright), the iOS Simulator (simctl), an Android emulator / device (adb) or a folder check. Local files only; a simulator it boots is shut down again, an emulator is never booted. dry_run lists the plan and the simctl / adb commands.',
description: 'Raw game frames per language into shots.frames from a web build (Playwright), the iOS Simulator (simctl), an Android emulator / device (adb) or a folder check. Local files only; a simulator it boots is shut down again, an emulator is never booted. dry_run lists the plan and the simctl / adb commands.',
props: { lang, only: { type: 'string', description: 'Comma-separated shot names' }, device: { type: 'string', enum: ['phone', 'tablet'] }, source },
args: i => [...opt('lang', i.lang), ...opt('only', i.only), ...opt('device', i.device), ...opt('source', i.source)] },
{ name: 'shots_render', title: 'Render store screenshots', command: ['shots', 'render'], write: true, network: false, idempotent: true,
@ -164,8 +152,8 @@ export const TOOLS: ToolDef[] = [
{ name: 'shots_gallery', title: 'Review gallery', command: ['shots', 'gallery'], write: true, network: false, idempotent: true,
description: 'Write <renders>/index.html: one self-contained page with every language, size, scene, variant and app preview, store check issues highlighted. Open it in a browser to review before uploading.',
props: { lang }, args: i => opt('lang', i.lang) },
{ name: 'shots_record', title: 'Record app or gameplay clips', command: ['shots', 'record'], write: true, network: false, idempotent: true,
description: 'App or gameplay clips for app previews from shots.video.record: web build (Chromium screencast), iOS Simulator (simctl recordVideo), Android emulator / device (screenrecord, never booted) or a folder listing. Local files only.',
{ name: 'shots_record', title: 'Record gameplay clips', command: ['shots', 'record'], write: true, network: false, idempotent: true,
description: 'Gameplay clips for app previews from shots.video.record: web build (Chromium screencast), iOS Simulator (simctl recordVideo), Android emulator / device (screenrecord, never booted) or a folder listing. Local files only.',
props: { lang, only: { type: 'string', description: 'Comma-separated clip names' }, source },
args: i => [...opt('lang', i.lang), ...opt('only', i.only), ...opt('source', i.source)] },
{ name: 'shots_video', title: 'Cut app previews', command: ['shots', 'video'], write: true, network: false, idempotent: true,

View file

@ -43,7 +43,7 @@ export const UNSUPPORTED_PROTOCOL_VERSION = -32022;
export const TOOLS_TTL_MS = 300_000;
export const INSTRUCTIONS = [
'storebound takes mobile apps and games from nothing to Submit for review on Google Play and the App Store (app profiles: game, app, subscription-app).',
'storebound ships mobile games to Google Play and the App Store.',
'Write tools default to dry_run: show the dry run to the owner and only call again with dry_run false after they agree.',
'Nothing here submits for review, releases, cancels, deletes or sends anything public (review replies, tester invitations, price changes, experiment starts): tell the owner which terminal command or console click does that.',
'Credentials come only from env or .storebound/ in the project; never ask for keys in chat or write them into files.',

View file

@ -4,9 +4,7 @@
// Per product: convertRegionPrices (USD base -> every region at local price points, plus regionsVersion), your
// explicit overrides on top, PATCH ...?allowMissing=true (create or update), then activate the purchase option
// (new options start as DRAFT) with purchaseOptions:batchUpdateStates. Idempotent.
// Play has no non-renewing type: a `non_renewing` product is a plain one-time product here (your app consumes it
// when the access ends). Products with `platforms` that leave out android are skipped.
import { playCodes, sellsOn } from '../lib/config';
import { playCodes } from '../lib/config';
import type { Ctx } from '../lib/ctx';
import { need } from '../lib/ctx';
import { done, log, step, warn } from '../lib/log';
@ -38,7 +36,7 @@ export async function run(ctx: Ctx): Promise<void> {
const { config, root } = ctx.loaded;
const pkg = need(config.play?.packageName, 'play.packageName');
const only = ctx.args.list('only');
const products = need(config.products, 'products').filter(p => (!only.length || only.includes(p.id)) && sellsOn(config, p, 'play'));
const products = need(config.products, 'products').filter(p => !only.length || only.includes(p.id));
const dry = ctx.args.has('dry');
const play = await playClient(root, pkg);
const existing = new Map((await listOneTimeProducts(play)).map(p => [p.productId, p]));

View file

@ -1,119 +0,0 @@
// Auto-renewable subscriptions on Google Play through monetization.subscriptions, from `subscriptions` in the
// config: one Play subscription per entry with listings per Play language (title, description, benefits), one
// auto-renewing base plan (billing period, grace period, regional prices from convertRegionPrices + overrides + optional
// CSV rows), activated, and the introductory offer (free trial, pay as you go, pay up front) for people who never had
// the subscription, activated, plus `offers` (no acquisition targeting, offer tag = id: your app decides who sees
// them). Play has no subscription groups (an Apple concept) and no API for promo codes (Play Console > Monetize >
// Promo codes). Idempotent: compares first.
// storebound play subscriptions [--dry] [--only id1,id2] [--csv store/prices.csv] [--yes]
// Prints the plan first. In a terminal it asks before writing. Without a terminal (MCP, CI) and without --yes it
// creates what is new only and leaves price changes of existing base plans to a terminal run. A base plan price
// change applies to new subscribers; existing ones keep their price until you run a price migration in Play Console.
// Pure parts and sources: lib/subscriptions.ts.
import { sellsOn } from '../lib/config';
import type { Ctx } from '../lib/ctx';
import { confirm, need } from '../lib/ctx';
import { done, log, step, warn } from '../lib/log';
import { type Money, toMoney } from '../lib/money';
import {
allSubscriptions, basePlanId, offerId, playOfferBody, playPatchSubscription, type PlaySubscription, playSubDiff, playSubRegions,
playSubscriptionBody,
} from '../lib/subscriptions';
import { subscriptionCsv } from '../apple/subscriptions';
import { playClient } from './client';
const TAG = 'play';
interface Converted { convertedRegionPrices?: Record<string, { regionCode: string; price: Money }>; convertedOtherRegionsPrice?: { usdPrice: Money; eurPrice: Money }; regionVersion?: { version: string } }
export async function run(ctx: Ctx): Promise<void> {
const { config, root } = ctx.loaded;
const pkg = need(config.play?.packageName, 'play.packageName');
const only = ctx.args.list('only');
const subs = allSubscriptions(need(config.subscriptions, 'subscriptions')).map(x => x.sub).filter(s => (!only.length || only.includes(s.id)) && sellsOn(config, s, 'play'));
const dry = ctx.args.has('dry');
const csv = subscriptionCsv(ctx, 'play');
const play = await playClient(root, pkg);
const existing = new Map<string, PlaySubscription>();
let page = '';
do {
const r = await play.call<{ subscriptions?: PlaySubscription[]; nextPageToken?: string }>('GET', `${play.API}/subscriptions?pageSize=100${page ? '&pageToken=' + page : ''}`);
for (const s of r.subscriptions ?? []) existing.set(s.productId, s);
page = r.nextPageToken ?? '';
} while (page);
const convert = async (usd: number): Promise<Required<Converted>> => {
const conv = await play.call<Converted>('POST', `${play.API}/pricing:convertRegionPrices`, { price: toMoney('USD', usd) });
if (!conv.convertedRegionPrices || !conv.convertedOtherRegionsPrice) throw new Error(`convertRegionPrices returned no prices for USD ${usd}`);
return { convertedRegionPrices: conv.convertedRegionPrices, convertedOtherRegionsPrice: conv.convertedOtherRegionsPrice, regionVersion: conv.regionVersion ?? { version: '2022/02' } };
};
const work: { s: typeof subs[number]; body: PlaySubscription; diff: ReturnType<typeof playSubDiff>; version: string; offerMissing: boolean; extraMissing: string[] }[] = [];
for (const [i, s] of subs.entries()) {
const conv = await convert(s.usd);
const regions = playSubRegions(s, conv.convertedRegionPrices, csv);
const body = playSubscriptionBody(pkg, s, config.languages, regions, conv.convertedOtherRegionsPrice);
const cur = existing.get(s.id) ?? null;
const diff = playSubDiff(cur, body);
let offerMissing = !!s.intro;
let extraMissing = (s.offers ?? []).map(o => o.id);
if ((s.intro || s.offers?.length) && cur?.basePlans?.some(b => b.basePlanId === basePlanId(s))) {
const offers = await play.call<{ subscriptionOffers?: { offerId: string }[] }>('GET', `${play.API}/subscriptions/${encodeURIComponent(s.id)}/basePlans/${basePlanId(s)}/offers`);
const have = new Set((offers.subscriptionOffers ?? []).map(o => o.offerId));
offerMissing = !!s.intro && !have.has(offerId(s));
extraMissing = extraMissing.filter(x => !have.has(x));
}
const what = diff.create ? `create, base plan ${basePlanId(s)} (${s.period}) in ${regions.length} regions`
: [diff.listings.length ? `listings ${diff.listings.join(', ')}` : '', diff.basePlan === 'new' ? `new base plan ${basePlanId(s)}` : diff.basePlan === 'changed' ? `base plan ${basePlanId(s)}: ${diff.priceChanges.length} regional price change(s)` : '',
diff.activate ? 'activate base plan' : ''].filter(Boolean).join(' · ') || 'up to date';
log(TAG, `${step(i + 1, subs.length, s.id)}: ${what}${offerMissing ? ` · intro offer ${offerId(s)} (${s.intro!.type})` : ''}${extraMissing.length ? ` · offers ${extraMissing.join(', ')}` : ''}`);
for (const p of diff.priceChanges.slice(0, 5)) log(TAG, ` ${p.regionCode}: ${p.from} -> ${p.to}`);
if (diff.priceChanges.length > 5) log(TAG, ` ... ${diff.priceChanges.length - 5} more`);
work.push({ s, body, diff, version: conv.regionVersion.version, offerMissing, extraMissing });
}
if (dry) { done(TAG, 'subscriptions planned (dry run, nothing written)'); return; }
const todo = work.filter(w => w.diff.create || w.diff.listings.length || w.diff.basePlan !== 'same' || w.diff.activate || w.offerMissing || w.extraMissing.length);
if (!todo.length) { done(TAG, 'subscriptions up to date'); return; }
const yes = ctx.args.has('yes');
let liveOk = yes;
if (process.stdin.isTTY && !yes) {
if (!(await confirm(ctx, `Write ${todo.length} subscription(s) to Google Play? Activated base plans and offers can be bought as soon as the app is published; price changes apply to new subscribers.`))) return;
liveOk = true;
} else if (!yes) log(TAG, 'not a terminal: creating what is new only; price changes of existing base plans wait for a terminal run');
for (const { s, body, diff, version, offerMissing, extraMissing } of todo) {
const v = encodeURIComponent(version);
const id = encodeURIComponent(s.id);
const cur = existing.get(s.id);
if (diff.create) {
await play.call('POST', `${play.API}/subscriptions?productId=${id}&regionsVersion.version=${v}`, body);
log(TAG, `${s.id}: created`);
} else if (diff.listings.length || diff.basePlan !== 'same') {
if (diff.basePlan === 'changed' && diff.priceChanges.length && !liveOk) warn(TAG, `${s.id}: ${diff.priceChanges.length} price change(s) skipped (run in a terminal to confirm)`);
else {
await play.call('PATCH', `${play.API}/subscriptions/${id}?updateMask=listings,basePlans&regionsVersion.version=${v}`, playPatchSubscription(cur!, body));
log(TAG, `${s.id}: updated`);
}
}
if (diff.activate) {
await play.call('POST', `${play.API}/subscriptions/${id}/basePlans/${basePlanId(s)}:activate`, { packageName: pkg, productId: s.id, basePlanId: basePlanId(s) });
log(TAG, `${s.id}: base plan ${basePlanId(s)} activated`);
}
const regions = body.basePlans![0]!.regionalConfigs!.map(r => ({ regionCode: r.regionCode, price: r.price! }));
const createOffer = async (o: { type: string; usd?: number }, extra?: NonNullable<typeof s.offers>[number]) => {
let offerRegions;
if (o.type === 'pay-up-front') {
const oc = await convert(o.usd!);
offerRegions = { regions: Object.values(oc.convertedRegionPrices).map(r => ({ regionCode: r.regionCode, price: r.price })), other: oc.convertedOtherRegionsPrice };
}
const ob = playOfferBody(pkg, s, regions, offerRegions, extra);
await play.call('POST', `${play.API}/subscriptions/${id}/basePlans/${basePlanId(s)}/offers?offerId=${encodeURIComponent(ob.offerId)}&regionsVersion.version=${v}`, ob);
await play.call('POST', `${play.API}/subscriptions/${id}/basePlans/${basePlanId(s)}/offers/${encodeURIComponent(ob.offerId)}:activate`,
{ packageName: pkg, productId: s.id, basePlanId: basePlanId(s), offerId: ob.offerId });
log(TAG, `${s.id}: offer ${ob.offerId} created and activated`);
};
if (s.intro && offerMissing) await createOffer(s.intro);
for (const o of (s.offers ?? []).filter(x => extraMissing.includes(x.id))) await createOffer(o, o);
}
done(TAG, 'subscriptions done');
}

View file

@ -27,7 +27,7 @@ async function iapId(c: Asc, appId: string, productId: string): Promise<string |
return (await c.asc('GET', `/v1/apps/${appId}/inAppPurchasesV2?filter[productId]=${encodeURIComponent(productId)}`)).data?.[0]?.id ?? null;
}
export async function appleCurrent(c: Asc, id: string, product: string, withAuto: boolean): Promise<{ rows: PriceRow[]; base: string | null }> {
async function appleCurrent(c: Asc, id: string, product: string, withAuto: boolean): Promise<{ rows: PriceRow[]; base: string | null }> {
const q = 'include=inAppPurchasePricePoint,territory&limit=200';
const rows = applePriceRows(product, await pages(c, `/v1/inAppPurchasePriceSchedules/${id}/manualPrices?${q}`));
if (withAuto) rows.push(...applePriceRows(product, await pages(c, `/v1/inAppPurchasePriceSchedules/${id}/automaticPrices?${q}`), 'auto'));
@ -36,14 +36,14 @@ export async function appleCurrent(c: Asc, id: string, product: string, withAuto
}
/** data + included of every page of a paged GET (c.all keeps only data). */
export async function pages(c: Asc, path: string): Promise<{ data: J[]; included: J[] }> {
async function pages(c: Asc, path: string): Promise<{ data: J[]; included: J[] }> {
const out = { data: [] as J[], included: [] as J[] };
let url: string | null = path;
while (url) { const page: J = await c.asc('GET', url); out.data.push(...(page.data ?? [])); out.included.push(...(page.included ?? [])); url = page.links?.next ?? null; }
return out;
}
export async function playProduct(play: PlayClient, id: string): Promise<PlayProduct | null> {
async function playProduct(play: PlayClient, id: string): Promise<PlayProduct | null> {
try { return await play.call<PlayProduct>('GET', `${play.API}/oneTimeProducts/${encodeURIComponent(id)}`); }
catch (e) { if (/-> 404/.test(String(e))) return null; throw e; }
}
@ -103,7 +103,7 @@ export async function run(ctx: Ctx): Promise<void> {
if (!changed.size) { done(TAG, 'prices up to date'); return; }
log(TAG, `${changed.size} product / store pair(s) to update`);
if (dry) { done(TAG, 'dry run: nothing written'); return; }
if (!(await confirm(ctx, `Write the new prices for ${changed.size} product / store pair(s)? Users see them as soon as the stores apply them; an App Store price increase cannot be undone once it starts.`))) return;
if (!(await confirm(ctx, `Write the new prices for ${changed.size} product / store pair(s)? Players see them as soon as the stores apply them; an App Store price increase cannot be undone once it starts.`))) return;
for (const p of products) {
const wanted = wantedAll.filter(r => r.product === p.id);

View file

@ -121,7 +121,7 @@ export async function run(ctx: Ctx): Promise<void> {
if (!plan.send.length) { done(TAG, 'nothing to send'); return; }
console.log(textTable(['store', 'review', 'chars', 'reply'], plan.send.map(d => [d.store, d.reviewId, [...d.reply].length, d.reply.replace(/\s+/g, ' ').slice(0, 70)])));
if (a.has('dry')) { done(TAG, `${plan.send.length} reply(ies) would be sent (dry run)`); return; }
if (!(await confirm(ctx, `Send ${plan.send.length} public reply(ies)? Users are notified and the replies show on the store.`))) return;
if (!(await confirm(ctx, `Send ${plan.send.length} public reply(ies)? Players are notified and the replies show on the store.`))) return;
const { config, root } = ctx.loaded;
const c = plan.send.some(d => d.store === 'apple') ? await ascClient(root, config.apple!.bundleId, config.apple?.appId) : null;
const play = plan.send.some(d => d.store === 'play') ? await playClient(root, config.play!.packageName) : null;

View file

@ -1,4 +1,4 @@
// Raw frames from a running build of your app or game, from any engine.
// Raw frames from a running build of your game, from any engine.
// storebound shots capture [--lang en,tr] [--only hero,shop] [--device phone|tablet] [--source web|ios-sim|android-emu|folder]
// [--dry] [--keep-booted]
// Frames go to <shots.frames>/<lang>/<device>/<name>.png: the screen BELOW the status bar (the template draws one).
@ -19,7 +19,7 @@
// left running with its status bar restored. --dry prints the simctl / adb commands without running them.
// Simulator / emulator screenshots are full screen: cropTop rows (the status bar) are cut so the frame fits the template
// (default per device class from the frame dims: phone 162 px of a 6.9" iPhone, tablet 48 px of a 13" iPad with apple.ipad).
// The app or game needs switches for this: language, scene, fixed seed, no ads / tutorial, freeze. See the store-screenshots skill.
// The game needs switches for this: language, scene, fixed seed, no ads / tutorial, freeze. See the store-screenshots skill.
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
import { homedir } from 'node:os';
import { join } from 'node:path';

View file

@ -22,7 +22,7 @@ export function validateCapture(c: ShotsCapture | undefined): string[] {
const e: string[] = [];
const src = c.source ?? 'web';
if (!SOURCES.includes(src)) return [`shots.capture.source: one of ${SOURCES.join(', ')}`];
if (src === 'web' && !/^https?:\/\//.test(c.baseUrl ?? '')) e.push('shots.capture.baseUrl: http(s) URL of the running app or game (source web)');
if (src === 'web' && !/^https?:\/\//.test(c.baseUrl ?? '')) e.push('shots.capture.baseUrl: http(s) URL of the running game (source web)');
if (src === 'ios-sim') {
if (!c.ios?.bundleId) e.push('shots.capture.ios.bundleId: bundle id of the app on the simulator (source ios-sim)');
if (!c.ios?.device && !c.ios?.devices?.phone) e.push('shots.capture.ios.device: simulator name or UDID, e.g. "iPhone 17 Pro Max"');

View file

@ -1,53 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="/fonts/fonts.css">
<!-- Play feature graphic, app style, 1024 x 500: logo (or the app name) on the left on a calm gradient, an upright phone
with one frame on the right. feature-app.html?lang=<id>[&v=<variant>]. Rendered by `storebound shots render` when
the screenshot style is app. Keep text out of it apart from the name: Play overlays its own UI. -->
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 1024px; height: 500px; overflow: hidden; background: #fff; }
#c { position: relative; width: 1024px; height: 500px; overflow: hidden; isolation: isolate; background: var(--bg); }
.soft { position: absolute; left: 760px; top: 260px; width: 700px; height: 600px; transform: translate(-50%, -50%); z-index: -1;
border-radius: 50%; background: radial-gradient(closest-side, var(--accentSoft), transparent); }
.logo { position: absolute; left: 330px; top: 250px; width: 440px; max-height: 220px; object-fit: contain; transform: translate(-50%, -50%); z-index: 5; }
.name { position: absolute; left: 330px; top: 250px; transform: translate(-50%, -50%); z-index: 5; width: 520px; text-align: center;
font-family: var(--tf); font-weight: 750; font-size: 76px; line-height: 1.02; letter-spacing: -.02em; color: var(--ink); }
.tel { position: absolute; left: 690px; top: 40px; width: 230px; aspect-ratio: var(--ar); z-index: 3; border-radius: 36px; padding: 5px;
background: #121317; box-shadow: inset 0 0 0 1px #3a3c44, 0 22px 50px var(--shadow); }
.screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 31px; background: #fff; }
.screen img { position: absolute; left: 0; bottom: 0; width: 100%; height: var(--appH); object-fit: cover; object-position: top; }
.screen .bar { position: absolute; left: 0; right: 0; top: 0; height: var(--barH); background: #fff center top / 100% 60000% no-repeat; }
.island { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 30%; height: 19px; background: #000; border-radius: 99px; }
</style>
</head>
<body>
<div id="c">
<div class="soft"></div>
<div class="tel"><div class="screen"><div class="bar" id="bar"></div><img id="f"><div class="island"></div></div></div>
</div>
<script type="module">
const q = new URLSearchParams(location.search);
const lang = q.get('lang'), V = q.get('v') ?? '';
const job = await (await fetch(`/job.json?lang=${encodeURIComponent(lang)}&feature=1&v=${encodeURIComponent(V)}`)).json();
const P = job.palette, R = document.documentElement.style, dev = job.phone;
const rgba = (hex, a) => { const m = /^#?([0-9a-f]{6})$/i.exec(hex); if (!m) return hex; const n = parseInt(m[1], 16); return `rgba(${n >> 16},${(n >> 8) & 255},${n & 255},${a})`; };
R.setProperty('--bg', `linear-gradient(135deg, ${P.bg[0]} 0%, ${P.bg[1]} 55%, ${P.bg[2]} 100%)`);
R.setProperty('--ink', P.ink); R.setProperty('--shadow', P.shadow); R.setProperty('--accentSoft', rgba(P.glow, .18));
R.setProperty('--tf', `'${job.fonts.title}', sans-serif`);
R.setProperty('--ar', `${dev.w} / ${dev.h + dev.bar}`);
R.setProperty('--appH', `${100 * dev.h / (dev.h + dev.bar)}%`);
R.setProperty('--barH', `${100 * dev.bar / (dev.h + dev.bar)}%`);
const c = document.getElementById('c');
const src = `/frames/${encodeURIComponent(lang)}/phone/${encodeURIComponent(job.frame)}`;
document.getElementById('f').src = src;
document.getElementById('bar').style.backgroundImage = `url('${src}')`;
c.insertAdjacentHTML('beforeend', job.logo ? '<img class="logo" src="/logo">' : `<div class="name">${String(job.appName).replace(/</g, '&lt;')}</div>`);
await document.fonts.ready;
await Promise.all([...document.images].map(i => i.decode().catch(() => {})));
document.body.dataset.ready = '1';
</script>
</body>
</html>

View file

@ -8,8 +8,7 @@ import { join } from 'node:path';
import type { Ctx } from '../lib/ctx';
import { need } from '../lib/ctx';
import { done, log } from '../lib/log';
import { shotsStyle } from '../lib/config';
import { type CopyFile, copyText, scriptFont, shotFonts } from './lib';
import { type CopyFile, copyText, scriptFont } from './lib';
const UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36';
const ASCII = Array.from({ length: 95 }, (_, i) => String.fromCharCode(32 + i)).join('') + '·';
@ -31,7 +30,7 @@ export async function run(ctx: Ctx): Promise<void> {
const copy = JSON.parse(readFileSync(resolve(shots.copy), 'utf8')) as CopyFile;
const dir = join(root, '.storebound', 'fonts');
mkdirSync(dir, { recursive: true });
const { title, body, titleVariable } = shotFonts(shots, shotsStyle(config));
const title = shots.fonts?.title ?? 'Lilita One', body = shots.fonts?.body ?? 'Montserrat';
const latin = new Set(ASCII);
const scripts = new Map<string, { family: string; chars: Set<string> }>();
@ -47,7 +46,7 @@ export async function run(ctx: Ctx): Promise<void> {
const latinChars = [...latin].sort().join('');
let css = '/* Generated by storebound shots fonts (Google Fonts, SIL Open Font License 1.1), subset to the copy. */\n';
const jobs: [string, string, string, boolean][] = [[title, 'title', latinChars, titleVariable], [body, 'body', latinChars, true],
const jobs: [string, string, string, boolean][] = [[title, 'title', latinChars, false], [body, 'body', latinChars, true],
...[...scripts.entries()].map(([slug, s]) => [s.family, slug, [...s.chars].sort().join(''), true] as [string, string, string, boolean])];
for (const [family, slug, chars, variable] of jobs) {
const bin = await fetchSubset(family, chars, variable);

View file

@ -27,35 +27,14 @@ export const PALETTES: Record<string, Palette> = {
candy: { bg: ['#d01f7a', '#ff4f8b', '#ff9f43'], glow: 'rgba(255,220,180,.9)', ink: '#5e0636', shadow: 'rgba(90,0,50,.45)' },
};
/** Calm palettes for the app style: bg = gradient stops, ink = headline colour, glow = accent (eyebrow, second
* headline line), shadow = device shadow. Light ones first, then dark ones (ocean, slate, night-ink). */
export const APP_PALETTES: Record<string, Palette> = {
mist: { bg: ['#eef2ff', '#e6ebff', '#f6f4ff'], glow: '#4f46e5', ink: '#111827', shadow: 'rgba(30,41,90,.22)' },
paper: { bg: ['#ffffff', '#f7f8fa', '#eef1f5'], glow: '#0f766e', ink: '#0f172a', shadow: 'rgba(15,23,42,.18)' },
mint: { bg: ['#ecfdf5', '#dcfce7', '#f0fdfa'], glow: '#059669', ink: '#064e3b', shadow: 'rgba(6,78,59,.2)' },
sand: { bg: ['#fffbeb', '#fef3c7', '#fff7ed'], glow: '#c2410c', ink: '#3b2a0b', shadow: 'rgba(90,50,10,.2)' },
rose: { bg: ['#fff1f2', '#ffe4e6', '#fdf2f8'], glow: '#e11d48', ink: '#4c0519', shadow: 'rgba(90,10,40,.2)' },
sky: { bg: ['#f0f9ff', '#e0f2fe', '#eef6ff'], glow: '#0369a1', ink: '#0c2a43', shadow: 'rgba(10,50,90,.2)' },
ocean: { bg: ['#0b1736', '#14306e', '#1d4ed8'], glow: '#93c5fd', ink: '#ffffff', shadow: 'rgba(0,0,0,.45)' },
slate: { bg: ['#0f172a', '#1e293b', '#334155'], glow: '#a5b4fc', ink: '#f8fafc', shadow: 'rgba(0,0,0,.5)' },
};
export const palette = (p: string | Palette | undefined, style: 'game' | 'app' = 'game'): Palette => {
const own = style === 'app' ? APP_PALETTES : PALETTES;
if (!p) return style === 'app' ? APP_PALETTES.mist! : PALETTES.fire!;
export const palette = (p: string | Palette | undefined): Palette => {
if (!p) return PALETTES.fire!;
if (typeof p !== 'string') return p;
const hit = own[p] ?? PALETTES[p] ?? APP_PALETTES[p];
if (!hit) throw new Error(`unknown palette "${p}" (${Object.keys(own).join(', ')}) or pass { bg, glow, ink, shadow }`);
const hit = PALETTES[p];
if (!hit) throw new Error(`unknown palette "${p}" (${Object.keys(PALETTES).join(', ')}) or pass { bg, glow, ink, shadow }`);
return hit;
};
/** Screenshot fonts: shots.fonts, else per style (game: Lilita One titles + Montserrat; app: Inter for both). The app
* title is a variable font (bold headline weights). */
export function shotFonts(shots: Pick<ShotsConfig, 'fonts'> | undefined, style: 'game' | 'app'): { title: string; body: string; titleVariable: boolean } {
const d = style === 'app' ? { title: 'Inter', body: 'Inter' } : { title: 'Lilita One', body: 'Montserrat' };
return { title: shots?.fonts?.title ?? d.title, body: shots?.fonts?.body ?? d.body, titleVariable: style === 'app' };
}
export interface SceneCopy { eyebrow?: string; title: [string, string]; sub?: string; badges?: [string, string?][] }
export type CopyFile = Record<string, Record<string, SceneCopy>>;

View file

@ -1,4 +1,4 @@
// App or gameplay clips for app previews / promo videos, from any engine.
// Gameplay clips for app previews / promo videos, from any engine.
// storebound shots record [--lang en,tr] [--only intro,combo] [--source web|ios-sim|android-emu|folder] [--dry] [--keep-booted]
// Config: shots.video.record { source?, device?, clips: { <name>: { seconds, path | url | args | extras, waitFor?, delayMs? } } };
// the URL / simulator / emulator settings are the ones of shots.capture. Out: <shots.video.clips>/<lang>/NN-<name>.mp4
@ -11,7 +11,7 @@
// android-emu `adb shell screenrecord --time-limit <seconds>` on the running emulator / device (never booted, wiped or
// rebooted by storebound), pulled and removed from the device. Demo-mode status bar, per-app language.
// folder your own clips (screen recorder, engine capture, OBS): lists <clips>/<lang>/ or <clips>/ with durations.
// Make the app or game run hands-free for this (an autoplay / attract mode switch) or record yourself playing with
// Make the game playable hands-free for this (an autoplay / attract mode switch) or record yourself playing with
// --source folder. Apple: previews must show footage captured from the app itself.
import { existsSync, mkdirSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';

View file

@ -1,12 +1,10 @@
// Store screenshots + Play feature graphic at exact pixel sizes, from raw app or game frames and per-language copy.
// Store screenshots + Play feature graphic at exact pixel sizes, from raw game frames and per-language copy.
// storebound shots render [--lang en,tr] [--size ios69,play,feature] [--scenes 1,3] [--variant b | --variants]
// [--no-sheet] [--port 8792] [--dry]
// Out: <shots.out>/<lang>/<size>/NN.png (24-bit RGB: Play rejects alpha / palette PNGs), <lang>/feature/1024x500.png,
// <lang>/sheet.png (contact sheet of every size packed into a grid, for a quick review) and <shots.out>/report.json (text overflow flags
// per image, read by `shots check` and `shots gallery`). Variants go to <shots.out>/<variant>/<lang>/...
// Default sizes: defaultSizes() (ipad13 only with apple.ipad). Needs playwright + ffmpeg.
// Style: shotsStyle() = shots.style, else app for the app / subscription-app profiles (template-app.html,
// feature-app.html: calm gradient, device frame, headline + subline), else game (template.html, feature.html).
import { existsSync, mkdirSync, readFileSync, rmSync } from 'node:fs';
import { join, relative } from 'node:path';
import { spawnSync } from 'node:child_process';
@ -14,8 +12,7 @@ import type { Ctx } from '../lib/ctx';
import { need } from '../lib/ctx';
import { done, log, warn } from '../lib/log';
import { launch } from './browser';
import { shotsStyle } from '../lib/config';
import { type CopyFile, SIZES, copyText, defaultSizes, frameDims, mergeCopy, palette, renderDir, scriptFont, sheetLayout, shotFonts, validateCopy, variantScenes } from './lib';
import { type CopyFile, SIZES, copyText, defaultSizes, frameDims, mergeCopy, palette, renderDir, scriptFont, sheetLayout, validateCopy, variantScenes } from './lib';
import { type RenderReport, mergeReport, readReport } from './report';
const TYPES: Record<string, string> = { html: 'text/html; charset=utf-8', png: 'image/png', jpg: 'image/jpeg', jpeg: 'image/jpeg',
@ -54,9 +51,7 @@ export async function run(ctx: Ctx): Promise<void> {
if (!existsSync(join(fontsDir, 'fonts.css'))) warn('shots', 'no .storebound/fonts/fonts.css: run `storebound shots fonts` first (falling back to system fonts)');
const { phone, tablet } = frameDims(config);
const rtl = new Map(config.languages.map(l => [l.id, !!l.rtl] as const));
const style = shotsStyle(config);
const sf = shotFonts(shots, style);
const fonts = { title: sf.title, body: sf.body };
const fonts = { title: shots.fonts?.title ?? 'Lilita One', body: shots.fonts?.body ?? 'Montserrat' };
const tpl = import.meta.dir;
const server = Bun.serve({
@ -69,21 +64,21 @@ export async function run(ctx: Ctx): Promise<void> {
const { scenes, copy } = jobs.get(url.searchParams.get('v') ?? '') ?? jobs.values().next().value!;
const text = copyText(lang, copy[lang]);
const script = scriptFont(lang, text);
const base = { style, phone, tablet, rtl: rtl.get(lang), logo: !!shots.logo, appName: config.app.name,
const base = { phone, tablet, rtl: rtl.get(lang), logo: !!shots.logo, appName: config.app.name,
fonts: { ...fonts, script: script ? `Store ${script.slug}` : null } };
if (url.searchParams.has('feature'))
return Response.json({ ...base, frame: shots.feature?.frame ?? scenes[0]!.frames[0]!.src, palette: palette(shots.feature?.palette ?? scenes[0]!.palette, style) });
return Response.json({ ...base, frame: shots.feature?.frame ?? scenes[0]!.frames[0]!.src, palette: palette(shots.feature?.palette ?? scenes[0]!.palette) });
const sid = url.searchParams.get('s') ?? '';
const scene = scenes.find(s => s.id === sid)!;
const number = scenes.filter(s => !s.hero).indexOf(scene) + 1;
return Response.json({ ...base, scene, number, palette: palette(scene.palette, style), copy: copy[lang]?.[sid] ?? {} });
return Response.json({ ...base, scene, number, palette: palette(scene.palette), copy: copy[lang]?.[sid] ?? {} });
}
let file = '';
if (p === '/logo' && shots.logo) file = resolve(shots.logo);
else if (p.startsWith('/frames/')) file = join(framesDir, p.slice(8));
else if (p.startsWith('/fonts/')) file = join(fontsDir, p.slice(7));
else if (p.startsWith('/out/')) file = join(outDir, p.slice(5));
else if (/^\/(template|feature)(-app)?\.html$/.test(p)) file = join(tpl, p.slice(1));
else if (/^\/(template|feature)\.html$/.test(p)) file = join(tpl, p.slice(1));
if (!file || file.includes('..')) return new Response('no', { status: 404 });
const f = Bun.file(file);
if (!(await f.exists())) return new Response('missing ' + p, { status: 404 });
@ -128,14 +123,14 @@ export async function run(ctx: Ctx): Promise<void> {
const s = SIZES[size]!;
if (s.feature) {
const f = join(dir, 'feature', '1024x500.png');
await shoot(`${base}/${style === 'app' ? 'feature-app' : 'feature'}.html?lang=${encodeURIComponent(lang)}${vq}`, s.w, s.h, f);
await shoot(`${base}/feature.html?lang=${encodeURIComponent(lang)}${vq}`, s.w, s.h, f);
rows.push({ size, files: [f] });
continue;
}
const files: string[] = [];
for (const [i, id] of sceneIds.entries()) {
const f = join(dir, size, `${String(i + 1).padStart(2, '0')}.png`);
await shoot(`${base}/${style === 'app' ? 'template-app' : 'template'}.html?s=${encodeURIComponent(id)}&w=${s.w}&h=${s.h}&lang=${encodeURIComponent(lang)}${s.device ? '&device=tablet' : ''}${size === 'tab7' || size === 'tab10' ? '&style=android' : ''}${vq}`, s.w, s.h, f);
await shoot(`${base}/template.html?s=${encodeURIComponent(id)}&w=${s.w}&h=${s.h}&lang=${encodeURIComponent(lang)}${s.device ? '&device=tablet' : ''}${size === 'tab7' || size === 'tab10' ? '&style=android' : ''}${vq}`, s.w, s.h, f);
files.push(f);
}
rows.push({ size, files });

View file

@ -1,182 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="/fonts/fonts.css">
<!--
Store screenshot template, app style (shots.style 'app', the default for the app / subscription-app profiles).
template-app.html?s=<scene id>&w=<px>&h=<px>&lang=<id>[&device=tablet][&style=android][&v=<variant>]
Calm: a soft gradient (or solid) background, one clean device frame, a headline (two lines) and a subline. No
sunburst, no sparkles; badges only when the copy has them, drawn as quiet chips. Same /job.json as template.html
(palette: bg = gradient stops, ink = headline, glow = accent, shadow = device shadow).
Layout: everything is in u = W / 100; the text block is measured first, then the device fills the room below it.
-->
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow: hidden; background: #fff; }
body { font-family: var(--bf); -webkit-font-smoothing: antialiased; color: var(--ink); }
#c { position: relative; overflow: hidden; width: var(--W); height: var(--H); isolation: isolate; background: var(--bg); }
.soft { position: absolute; left: 50%; top: var(--softY); width: calc(var(--u) * 140); height: calc(var(--u) * 110); z-index: -1;
transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, var(--accentSoft), transparent); }
.top { position: absolute; left: 0; right: 0; top: calc(var(--u) * var(--top)); text-align: center; z-index: 6;
padding: 0 calc(var(--u) * 7); display: flex; flex-direction: column; align-items: center; }
.eyebrow { margin-bottom: calc(var(--u) * 2.4); font-size: calc(var(--u) * 2.9); font-weight: 700; letter-spacing: var(--kls, .14em);
text-transform: uppercase; color: var(--accent); line-height: 1.2; }
h1 { font-family: var(--tf); font-weight: var(--tw); line-height: var(--lh); letter-spacing: var(--ls, -.02em);
font-size: calc(var(--u) * var(--fs)); color: var(--ink); }
h1 span { display: block; width: max-content; max-width: none; margin: 0 auto; white-space: nowrap; }
h1 span + span { color: var(--line2); }
p.sub { margin-top: calc(var(--u) * 2.4); max-width: calc(var(--u) * 78); font-size: calc(var(--u) * var(--sub));
line-height: 1.38; font-weight: 500; color: var(--ink); opacity: .72; text-wrap: balance; }
.logo { width: calc(var(--u) * 60); max-height: calc(var(--u) * 26); object-fit: contain; margin-bottom: calc(var(--u) * 3); }
/* device: a plain modern phone, dark bezel, soft shadow */
.tel { position: absolute; z-index: 3; width: var(--pw); aspect-ratio: var(--ar); left: var(--px); top: var(--py);
transform: translateX(-50%) rotate(var(--pr, 0deg)); transform-origin: 50% 40%;
border-radius: calc(var(--pw) * .155); padding: calc(var(--pw) * .022); background: #121317;
box-shadow: inset 0 0 0 calc(var(--pw) * .005) #3a3c44, 0 calc(var(--u) * 2) calc(var(--u) * 4) rgba(0,0,0,.08),
0 calc(var(--u) * 5) calc(var(--u) * 12) var(--shadow); }
.tel.back { z-index: 2; opacity: .96; }
.screen { position: relative; width: 100%; height: 100%; overflow: hidden; background: #fff; border-radius: calc(var(--pw) * .135); }
.screen img.app { position: absolute; left: 0; bottom: 0; width: 100%; height: var(--appH); object-fit: cover; object-position: top; }
.bar { position: absolute; top: 0; left: 0; right: 0; height: var(--barH); display: flex; align-items: center;
justify-content: space-between; padding: 0 8.5% 0 11.5%; font-family: -apple-system, 'SF Pro Text', var(--bf), sans-serif;
font-weight: 600; font-size: calc(var(--pw) * .041); z-index: 2; color: var(--barInk, #fff);
background: #ffffff center top / 100% 60000% no-repeat; }
.bar svg { height: calc(var(--pw) * .03); width: auto; margin-left: calc(var(--pw) * .012); }
.island { position: absolute; top: calc(var(--pw) * .025); left: 50%; transform: translateX(-50%); width: 30%; height: calc(var(--pw) * .082);
background: #000; border-radius: 999px; z-index: 3; }
.tablet .tel { border-radius: calc(var(--pw) * .06); padding: calc(var(--pw) * .018); }
.tablet .screen { border-radius: calc(var(--pw) * .044); }
.tablet .bar { padding: 0 5%; font-size: calc(var(--pw) * .024); }
.tablet .bar svg { height: calc(var(--pw) * .018); }
.tablet .island { width: calc(var(--pw) * .016); height: calc(var(--pw) * .016); top: calc(var(--pw) * .007); }
.android .tel { border-radius: calc(var(--pw) * .04); padding: calc(var(--pw) * .014); }
.android .screen { border-radius: calc(var(--pw) * .028); }
.android .island { width: calc(var(--pw) * .013); height: calc(var(--pw) * .013); top: calc(var(--pw) * .009); }
.android .bar { padding: 0 4%; }
.chip { position: absolute; z-index: 9; display: flex; flex-direction: column; padding: calc(var(--u) * 1.8) calc(var(--u) * 3);
border-radius: calc(var(--u) * 3); background: rgba(255,255,255,.92); color: #111827; white-space: nowrap;
box-shadow: 0 calc(var(--u) * 1) calc(var(--u) * 3.5) rgba(15,23,42,.14); }
.chip b { font-family: var(--tf); font-weight: 700; font-size: calc(var(--u) * 3.6); line-height: 1.1; }
.chip small { font-size: calc(var(--u) * 2.3); font-weight: 500; opacity: .65; margin-top: calc(var(--u) * .3); }
</style>
</head>
<body>
<div id="c"></div>
<script type="module">
const q = new URLSearchParams(location.search);
const W = +q.get('w'), H = +q.get('h'), LANG = q.get('lang'), SID = q.get('s'), V = q.get('v') ?? '';
const tablet = q.get('device') === 'tablet';
const job = await (await fetch(`/job.json?lang=${encodeURIComponent(LANG)}&s=${encodeURIComponent(SID)}&v=${encodeURIComponent(V)}`)).json();
const S = job.scene, C = job.copy, P = job.palette;
const u = W / 100, Hu = H / u;
const dev = tablet ? job.tablet : job.phone;
const FR = `/frames/${encodeURIComponent(LANG)}/${tablet ? 'tablet' : 'phone'}/`;
document.documentElement.lang = LANG;
const RTL = !!job.rtl;
const R = document.documentElement.style;
// #rrggbb -> rgba with alpha, for the soft accent glow
const rgba = (hex, a) => { const m = /^#?([0-9a-f]{6})$/i.exec(hex); if (!m) return hex; const n = parseInt(m[1], 16); return `rgba(${n >> 16},${(n >> 8) & 255},${n & 255},${a})`; };
const lum = hex => { const m = /^#?([0-9a-f]{6})$/i.exec(hex); if (!m) return 1; const n = parseInt(m[1], 16); return (.299 * (n >> 16) + .587 * ((n >> 8) & 255) + .114 * (n & 255)) / 255; };
const dark = lum(P.bg[1]) < .45;
R.setProperty('--W', W + 'px'); R.setProperty('--H', H + 'px'); R.setProperty('--u', u + 'px');
R.setProperty('--ink', P.ink); R.setProperty('--accent', P.glow); R.setProperty('--shadow', P.shadow);
R.setProperty('--line2', dark ? P.glow : P.ink);
R.setProperty('--accentSoft', rgba(P.glow, dark ? .28 : .14));
R.setProperty('--bg', P.bg[0] === P.bg[2] && P.bg[1] === P.bg[0] ? P.bg[0] : `linear-gradient(180deg, ${P.bg[0]} 0%, ${P.bg[1]} 55%, ${P.bg[2]} 100%)`);
const T = job.fonts.title, B = job.fonts.body, X = job.fonts.script;
R.setProperty('--tf', X ? `'${X}', '${T}', sans-serif` : `'${T}', sans-serif`);
R.setProperty('--bf', X ? `'${X}', '${B}', sans-serif` : `'${B}', sans-serif`);
R.setProperty('--tw', 750);
const CJK = /^(ja|ko|zh)/.test(LANG);
R.setProperty('--lh', /^(ar|hi|fa|ur|th)/.test(LANG) ? 1.3 : CJK ? 1.18 : 1.06);
if (X) { R.setProperty('--ls', '0'); R.setProperty('--kls', '0'); }
if (LANG.startsWith('ja')) document.documentElement.style.wordBreak = 'auto-phrase';
if (LANG.startsWith('ko')) document.documentElement.style.wordBreak = 'keep-all';
if (tablet) document.body.classList.add('tablet');
if (q.get('style') === 'android') document.body.classList.add('android');
const tall = Hu > 200, wide = Hu < 150;
R.setProperty('--top', tall ? 9.5 : wide ? 4.5 : 6);
R.setProperty('--fs', tall ? 8.6 : wide ? 5.6 : 7);
R.setProperty('--sub', tall ? 3.7 : wide ? 2.6 : 3.2);
const AR = dev.w / (dev.h + dev.bar);
R.setProperty('--ar', `${dev.w} / ${dev.h + dev.bar}`);
R.setProperty('--appH', `${100 * dev.h / (dev.h + dev.bar)}%`);
R.setProperty('--barH', `${100 * dev.bar / (dev.h + dev.bar)}%`);
const c = document.getElementById('c');
const esc = s => { const t = String(s ?? '').replace(/&/g, '&amp;').replace(/</g, '&lt;');
return RTL ? t.replace(/\d+(?:\s*\/\s*\d+)?/g, m => '⁦' + m + '⁩') : t; };
let top = '';
if (S.hero && job.logo) top += `<img class="logo" src="/logo">`;
if (C.eyebrow) top += `<div class="eyebrow">${esc(C.eyebrow)}</div>`;
top += `<h1><span>${esc(C.title?.[0])}</span>${C.title?.[1] ? `<span>${esc(C.title[1])}</span>` : ''}</h1>`;
if (C.sub) top += `<p class="sub">${esc(C.sub)}</p>`;
c.innerHTML = `<div class="soft"></div><div class="top"${RTL ? ' dir="rtl"' : ''}>${top}</div>`;
await document.fonts.ready;
await Promise.all([...document.images].map(i => i.decode().catch(() => {})));
const overflow = [];
for (const [i, sp] of [...c.querySelectorAll('h1 span')].entries()) {
const max = W - 12 * u, wd = sp.getBoundingClientRect().width;
let f = 1; while (wd * f > max && f > .55) f -= .02;
if (f < 1) sp.style.fontSize = `calc(${getComputedStyle(sp).fontSize} * ${f.toFixed(2)})`;
if (wd * f > max + 1) overflow.push(`title line ${i + 1} is too long even at 55 % size: shorten it`);
else if (f < .7) overflow.push(`title line ${i + 1} shrunk to ${Math.round(f * 100)} %: consider shorter words`);
}
const subEl = c.querySelector('p.sub');
if (subEl) { const lines = Math.round(subEl.getBoundingClientRect().height / parseFloat(getComputedStyle(subEl).lineHeight)); if (lines > 3) overflow.push(`subtitle wraps to ${lines} lines (max 3)`); }
const textBottom = c.querySelector('.top').getBoundingClientRect().bottom / u;
const frames = S.frames.map(f => ({ x: 0, dy: 0, scale: 1, rotate: 0, ...f }));
const front = frames[0];
const pTop = textBottom + (tall ? 6 : 4.5);
const room = Hu - pTop + (S.over ?? 9);
const pw = Math.min(tablet ? 80 : 74, Math.max(52, room * AR)) * front.scale;
const ph = pw / AR;
R.setProperty('--softY', (pTop + ph * .35) * u + 'px');
// status bar text colour from the frame's own top row (dark text on a light app bar)
async function barInk(src) {
try {
const img = new Image(); img.src = src; await img.decode();
const cv = document.createElement('canvas'); cv.width = 8; cv.height = 2;
const g = cv.getContext('2d'); g.drawImage(img, 0, 0, img.naturalWidth, 2, 0, 0, 8, 2);
const d = g.getImageData(0, 0, 8, 1).data; let L = 0;
for (let i = 0; i < d.length; i += 4) L += .299 * d[i] + .587 * d[i + 1] + .114 * d[i + 2];
return L / (d.length / 4) > 150 ? '#111' : '#fff';
} catch { return '#fff'; }
}
const BAR = `<span>9:41</span><span style="display:flex;align-items:center">
<svg viewBox="0 0 18 12"><g fill="currentColor"><rect x="0" y="8" width="3" height="4" rx=".8"/><rect x="5" y="5.5" width="3" height="6.5" rx=".8"/><rect x="10" y="3" width="3" height="9" rx=".8"/><rect x="15" y="0" width="3" height="12" rx=".8"/></g></svg>
<svg viewBox="0 0 16 12"><path fill="currentColor" d="M8 2.2c2.3 0 4.4.9 6 2.4l1.3-1.3A10.3 10.3 0 0 0 8 .4C5.2.4 2.6 1.5.7 3.3L2 4.6a8.5 8.5 0 0 1 6-2.4zm0 3.6c1.3 0 2.5.5 3.4 1.3l1.3-1.3A6.6 6.6 0 0 0 8 4c-1.8 0-3.4.7-4.7 1.8l1.3 1.3C5.5 6.3 6.7 5.8 8 5.8zm0 3.6c.4 0 .8.2 1.1.4L8 11.6 6.9 9.8c.3-.2.7-.4 1.1-.4z"/></svg>
<svg viewBox="0 0 27 13"><rect x=".5" y=".5" width="23" height="12" rx="3.5" fill="none" stroke="currentColor" stroke-opacity=".45"/><rect x="2" y="2" width="20" height="9" rx="2.2" fill="currentColor"/><path d="M25 4.5v4c.8-.3 1.4-1.1 1.4-2s-.6-1.7-1.4-2z" fill="currentColor" fill-opacity=".45"/></svg></span>`;
let html = '';
const phone = async (f, cls) => {
const w = pw / front.scale * f.scale, src = FR + encodeURIComponent(f.src);
const ink = await barInk(src);
return `<div class="tel ${cls}" style="--pw:${w * u}px;--px:${(50 + f.x) * u}px;--py:${(pTop + f.dy) * u}px;--pr:${f.rotate}deg"><div class="screen">
<div class="bar" style="background-image:url('${src}');--barInk:${ink}">${BAR}</div><div class="island"></div><img class="app" src="${src}"></div></div>`;
};
for (const f of frames.slice(1)) html += await phone(f, 'back');
html += await phone(front, 'front');
(S.badges ?? []).forEach((b, i) => {
const [big, small] = (C.badges ?? [])[i] ?? [''];
if (!big) return;
const pos = b.side === 'l' ? `left:${5 * u}px` : `right:${5 * u}px`;
html += `<div class="chip"${RTL ? ' dir="rtl"' : ''} style="${pos};top:${Math.min(pTop + ph * b.y, Hu - 14) * u}px"><b>${esc(big)}</b>${small ? `<small>${esc(small)}</small>` : ''}</div>`;
});
c.insertAdjacentHTML('beforeend', html);
await Promise.all([...document.images].map(i => i.decode().catch(() => {})));
if (textBottom > Hu * .45) overflow.push(`text block covers ${Math.round(textBottom / Hu * 100)} % of the height (the app should be the star)`);
for (const b of c.querySelectorAll('.chip')) { const r = b.getBoundingClientRect(); if (r.left < 0 || r.right > W || r.bottom > H) overflow.push(`badge "${b.textContent.trim().slice(0, 30)}" runs off the image`); }
document.body.dataset.overflow = JSON.stringify(overflow);
document.body.dataset.ready = '1';
</script>
</body>
</html>

View file

@ -1,4 +1,4 @@
// App preview (App Store) and promo video (Play, via YouTube) from app or gameplay clips, with ffmpeg.
// App preview (App Store) and promo video (Play, via YouTube) from gameplay clips, with ffmpeg.
// storebound shots video [--lang en,tr] [--target iphone,ipad,youtube] [--seconds 25] [--no-captions] [--dry]
// Clips: <shots.video.clips>/<lang>/*.mp4|mov|webm (or <clips>/*.* shared by every language), joined in name order.
// Record them with `storebound shots record` (simulator, emulator or web build) or bring your own.
@ -15,8 +15,7 @@ import type { Ctx } from '../lib/ctx';
import { need } from '../lib/ctx';
import { done, log, warn } from '../lib/log';
import { launch } from './browser';
import { shotsStyle } from '../lib/config';
import { captionsFor, type CopyFile, copyText, palette, renderDir, scriptFont, shotFonts } from './lib';
import { captionsFor, type CopyFile, copyText, palette, renderDir, scriptFont } from './lib';
import { ffprobe } from './report';
import { checkVideo, PREVIEW_RULES, VIDEO_TARGETS } from './spec';
@ -155,10 +154,9 @@ export async function run(ctx: Ctx): Promise<void> {
const lang = url.searchParams.get('lang') ?? '';
const texts = captionsFor(copy[lang], sceneIds, 64);
const script = scriptFont(lang, copyText(lang, copy[lang]));
const style = shotsStyle(ctx.loaded.config);
const pal = palette(shots.scenes[0]?.palette, style);
return Response.json({ text: texts[Number(url.searchParams.get('i'))] ?? '', ink: style === 'app' ? '#111827' : pal.ink, rtl: rtl.get(lang),
fonts: { title: shotFonts(shots, style).title, script: script ? `Store ${script.slug}` : null } });
const pal = palette(shots.scenes[0]?.palette);
return Response.json({ text: texts[Number(url.searchParams.get('i'))] ?? '', ink: pal.ink, rtl: rtl.get(lang),
fonts: { title: shots.fonts?.title ?? 'Lilita One', script: script ? `Store ${script.slug}` : null } });
}
if (url.pathname === '/caption.html') return new Response(Bun.file(join(import.meta.dir, 'caption.html')), { headers: { 'content-type': 'text/html; charset=utf-8' } });
if (url.pathname.startsWith('/fonts/') && !url.pathname.includes('..')) {

View file

@ -5,41 +5,21 @@
// of the public privacy policy and app-ads.txt URLs. Also checks the local renders folder (if there is one) with the
// `shots check` rules: wrong pixel size, alpha, too few / many images, Play 8 MB and feature graphic format are
// blockers (the upload would fail), text overflow flags from the last render are warnings. --no-local skips it.
// Subscriptions (when the config has them): App Store states, localizations, group names, review screenshots; Play
// subscriptions with an active base plan. App profile: delete-account URL answers (accounts), demo account locally and
// on App Review (sign-in required), Terms of Use URL answers and is linked in the description (subscriptions).
// Live apps: crash / ANR vitals (Play Reporting API) and App Store diagnostics, as in `storebound health`: over a Play
// bad behavior threshold is a blocker, near it a warning; a store without vitals access is only noted. --no-health skips.
import { ascClient, type J } from './apple/asc';
import { requiredDisplayTypes } from './apple/screenshots';
import { type Loaded, playCodes, profileOf, sellsOn } from './lib/config';
import { reviewDemoAccount } from './lib/credentials';
import { allSubscriptions, basePlanId } from './lib/subscriptions';
import { playCodes } from './lib/config';
import type { Ctx } from './lib/ctx';
import { checkUrl } from './lib/http';
import { collectHealth } from './health';
import { healthFindings } from './lib/health';
import { log, warn } from './lib/log';
import { type AppleSnapshot, appleRules, type Finding, formatFindings, PLAY_REQUIRED_IMAGES, type PlaySnapshot, playRules, type ProfileFacts, rendersFindings, sortFindings } from './lib/validate-rules';
import { type AppleSnapshot, appleRules, type Finding, formatFindings, PLAY_REQUIRED_IMAGES, type PlaySnapshot, playRules, rendersFindings, sortFindings } from './lib/validate-rules';
import { rendersCheck } from './shots/check';
import { playClient } from './play/client';
import { listOneTimeProducts } from './play/products';
/** Profile facts for the checks: config + local credentials + public URL checks (no store API). */
export async function collectProfile(loaded: Loaded): Promise<ProfileFacts> {
const { config, root } = loaded;
return {
profile: profileOf(config),
accounts: !!config.accounts?.enabled,
inAppDeletion: !!config.accounts?.inApp,
deletionUrl: config.accounts?.enabled && config.accounts.deletionUrl ? await checkUrl(config.accounts.deletionUrl) : null,
signInRequired: !!config.reviewAccess?.signInRequired,
demoAccountLocal: !!reviewDemoAccount(root),
subscriptions: !!allSubscriptions(config.subscriptions).length,
termsUrl: config.app.termsUrl ? await checkUrl(config.app.termsUrl) : null,
};
}
export async function collectApple(ctx: Ctx): Promise<AppleSnapshot> {
const { config, root } = ctx.loaded;
const c = await ascClient(root, config.apple!.bundleId, config.apple?.appId);
@ -78,31 +58,14 @@ export async function collectApple(ctx: Ctx): Promise<AppleSnapshot> {
const shot = (await c.maybe(`/v2/inAppPurchases/${p.id}/appStoreReviewScreenshot`))?.data;
iaps.push({ productId: p.attributes.productId, state: p.attributes.state, reviewScreenshot: !!shot });
}
const wantSubs = allSubscriptions(config.subscriptions).filter(x => sellsOn(config, x.sub, 'apple'));
const subscriptions: NonNullable<AppleSnapshot['subscriptions']> = [];
if (wantSubs.length) {
log('validate', 'apple: subscriptions');
for (const g of await c.all(`/v1/apps/${appId}/subscriptionGroups?limit=200`)) {
const groupLocales = (await c.all(`/v1/subscriptionGroups/${g.id}/subscriptionGroupLocalizations?limit=200`)).map((l: J) => ({ locale: l.attributes.locale, state: l.attributes.state }));
for (const sub of await c.all(`/v1/subscriptionGroups/${g.id}/subscriptions?limit=200`)) {
const locales = (await c.all(`/v1/subscriptions/${sub.id}/subscriptionLocalizations?limit=200`)).map((l: J) => ({ locale: l.attributes.locale, state: l.attributes.state }));
const shot = !!(await c.maybe(`/v1/subscriptions/${sub.id}/appStoreReviewScreenshot`))?.data;
subscriptions.push({ productId: sub.attributes.productId, group: g.attributes.referenceName, state: sub.attributes.state, locales, groupLocales, reviewScreenshot: shot });
}
}
}
const appleLocale = new Map(config.languages.map(l => [l.id, l.apple] as const));
return {
subscriptions, expectedSubscriptions: wantSubs.map(({ group, sub }) => ({ id: sub.id, group: group.name,
locales: Object.keys(sub.listings).map(id => appleLocale.get(id)).filter((x): x is string => !!x) })),
profile: await collectProfile(ctx.loaded),
version: v ? { versionString: v.attributes.versionString, state: v.attributes.appVersionState ?? v.attributes.appStoreState } : null,
build, locales, reviewDetail, ageRating,
expectedLocales: config.languages.map(l => l.apple).filter((x): x is string => !!x),
requiredDisplayTypes: requiredDisplayTypes(config.apple),
priceSchedule: !!sched?.included?.some((x: J) => x.type === 'appPrices'),
availability: !!avail?.data,
iaps, expectedProducts: (config.products ?? []).filter(p => sellsOn(config, p, 'apple')).map(p => p.id),
iaps, expectedProducts: (config.products ?? []).map(p => p.id),
privacyUrl: await checkUrl(config.app.privacyPolicyUrl),
};
}
@ -132,22 +95,10 @@ export async function collectPlay(ctx: Ctx): Promise<PlaySnapshot> {
if (website && (appAdsLines.length || adsLikely)) {
try { appAds = await checkUrl(new URL('/app-ads.txt', website).href, { body: true }); } catch { appAds = { url: website, status: null, error: 'bad website URL' }; }
}
const wantSubs = allSubscriptions(config.subscriptions).filter(x => sellsOn(config, x.sub, 'play'));
const subscriptions: NonNullable<PlaySnapshot['subscriptions']> = [];
if (wantSubs.length) {
let page = '';
do {
const r = await play.call<{ subscriptions?: { productId: string; basePlans?: { basePlanId: string; state?: string }[] }[]; nextPageToken?: string }>('GET', `${play.API}/subscriptions?pageSize=100${page ? '&pageToken=' + page : ''}`);
for (const x of r.subscriptions ?? []) subscriptions.push({ productId: x.productId, basePlans: (x.basePlans ?? []).map(b => ({ basePlanId: b.basePlanId, state: b.state })) });
page = r.nextPageToken ?? '';
} while (page);
}
return {
subscriptions, expectedSubscriptions: wantSubs.map(({ sub }) => ({ id: sub.id, basePlanId: basePlanId(sub) })),
profile: await collectProfile(ctx.loaded),
defaultLanguage: details.defaultLanguage ?? config.play?.defaultLanguage ?? 'en-US',
expectedLanguages: config.languages.flatMap(playCodes), listings, tracks, products,
expectedProducts: (config.products ?? []).filter(p => sellsOn(config, p, 'play')).map(p => p.id),
expectedProducts: (config.products ?? []).map(p => p.id),
privacyUrl: await checkUrl(config.app.privacyPolicyUrl), website, appAds, appAdsLines, adsLikely,
};
} finally {

View file

@ -1,4 +1,4 @@
// Draft user-facing release notes from the git log and write them into the listing files (text only; nothing is
// Draft player-facing release notes from the git log and write them into the listing files (text only; nothing is
// sent to a store). A human (or an agent with the whats-new skill) rewrites and translates before `play release` /
// `apple listing` push them.
// storebound whats-new [--since v1.1.0] [--lang en-US] [--all] [--hook "text"] [--dry]
@ -23,7 +23,7 @@ export async function run(ctx: Ctx): Promise<void> {
const range = since ? `${since}..HEAD` : 'HEAD';
const subjects = git(['log', range, '--no-merges', '--format=%s'], root).split('\n').filter(Boolean);
const items = noteItems(subjects);
log('whats-new', `${subjects.length} commits since ${since || 'the first commit'} -> ${items.length} user-facing items`);
log('whats-new', `${subjects.length} commits since ${since || 'the first commit'} -> ${items.length} player-facing items`);
const hook = a.get('hook');
const play = formatNotes(items, { hook, limit: NOTES_LIMITS.play });
const apple = formatNotes(items, { hook, limit: NOTES_LIMITS.apple });

View file

@ -12,8 +12,7 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
3. **Read before you write.** `storebound check` (offline) and `storebound validate` (read-only, both stores) tell you
what is missing and in which order to fix it.
4. **Credentials only from the environment or `.storebound/`** in the project (gitignored). Never ask for keys,
passwords or tokens in chat, never print them, never write them into the config, docs or commits. The same goes
for the App Review demo account (`reviewDemoAccount` in `.storebound/credentials.json`): the owner puts it there.
passwords or tokens in chat, never print them, never write them into the config, docs or commits.
5. **Never answer a compliance question you cannot know.** Export compliance, Data safety, App Privacy, age rating,
target audience: ask the owner when the code does not prove the answer. A wrong "no" is worse than a slow "ask".
6. **Pick builds by explicit number.** Use the build number / versionCode you just uploaded, never "the latest".

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

View file

@ -1,5 +0,0 @@
# Generated by storebound (re-create with the commands in README.md)
.storebound/
store/shots/frames/
store/renders/
store/video/

View file

@ -1,19 +0,0 @@
# Tidy Lists (demo app)
A tiny fictional list app made only to show storebound's **app profile** and the **app screenshot style** (calm
gradient, a clean device frame, headline + subline, no sparkles or badges). One static page with sample data and the
switches a real app needs for store captures: `lang` and `screen` (`lists`, `list`, `share`, `account`). The ids and
URLs in `storebound.config.ts` are placeholders; nothing here talks to a store.
From this folder (needs Bun, ffmpeg, and Playwright's Chromium or Google Chrome):
```sh
bun serve.ts & # the app on http://127.0.0.1:8741
bun ../../cli/index.ts shots capture # raw frames: 2 languages x phone + tablet
bun ../../cli/index.ts shots fonts # Inter subset for the copy
bun ../../cli/index.ts shots render --size ios69,play,feature
bun ../../cli/index.ts shots gallery # store/renders/index.html
bun ../../cli/index.ts check # profile checks: delete-account URL, demo account, terms URL
```
Everything it writes (`store/shots/frames`, `store/renders`, `.storebound`) is gitignored.

View file

@ -1,18 +0,0 @@
#!/usr/bin/env bun
// Static server for the demo app's web page. bun examples/demo-app/serve.ts [--port 8741]
const i = process.argv.indexOf('--port');
const port = Number(i > 0 ? process.argv[i + 1] : process.env.PORT ?? 8741);
const root = new URL('./web/', import.meta.url).pathname;
const TYPES: Record<string, string> = { html: 'text/html; charset=utf-8', js: 'text/javascript; charset=utf-8', css: 'text/css' };
const server = Bun.serve({
port, hostname: '127.0.0.1',
async fetch(req) {
let p = decodeURIComponent(new URL(req.url).pathname);
if (p.endsWith('/')) p += 'index.html';
if (p.includes('..')) return new Response('no', { status: 400 });
const f = Bun.file(root + p.slice(1));
if (!(await f.exists())) return new Response('not found', { status: 404 });
return new Response(f, { headers: { 'content-type': TYPES[p.split('.').pop() ?? ''] ?? 'application/octet-stream', 'cache-control': 'no-store' } });
},
});
console.log(`Tidy Lists demo on http://127.0.0.1:${server.port}/`);

View file

@ -1,14 +0,0 @@
{
"en": {
"lists": { "eyebrow": "Tidy Lists", "title": ["Every list,", "in one calm place"], "sub": "Groceries, trips and projects, synced on all your devices." },
"check": { "eyebrow": "Check it off", "title": ["See what is left", "at a glance"], "sub": "Tap to tick, swipe to reorder, done items fade away." },
"share": { "eyebrow": "Shared lists", "title": ["Plan together,", "shop once"], "sub": "Invite family or friends by link and edit the same list live." },
"account": { "eyebrow": "Your data", "title": ["Private by default,", "yours to export"], "sub": "Export everything or delete your account in Settings, any time." }
},
"tr": {
"lists": { "eyebrow": "Tidy Lists", "title": ["Tüm listelerin,", "tek sakin bir yerde"], "sub": "Market, gezi ve projeler; tüm cihazlarında eşitlenir." },
"check": { "eyebrow": "İşaretle", "title": ["Kalanları", "bir bakışta gör"], "sub": "Dokun işaretle, sürükle sırala, bitenler sessizce solar." },
"share": { "eyebrow": "Paylaşılan listeler", "title": ["Birlikte planla,", "bir kez alışveriş yap"], "sub": "Aileni ya da arkadaşlarını bağlantıyla davet et, aynı listeyi canlı düzenleyin." },
"account": { "eyebrow": "Verilerin", "title": ["Varsayılan olarak gizli,", "dışa aktarması senin"], "sub": "Her şeyi dışa aktar ya da hesabını Ayarlar'dan istediğin an sil." }
}
}

View file

@ -1,51 +0,0 @@
// storebound config of the demo app "Tidy Lists" (fictional, made for this repo) to show the app profile and the app
// screenshot style. Placeholder ids and URLs only: nothing here points at a real store record. See README.md.
import type { ShipConfig } from '../../cli/lib/config';
const config: ShipConfig = {
app: {
name: 'Tidy Lists',
profile: 'app',
copyright: '2026 Example Studio',
privacyPolicyUrl: 'https://example.com/privacy',
termsUrl: 'https://example.com/terms',
supportUrl: 'https://example.com/support',
website: 'https://example.com',
contactEmail: 'support@example.com',
},
accounts: { enabled: true, deletionUrl: 'https://example.com/delete-account', inApp: 'Settings > Account > Delete account' },
reviewAccess: { signInRequired: true, instructions: 'Sign in with the demo account; the Groceries list is shared with a second demo user.' },
languages: [
{ id: 'en', play: 'en-US', apple: 'en-US' },
{ id: 'tr', play: 'tr-TR', apple: 'tr' },
],
play: { packageName: 'com.example.tidylists' },
apple: { bundleId: 'com.example.tidylists' },
renders: 'store/renders',
shots: {
style: 'app',
copy: 'store/shots/copy.json',
frames: 'store/shots/frames',
out: 'store/renders',
scenes: [
{ id: 'lists', palette: 'mist', frames: [{ src: 'lists.png' }] },
{ id: 'check', palette: 'mint', frames: [{ src: 'list.png' }] },
{ id: 'share', palette: 'sky', frames: [{ src: 'share.png' }] },
{ id: 'account', palette: 'slate', frames: [{ src: 'account.png' }] },
],
feature: { frame: 'lists.png', palette: 'mist' },
capture: {
source: 'web',
baseUrl: 'http://127.0.0.1:8741',
query: 'lang={lang}',
shots: {
lists: { path: '/?screen=lists', waitFor: 'window.app && app.ready', delayMs: 100, device: 'both' },
list: { path: '/?screen=list', waitFor: 'window.app && app.ready', delayMs: 100, device: 'both' },
share: { path: '/?screen=share', waitFor: 'window.app && app.ready', delayMs: 100, device: 'both' },
account: { path: '/?screen=account', waitFor: 'window.app && app.ready', delayMs: 100, device: 'both' },
},
},
},
};
export default config;

View file

@ -1,85 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>Tidy Lists (storebound demo)</title>
<!--
A tiny fictional list app, made only to show storebound's app screenshot style. Sample data only, no network.
Switches for store captures: ?screen=lists|list|share|account&lang=en|tr (window.app.ready turns true when drawn).
-->
<style>
:root { --bg: #f6f7fb; --card: #ffffff; --ink: #111827; --muted: #6b7280; --line: #e5e7eb; --accent: #4f46e5; --ok: #059669; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--ink); font: 16px/1.4 -apple-system, 'Segoe UI', Roboto, Inter, sans-serif; }
header { padding: 18px 20px 10px; background: var(--bg); }
header small { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
h1 { font-size: 30px; font-weight: 750; letter-spacing: -.02em; margin-top: 2px; }
main { padding: 6px 16px 90px; display: grid; gap: 12px; }
.card { background: var(--card); border-radius: 18px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(17,24,39,.06); }
.row { display: flex; align-items: center; gap: 12px; }
.dot { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.grow { flex: 1; min-width: 0; }
.t { font-weight: 650; }
.m { color: var(--muted); font-size: 13px; }
.bar { height: 6px; border-radius: 6px; background: var(--line); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c7cbd4; flex: none; display: grid; place-items: center; }
.check.on { background: var(--ok); border-color: var(--ok); }
.check.on::after { content: ""; width: 10px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.done .t { color: var(--muted); text-decoration: line-through; }
.item { padding: 13px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; }
.pill { font-size: 12px; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: #eef2ff; color: var(--accent); }
.btn { display: block; text-align: center; padding: 14px; border-radius: 14px; font-weight: 650; background: var(--accent); color: #fff; }
.danger { color: #dc2626; font-weight: 650; }
nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 10px 0 26px; background: rgba(255,255,255,.94); border-top: 1px solid var(--line); }
nav span { font-size: 11px; color: var(--muted); font-weight: 600; display: grid; justify-items: center; gap: 4px; }
nav span b { width: 22px; height: 22px; border-radius: 7px; background: #d1d5db; }
nav span.on { color: var(--accent); } nav span.on b { background: var(--accent); }
.fab { position: fixed; right: 20px; bottom: 96px; width: 58px; height: 58px; border-radius: 18px; background: var(--accent); color: #fff; font-size: 32px; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(79,70,229,.35); }
</style>
</head>
<body>
<div id="app"></div>
<script>
const q = new URLSearchParams(location.search);
const lang = q.get('lang') === 'tr' ? 'tr' : 'en';
const screen = q.get('screen') || 'lists';
document.documentElement.lang = lang;
const T = {
en: { today: 'Thursday, 9 October', lists: 'My lists', groceries: 'Groceries', trip: 'Weekend trip', home: 'Home projects', reading: 'Reading',
items: n => `${n} items`, shared: 'Shared', milk: 'Oat milk', bread: 'Sourdough bread', apples: 'Apples', coffee: 'Coffee beans', pasta: 'Pasta', basil: 'Fresh basil',
left: '3 of 6 left', share: 'Share list', people: 'People on this list', owner: 'Owner', canEdit: 'Can edit', invite: 'Invite by link',
account: 'Account', signedIn: 'Signed in as', sync: 'Sync across devices', on: 'On', export: 'Export my data', privacy: 'Privacy policy', terms: 'Terms of use', del: 'Delete account',
tabs: ['Lists', 'Today', 'Shared', 'Settings'] },
tr: { today: '9 Ekim Perşembe', lists: 'Listelerim', groceries: 'Market', trip: 'Hafta sonu gezisi', home: 'Ev işleri', reading: 'Okuma',
items: n => `${n} öğe`, shared: 'Paylaşılan', milk: 'Yulaf sütü', bread: 'Ekşi maya ekmek', apples: 'Elma', coffee: 'Kahve çekirdeği', pasta: 'Makarna', basil: 'Taze fesleğen',
left: '6 öğeden 3 kaldı', share: 'Listeyi paylaş', people: 'Bu listedeki kişiler', owner: 'Sahip', canEdit: 'Düzenleyebilir', invite: 'Bağlantıyla davet et',
account: 'Hesap', signedIn: 'Giriş yapan', sync: 'Cihazlar arası eşitleme', on: 'Açık', export: 'Verilerimi dışa aktar', privacy: 'Gizlilik politikası', terms: 'Kullanım koşulları', del: 'Hesabı sil',
tabs: ['Listeler', 'Bugün', 'Paylaşılan', 'Ayarlar'] },
}[lang];
const nav = on => `<nav>${T.tabs.map((t, i) => `<span class="${i === on ? 'on' : ''}"><b></b>${t}</span>`).join('')}</nav>`;
const list = (c, name, n, pct, extra = '') => `<div class="card"><div class="row"><div class="dot" style="background:${c}">${name[0]}</div><div class="grow"><div class="t">${name}</div><div class="m">${T.items(n)}${extra}</div><div class="bar"><i style="width:${pct}%"></i></div></div></div></div>`;
const item = (on, t, m = '') => `<div class="item row ${on ? 'done' : ''}"><div class="check ${on ? 'on' : ''}"></div><div class="grow"><div class="t">${t}</div>${m ? `<div class="m">${m}</div>` : ''}</div></div>`;
const S = {
lists: () => `<header><small>${T.today}</small><h1>${T.lists}</h1></header><main>
${list('#4f46e5', T.groceries, 6, 50, ` · <span class="pill">${T.shared}</span>`)}${list('#0ea5e9', T.trip, 9, 20)}${list('#059669', T.home, 5, 80)}${list('#f59e0b', T.reading, 12, 35)}
</main><div class="fab">+</div>${nav(0)}`,
list: () => `<header><small>${T.left}</small><h1>${T.groceries}</h1></header><main><div class="card">
${item(true, T.milk)}${item(true, T.bread)}${item(false, T.apples, '1 kg')}${item(true, T.coffee)}${item(false, T.pasta)}${item(false, T.basil)}
</div></main>${nav(0)}`,
share: () => `<header><small>${T.groceries}</small><h1>${T.share}</h1></header><main><div class="card"><div class="m" style="margin-bottom:6px">${T.people}</div>
${[['#4f46e5', 'Alex Kim', T.owner], ['#db2777', 'Sam Rivera', T.canEdit], ['#0d9488', 'Deniz Ay', T.canEdit]].map(([c, n, r]) => `<div class="item row"><div class="av" style="background:${c}">${n[0]}</div><div class="grow"><div class="t">${n}</div><div class="m">${r}</div></div></div>`).join('')}
</div><div class="btn">${T.invite}</div></main>${nav(2)}`,
account: () => `<header><small>${T.signedIn} demo@example.com</small><h1>${T.account}</h1></header><main><div class="card">
<div class="item row"><div class="grow t">${T.sync}</div><span class="pill">${T.on}</span></div><div class="item row"><div class="grow t">${T.export}</div></div>
<div class="item row"><div class="grow t">${T.privacy}</div></div><div class="item row"><div class="grow t">${T.terms}</div></div></div>
<div class="card"><div class="danger">${T.del}</div></div></main>${nav(3)}`,
};
document.getElementById('app').innerHTML = (S[screen] || S.lists)();
window.app = { ready: true };
</script>
</body>
</html>

View file

@ -1,7 +1,7 @@
{
"name": "storebound",
"version": "0.5.0",
"description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.",
"version": "0.4.0",
"description": "From nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products with regional prices, every questionnaire (Data safety, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.",
"contextFileName": "GEMINI.md",
"mcpServers": {
"storebound": {

View file

@ -1,7 +1,7 @@
{
"name": "storebound",
"version": "0.5.0",
"description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a Bun CLI, an MCP server and Agent Skills for your AI coding agent.",
"version": "0.4.0",
"description": "Take a mobile game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products with regional prices, every store questionnaire, privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a Bun CLI, an MCP server and Agent Skills for your AI coding agent.",
"license": "MIT",
"author": "CRTkafa",
"type": "module",
@ -12,9 +12,7 @@
"keywords": [
"google-play",
"app-store-connect",
"mobile-apps",
"mobile-games",
"subscriptions",
"store-listing",
"in-app-purchases",
"screenshots",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

View file

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>storebound · from zero to Submit for review on Google Play and the App Store</title>
<meta name="description" content="Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, in-app products and subscriptions, listings in every language, every questionnaire, account deletion and review access, privacy, icons, screenshots and previews. One config and your AI coding agent. storebound never presses Submit.">
<meta name="description" content="Take a mobile game from nothing to Submit for review on Google Play and the App Store: app records, IAP prices, listings in every language, every questionnaire, privacy, icons, screenshots and previews. One config and your AI coding agent. storebound never presses Submit.">
<link rel="canonical" href="https://storebound.dev/">
<meta name="color-scheme" content="light dark">
<meta name="theme-color" content="#f8fafc" media="(prefers-color-scheme: light)">
@ -13,15 +13,15 @@
<meta property="og:type" content="website">
<meta property="og:site_name" content="storebound">
<meta property="og:url" content="https://storebound.dev/">
<meta property="og:title" content="storebound · take your app or game from zero to Submit for review">
<meta property="og:description" content="For mobile apps and games: app records, in-app products and subscriptions, listings in every language, every questionnaire, privacy, icons, screenshots. One config and your AI coding agent. Open source, MIT.">
<meta property="og:title" content="storebound · from zero to Submit for review on both stores">
<meta property="og:description" content="App records, IAP prices, listings in every language, every questionnaire, privacy, icons, screenshots. One config and your AI coding agent. Open source, MIT.">
<meta property="og:image" content="https://storebound.dev/og.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="storebound: take a mobile app or game from zero to Submit for review on Google Play and the App Store">
<meta property="og:image:alt" content="storebound: from zero to Submit for review on Google Play and the App Store">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="storebound · take your app or game from zero to Submit for review">
<meta name="twitter:description" content="For mobile apps and games: app records, in-app products and subscriptions, listings in every language, every questionnaire, privacy, icons, screenshots. One config and your AI coding agent.">
<meta name="twitter:title" content="storebound · from zero to Submit for review on both stores">
<meta name="twitter:description" content="App records, IAP prices, listings in every language, every questionnaire, privacy, icons, screenshots. One config and your AI coding agent.">
<meta name="twitter:image" content="https://storebound.dev/og.png">
<link rel="stylesheet" href="style.css">
<script>document.documentElement.classList.add('js')</script>
@ -51,8 +51,8 @@
<div class="wrap hero-in">
<div class="hero-copy">
<p class="eyebrow"><span class="dot" aria-hidden="true"></span>Open source · MIT · Bun CLI, MCP server, Agent Skills</p>
<h1>Take your app or game from zero to <span class="hl">“Submit for review”</span> on Google Play and the App Store.</h1>
<p class="lede">For mobile apps and games: app records, in-app products and subscriptions, listings in every language, every questionnaire, account deletion and review access, privacy, icons, screenshots and previews. One config and your AI coding agent. <strong>storebound never presses Submit.</strong></p>
<h1>From zero to <span class="hl">“Submit for review”</span> on Google Play and the App Store.</h1>
<p class="lede">App records, in-app product prices, listings in every language, every questionnaire, privacy, icons, screenshots and previews. One config and your AI coding agent. <strong>storebound never presses Submit.</strong></p>
<div class="ctas">
<a class="btn btn-primary" href="#start">Get started</a>
<a class="btn btn-ghost" href="https://git.crt.fyi/CRT/storebound" target="_blank" rel="noopener">View on git<span class="ext" aria-hidden="true">↗</span><span class="sr-only"> (opens in a new tab)</span></a>
@ -66,14 +66,13 @@
</div>
<div class="term" aria-label="Example session: dry runs first">
<div class="term-bar"><span></span><span></span><span></span><em>my-app</em></div>
<div class="term-bar"><span></span><span></span><span></span><em>my-game</em></div>
<pre><code><span class="c"># one config, then dry runs first</span>
<span class="p">$</span> bunx storebound check
<span class="p">$</span> bunx storebound apple bundle --dry
<span class="p">$</span> bunx storebound play listing --dry
<span class="p">$</span> bunx storebound play products --dry
<span class="p">$</span> bunx storebound apple iap --dry
<span class="p">$</span> bunx storebound apple subscriptions --dry
<span class="p">$</span> bunx storebound play data-safety --dry
<span class="p">$</span> bunx storebound apple appinfo --dry
<span class="p">$</span> bunx storebound icons --dry
@ -86,7 +85,7 @@
</div>
<ul class="wrap stats" aria-label="At a glance">
<li><b>2</b> stores, one config</li>
<li><b>25</b> Agent Skills</li>
<li><b>21</b> Agent Skills</li>
<li><b>0</b> runtime dependencies</li>
<li><b>--dry</b> on every write</li>
</ul>
@ -95,7 +94,7 @@
<section class="sec" id="journey" aria-labelledby="journey-h">
<div class="wrap">
<p class="kicker">The journey</p>
<h2 id="journey-h">Everything an app or game needs before review, in order.</h2>
<h2 id="journey-h">Everything a game needs before review, in order.</h2>
<p class="sub">For each step: what storebound does through the store APIs or on your machine, what a skill walks your agent through where the stores have no public API, and what stays your own click.</p>
<figure class="journey">
<img src="img/journey.svg" width="960" height="560" alt="The journey: config, app records, products, listings, questionnaires, privacy and icons, store art, validate, then you press Submit. Each step is tagged API, UI, local or you." loading="lazy" decoding="async">
@ -160,45 +159,11 @@
</div>
</section>
<section class="sec" id="apps" aria-labelledby="apps-h">
<div class="wrap">
<p class="kicker">Apps and games</p>
<h2 id="apps-h">Not just for games. Pick a profile, start from honest templates.</h2>
<p class="sub"><code>init --profile app</code> (the default: utility or productivity app, optional account, analytics, no ads), <code>--profile subscription-app</code> or <code>--profile game</code>. Each profile brings its own config, Data safety and App Privacy answers, declarations, listing and screenshot copy, all marked “edit to match your app”.</p>
<div class="qgrid">
<article class="q">
<div class="q-top"><span class="store">Both stores</span><span class="tag t-api">API</span></div>
<h3>Subscriptions</h3>
<p>Apple groups and levels, Play base plans, regional prices from one USD base, free trials, promotional offers and offer codes. Plan first, then your yes.</p>
<code class="cmd">apple subscriptions · play subscriptions</code>
</article>
<article class="q">
<div class="q-top"><span class="store">Both stores</span><span class="tag t-api">API</span></div>
<h3>One catalog, both stores</h3>
<p>Consumables, non-consumables, non-renewing passes and subscriptions from one list. A parity report shows what is missing, mismatched or priced differently per region.</p>
<code class="cmd">catalog diff</code>
</article>
<article class="q">
<div class="q-top"><span class="store">Both stores</span><span class="tag t-api">API</span></div>
<h3>Review access</h3>
<p>A demo account for the reviewer, kept only in <code>.storebound/</code>, sent to App Review masked; the Play App access answer prepared.</p>
<code class="cmd">apple review-details</code>
</article>
<article class="q">
<div class="q-top"><span class="store">Both stores</span><span class="tag t-local">local</span></div>
<h3>Account deletion</h3>
<p>Apple 5.1.1(v) in-app deletion and Play's delete-account page: in the config, the review notes and the checks.</p>
<code class="cmd">check · validate</code>
</article>
</div>
</div>
</section>
<section class="sec alt" id="questionnaires" aria-labelledby="q-h">
<section class="sec" id="questionnaires" aria-labelledby="q-h">
<div class="wrap">
<p class="kicker">Questionnaires</p>
<h2 id="q-h">Every store form, prepared. The ones with an API, filled.</h2>
<p class="sub"><code>init</code> gives you prepared answers (<code>store/declarations.md</code>, <code>store/app-privacy.md</code>), per profile: a utility app with an account, a subscription app, or a free-to-play game with ads and IAP. Change what does not match your app; the agent asks you whenever the code does not prove an answer.</p>
<p class="sub"><code>init</code> gives you prepared answers (<code>store/declarations.md</code>, <code>store/app-privacy.md</code>), written for a typical free-to-play game with ads and IAP. Change what does not match your game; the agent asks you whenever the code does not prove an answer.</p>
<div class="qgrid">
<article class="q">
<div class="q-top"><span class="store">Google Play</span><span class="tag t-api">API</span></div>
@ -241,7 +206,7 @@
</div>
</section>
<section class="sec" id="works-with" aria-labelledby="w-h">
<section class="sec alt" id="works-with" aria-labelledby="w-h">
<div class="wrap">
<p class="kicker">Works with</p>
<h2 id="w-h">Your AI coding agent. Or none.</h2>
@ -259,18 +224,14 @@
</div>
</section>
<section class="sec alt" id="store-art" aria-labelledby="art-h">
<section class="sec" id="store-art" aria-labelledby="art-h">
<div class="wrap">
<p class="kicker">Store art</p>
<h2 id="art-h">Screenshots and previews, every size, every language.</h2>
<p class="sub">The step that takes longest by hand, in two looks: <code>app</code> (calm gradient, device frame, headline and subline) and <code>game</code> (sunburst, sparkles, badges). Everything below was made by storebound itself from two tiny fictional demos, a list app (“Tidy Lists”) and a game (“Prism Puddle”): raw frames from the web build, captions in 4 languages, every store size, a review gallery and an app preview video.</p>
<figure class="shot shot-wide">
<img src="img/app-style.jpg" width="1600" height="962" alt="App style: four calm screenshots of a demo list app in two sizes and its feature graphic" loading="lazy" decoding="async">
<figcaption>App style: the demo list app, iPhone 6.9" and Play phone sizes, feature graphic.</figcaption>
</figure>
<p class="sub">The step that takes longest by hand. Everything below was made by storebound itself from a tiny demo game (“Prism Puddle”, fictional, procedural art): raw frames from the web build, captions in 4 languages, every store size, a review gallery and an app preview video.</p>
<figure class="shot shot-wide">
<img src="img/showcase.webp" width="1600" height="505" alt="Store screenshots rendered by storebound: four scenes in English plus the hero scene in Turkish, Japanese and Arabic" loading="lazy" decoding="async">
<figcaption>Game style: four scenes in English, the hero scene in Turkish, Japanese and Arabic (right to left).</figcaption>
<figcaption>Four scenes in English, the hero scene in Turkish, Japanese and Arabic (right to left).</figcaption>
</figure>
<div class="art2">
<figure class="shot">
@ -291,11 +252,11 @@
</div>
</section>
<section class="sec" id="after-launch" aria-labelledby="after-h">
<section class="sec alt" id="after-launch" aria-labelledby="after-h">
<div class="wrap">
<p class="kicker">After launch</p>
<h2 id="after-h">The app is live. storebound keeps going.</h2>
<p class="sub">Drafts and dry runs by default; anything that reaches users or money waits for your yes.</p>
<h2 id="after-h">The game is live. storebound keeps going.</h2>
<p class="sub">New in 0.4.0. Drafts and dry runs by default; anything that reaches players or money waits for your yes.</p>
<div class="qgrid">
<article class="q">
<div class="q-top"><span class="store">App Store</span><span class="tag t-api">API</span></div>
@ -337,18 +298,18 @@
</div>
</section>
<section class="sec alt" id="start" aria-labelledby="start-h">
<section class="sec" id="start" aria-labelledby="start-h">
<div class="wrap">
<p class="kicker">Quick start</p>
<h2 id="start-h">Five minutes to a checked config.</h2>
<div class="start">
<div class="step">
<h3><span class="num">1</span>Add it to your app or game</h3>
<h3><span class="num">1</span>Add it to your game</h3>
<div class="code">
<button class="copy" type="button" data-copy-target="qs1" aria-label="Copy commands">Copy</button>
<pre id="qs1"><code>cd my-app
<pre id="qs1"><code>cd my-game
bun add -d storebound playwright
bunx storebound init <span class="c"># --profile app (default) | subscription-app | game</span>
bunx storebound init <span class="c"># config, store/*.md, declarations, privacy policy</span>
bunx storebound check <span class="c"># offline: config, copy limits, Data safety, products, files</span></code></pre>
</div>
<p class="fine">Credentials come from environment variables or the gitignored <code>.storebound/credentials.json</code>: a Play service account key and an App Store Connect API team key.</p>
@ -422,10 +383,9 @@ bunx storebound check <span class="c"># offline: config, copy limits, Data saf
<div class="step">
<h3><span class="num">3</span>Ask your agent</h3>
<ul class="asks">
<li>“take my app to Google Play and the App Store”</li>
<li>“take my game to Google Play and the App Store”</li>
<li>“fill in the store questionnaires”</li>
<li>“add a yearly subscription with a free trial on both stores”</li>
<li>“the reviewer could not sign in”</li>
<li>“set up the in-app purchases on both stores”</li>
<li>“make store screenshots in 5 languages”</li>
<li>“is my app ready to submit”</li>
</ul>
@ -435,14 +395,14 @@ bunx storebound check <span class="c"># offline: config, copy limits, Data saf
</div>
</section>
<section class="sec" id="safety" aria-labelledby="safety-h">
<section class="sec alt" id="safety" aria-labelledby="safety-h">
<div class="wrap">
<p class="kicker">Safety model</p>
<h2 id="safety-h">Built to be handed to an agent.</h2>
<ul class="safety">
<li><h3>Credentials stay out of the repo</h3><p>Env vars or the gitignored <code>.storebound/credentials.json</code>. Official store APIs only, with keys you create and can revoke, never your password.</p></li>
<li><h3>Dry run everywhere</h3><p>Every write command takes <code>--dry</code>; every MCP write tool has <code>dry_run</code>, <strong>default true</strong>.</p></li>
<li><h3>Nothing public or irreversible through an agent</h3><p>Submitting, releasing, production releases, resuming or completing a rollout, canceling a submission, deleting and creating offer codes are not MCP tools. Demo accounts for reviewers live only in <code>.storebound/</code>. They stay terminal commands that ask first.</p></li>
<li><h3>Nothing public or irreversible through an agent</h3><p>Submitting, releasing, production releases, resuming or completing a rollout, canceling a submission and deleting are not MCP tools. They stay terminal commands that ask first.</p></li>
<li><h3>Idempotent writes</h3><p>Re-running converges (MD5 checks for screenshots and previews, one Play edit per language), so a failed upload is fixed by running it again.</p></li>
<li><h3>Careful with your devices</h3><p>storebound shuts down only a simulator it booted itself, and never boots, wipes or reboots an Android emulator or device.</p></li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 139 KiB

Before After
Before After

View file

@ -1,43 +0,0 @@
---
name: account-deletion
description: Make account deletion pass App Store and Google Play review for an app with sign-up or sign-in - Apple Guideline 5.1.1(v) in-app deletion (the whole account, not deactivation; Sign in with Apple token revocation; subscription billing note), Google Play's in-app path plus a public web page declared in Data safety, the config (accounts.enabled, deletionUrl, inApp) and the storebound checks. Use when the app has accounts, when the user adds sign-up, or after a 5.1.1(v) / Play account deletion rejection.
---
# Account deletion (both stores)
Applies to every app that lets people create an account (email, phone, social sign-in, Sign in with Apple). Games
without accounts can skip it. Sources: Apple, "Offering account deletion in your app"
(https://developer.apple.com/support/offering-account-deletion-in-your-app/) and App Review Guideline 5.1.1(v)
(https://developer.apple.com/app-store/review/guidelines/); Google Play, "Understanding Google Play's app account
deletion requirements" (https://support.google.com/googleplay/android-developer/answer/13327111).
## What the stores require
- **Apple 5.1.1(v)**: people can **start** deleting their account **inside the app**, easy to find (e.g. Settings >
Account > Delete account). Delete the whole account and its personal data, not only deactivate it. A link to a web
page that completes the deletion is fine; "email or call us" is only acceptable in highly regulated industries.
With Sign in with Apple, revoke the user's tokens (Sign in with Apple REST API). With auto-renewable
subscriptions, tell people that billing continues through Apple until they cancel, and how to cancel.
- **Google Play**: if the app lets people create an account, it must offer deletion **in the app** and on a **web
page** people can reach without the app (no reinstall needed). The URL goes into the Data safety form ("Data
deletion"). People can also ask to delete some data without deleting the account; say how.
## Steps
1. Config: `accounts: { enabled: true, deletionUrl: 'https://example.com/delete-account', inApp: 'Settings > Account >
Delete account' }`. `storebound check` errors without `deletionUrl` (Play) and warns without `inApp` (Apple);
`storebound apple review-details` adds "Account deletion: <inApp>" to the review notes.
2. Web page at `deletionUrl`: names the app and developer, the steps to request deletion (sign in, or a form that
verifies the email), what is deleted and what is kept (and for how long, e.g. invoices for tax law), and how long it
takes. No login wall to read it. `storebound validate --play` checks that it answers.
3. In the app: a clear entry, a confirmation step, then the deletion (or the web page). Sign people out afterwards.
4. Play Data safety: `dataSafety.deletionRequest: true`, `accountCreation` set to the sign-up methods you offer (not
`PSL_ACM_NONE`). Google does not publish the question ids for the delete-account URL: export the form once
(Play Console > App content > Data safety > Export to CSV), copy the id, and add it as
`dataSafety.extra: [{ question: '<id>', value: '<deletionUrl>' }]`; otherwise enter the URL in the Console after
`storebound play data-safety`.
5. Privacy policy: a "Deleting your account" section with both paths (`privacy-policy` skill).
6. Test it on a fresh account before every submission; the reviewer will.
## Gotchas
- "Deactivate" or "contact support" is not deletion for Apple.
- Deleting the account does not cancel a store subscription: say so in the app and on the web page.
- Keep the in-app path, the web page, Data safety and the privacy policy saying the same thing.

View file

@ -1,10 +1,41 @@
---
name: ads-levelplay-checks
description: Renamed to ads-mediation-checks (AdMob, AppLovin MAX and Unity LevelPlay / ironSource). Kept so existing installs and links keep working. Use ads-mediation-checks for any ad mediation, app-ads.txt, SKAdNetwork or "no fill" question.
description: Diagnose and verify ad mediation (Unity LevelPlay / ironSource and its networks like Unity Ads, InMobi, Liftoff, AdMob) in a mobile game before and after store release - app keys, game ids, adapter versions, integration validation, "Invalid Game ID", "Mediation No fill" 509, app-ads.txt, SKAdNetwork ids, ATT, COPPA setting. Use when ads do not load, a network reports invalid/unknown ids, or the user prepares ads for launch.
---
# Ad mediation checks (moved)
# Ad mediation checks (LevelPlay)
This skill is now **`ads-mediation-checks`**: the same LevelPlay checks (validateIntegration, "Invalid Game ID", 509 no
fill, app-ads.txt) as a section, plus Google AdMob (Ad Inspector) and AppLovin MAX (Mediation Debugger). Open
`skills/ads-mediation-checks/SKILL.md` and follow it.
No CLI needed; these are checks to run and read. Ask the owner before changing dashboard settings.
## Checklist
1. **Ids per platform.** LevelPlay app key + ad unit ids for iOS and Android are different; ship production ids only
in release builds and use the public demo app keys from Unity's Mediation demo apps during development so real units
never see test traffic.
2. **Integration.** After init call the SDK's `validateIntegration()`; the device log (Xcode console, Android logcat
tag `IntegrationHelper`) must list every network as "Adapter - Version x - VERIFIED". Adapter + network SDK versions
must be a pair from Unity's adapter tables / CHANGELOGs.
3. **Unity Ads "Invalid Game ID" / iOS "Initialization failed: not found".** Often account-side, not code: compare
`https://publisher-config.unityads.unity3d.com/games/<gameId>/configuration` for your id with Unity's demo id
`14851` (which answers with a config). If yours 404s or is empty, the Unity Ads project / game id is not set up or not
linked to the LevelPlay app: fix it in the Unity dashboard (Monetization > Projects > the game ids, and the LevelPlay
network setup using exactly those ids).
4. **509 "Mediation No fill"** before launch is normal: the LevelPlay app is not live / not linked to store URLs. After
both listings are public, set the store URLs in the LevelPlay dashboard.
5. **app-ads.txt** (checked by `storebound validate --play` when `ads.appAdsTxt` lists your lines) on the root of the developer website named in both listings (`https://<domain>/app-ads.txt`):
`OWNERDOMAIN=<domain>`, the LevelPlay DIRECT line with your publisher id, and each network's lines (Unity's
"App-Ads.txt" doc page lists them). Re-sync now and then. The listing website must match the domain exactly.
6. **iOS**: SKAdNetwork ids of every network in Info.plist (refresh from each network's official list when adding one),
`NSUserTrackingUsageDescription`, ATT prompt before the ad SDK starts, `-ObjC` linker flag if the SDK requires it.
Every network SDK and adapter must ship a privacy manifest (PrivacyInfo.xcprivacy): `storebound privacy-manifest
--ios ios/App` lists SDKs without one (`privacy-manifest` skill); update them before uploading.
7. **Android**: `AD_ID` permission (declared in Play's advertising ID form), network SDKs listed explicitly when the
adapter artifacts declare no dependencies.
8. **Privacy**: COPPA "not directed at children" unless the app is for kids; EU / UK / CH consent (CMP) or
non-personalized ads; Data safety + App Privacy list the ad data as shared / tracking (`store-declarations`).
9. **Placement sanity**: no ads in the first sessions / levels, never mid-round, rewarded always optional; reviewers
test the first minutes.
## Gotchas
- Adding Google AdMob needs its app id first: the adapter crashes at launch without the manifest / Info.plist id.
- Test ads on real units can get the account flagged: use demo ids or registered test devices.
- A network failing to init does not break mediation; the others still fill once the app is live.

View file

@ -1,62 +0,0 @@
---
name: ads-mediation-checks
description: Diagnose and verify ad mediation in a mobile app or game before and after store release - Google AdMob (Ad Inspector), AppLovin MAX (Mediation Debugger) and Unity LevelPlay / ironSource (validateIntegration) with their networks - app ids and ad unit ids, adapter versions, test devices, no-fill before launch, app-ads.txt on the developer website, SKAdNetwork ids, ATT, privacy manifests, consent, COPPA and Data safety / App Privacy answers. Use when ads do not load, a network reports invalid ids, the user adds an ad SDK, or prepares ads for launch.
---
# Ad mediation checks (AdMob, AppLovin MAX, LevelPlay)
No CLI needed apart from `storebound validate --play` (app-ads.txt) and `storebound privacy-manifest`; these are checks
to run and read. Ask the owner before changing any dashboard setting. Most apps without ads can skip this skill.
## Every mediation platform
1. **Ids per platform**: iOS and Android have different app ids / keys and ad unit ids. Production ids only in release
builds; test ids or registered test devices during development (real units with test traffic can get the account
flagged).
2. **Debug tool on a test device**: every network listed with its adapter and SDK versions as a supported pair, test
ads loading per format.
3. **No fill before launch is normal**: networks start filling once the app is live and its store URLs are set in
the mediation dashboard.
4. **app-ads.txt** at the root of the developer website named in both listings (`https://<domain>/app-ads.txt`; IAB
spec: https://github.com/InteractiveAdvertisingBureau/Supply-Chain-Validation/blob/main/app-ads.txt.md): the
platform's own line plus each network's lines from the dashboard. Put them in `ads.appAdsTxt` so
`storebound validate --play` checks the file. The listing website domain must match exactly (AdMob: the developer
website; on iOS the marketing URL; verification can take a day, https://support.google.com/admob/answer/9363762).
5. **iOS**: SKAdNetwork ids of every network in Info.plist (from each network's list or generator),
`NSUserTrackingUsageDescription` and the ATT prompt before the ad SDK starts, privacy manifests of every SDK
(`storebound privacy-manifest --ios ios/App`, `privacy-manifest` skill).
6. **Android**: `com.google.android.gms.permission.AD_ID` and the Play advertising ID declaration; the AdMob app id in
the manifest when any AdMob adapter is present (the app crashes at launch without it).
7. **Privacy and audience**: consent (CMP) in the EU / EEA / UK / CH or non-personalized ads; "not directed at
children" unless the app is for kids (Families policy otherwise); Data safety and App Privacy list the ad data as
shared / tracking (`store-declarations`).
8. **Placement**: no ads at launch, on exit or mid-task / mid-round; close buttons visible; rewarded ads always
optional. Reviewers test the first minutes.
## Google AdMob
- Ad Inspector (SDK 20.0.0+, test devices only) shows each ad unit's mediation waterfall, adapter status and errors:
https://developers.google.com/admob/android/ad-inspector (iOS: the same page under /admob/ios/).
- Register test devices in the AdMob UI or in code; use Google's demo ad unit ids during development.
## AppLovin MAX
- Mediation Debugger: `AppLovinSdk.getInstance(context).showMediationDebugger()` (iOS: the SDK's
`showMediationDebugger`). It lists integration status per network, missing SKAdNetwork ids and the app-ads.txt
entries; enable test mode per network under Completed Integrations > Test Ad, then restart the app.
https://support.applovin.com/en/max/android/testing-networks/mediation-debugger/
- SKAdNetwork: AppLovin's Info.plist generator for the networks you use
(https://support.applovin.com/en/max/ios/overview/skadnetwork).
## Unity LevelPlay (ironSource)
1. After init call the SDK's `validateIntegration()`; the device log (Xcode console, Android logcat tag
`IntegrationHelper`) must list every network as "Adapter - Version x - VERIFIED". Adapter + network SDK versions
must be a pair from Unity's adapter tables.
2. **Unity Ads "Invalid Game ID" / iOS "Initialization failed: not found"** is often account-side: compare
`https://publisher-config.unityads.unity3d.com/games/<gameId>/configuration` for your id with Unity's demo id
`14851`. If yours 404s or is empty, the Unity Ads project / game id is not set up or not linked to the LevelPlay app
(Monetization > Projects, and the LevelPlay network setup with exactly those ids).
3. **509 "Mediation No fill"** before launch: the LevelPlay app is not live / not linked to store URLs yet.
4. app-ads.txt: `ironsrc.com, <id>, DIRECT` plus the network lines from LevelPlay's app-ads.txt page
(https://docs.unity.com/en-us/grow/programmatic/ironsource-exchange/app-ads-txt).
## Gotchas
- A network failing to init does not break mediation; the others still fill once the app is live.
- Adding a network can add Data safety / App Privacy data types and SKAdNetwork ids: update both before release.

View file

@ -1,6 +1,6 @@
---
name: app-icons
description: Generate every icon a mobile app or game needs from one artwork - App Store 1024 (no alpha), Play 512, Android adaptive foreground/background, legacy round and square launcher icons, iOS sizes via @capacitor/assets, web favicons, apple-touch and maskable icons. Use when the user wants app icons, launcher icons, adaptive icons, favicons, or an icon looks cropped/cut off on Android or is rejected for alpha on iOS.
description: Generate every app icon a mobile game needs from one artwork - App Store 1024 (no alpha), Play 512, Android adaptive foreground/background, legacy round and square launcher icons, iOS sizes via @capacitor/assets, web favicons, apple-touch and maskable icons. Use when the user wants app icons, launcher icons, adaptive icons, favicons, or an icon looks cropped/cut off on Android or is rejected for alpha on iOS.
---
# App icons from one artwork

View file

@ -1,6 +1,6 @@
---
name: app-previews
description: Make App Store app preview videos and a Google Play promo video for a mobile app or game from real footage (gameplay or app flows) - record clips from a web build, the iOS Simulator, an Android emulator or a folder, cut them to the store formats with captions in every language, check them against the store rules, upload the previews to App Store Connect and put the YouTube URL on Play. Use when the user wants an app preview, preview video, promo video, gameplay trailer for the stores, or asks about app preview sizes and rules.
description: Make App Store app preview videos and a Google Play promo video for a mobile game from real gameplay - record clips from a web build, the iOS Simulator, an Android emulator or a folder, cut them to the store formats with captions in every language, check them against the store rules, upload the previews to App Store Connect and put the YouTube URL on Play. Use when the user wants an app preview, preview video, promo video, gameplay trailer for the stores, or asks about app preview sizes and rules.
---
# App previews and promo video
@ -27,9 +27,9 @@ other platforms' UI. Play promo video: YouTube URL, public or unlisted, ads off,
(https://support.google.com/googleplay/android-developer/answer/9866151).
## Steps
1. **Hands-free footage.** Give the game an autoplay / attract mode switch, or the app a scripted demo of its main
flow on sample data (URL param, launch argument or intent extra), plus the screenshot switches (language, fixed
seed or demo data, no ads). Otherwise record the screen yourself and use `--source folder`.
1. **Hands-free gameplay.** Give the game an autoplay / attract mode switch (URL param, launch argument or intent
extra) plus the screenshot switches (language, fixed seed, no ads). Otherwise record yourself playing and use
`--source folder`.
2. **Clips.** `shots.video.record.clips`: per clip `seconds` (1-60) and `path` (web, after `shots.capture.baseUrl`),
or `url` / `args` / `extras` (simulator / emulator), `waitFor`, `delayMs`. The source and its settings come from
`shots.capture` (or `record.source`). `storebound shots record --dry` shows the plan, then
@ -57,7 +57,7 @@ plan, then run for real only after the owner agreed. `shots_check` is read-only.
## Gotchas
- Under 15 s of clips is an error: record longer clips or more of them.
- Captions sit at the top: keep the app's top bar or the game's HUD readable or set `captions: false`.
- Captions sit at the top: keep the game's HUD readable or set `captions: false`.
- 886 x 1920 cover-crops a 9:19.5 phone recording almost exactly; tablet previews from phone clips are cropped hard,
record tablet clips (`record.device: 'tablet'`) or use `fit: 'contain'`.
- Apple processes previews for a while after the upload; `apple previews` reports failed ones (re-run to retry).

View file

@ -1,6 +1,6 @@
---
name: appstore-first-release
description: Step-by-step first (and later) App Store release of a mobile app or game - App Store Connect API key, bundle id, app record, signing and xcodebuild archive/upload with the API key, TestFlight, version + listing text in many locales, screenshots, age rating, App Privacy, review details, in-app purchases with the first version, and submitting for review. Use when the user wants to publish, release, upload or set up an iOS app or game on the App Store or TestFlight, or hits App Store Connect API errors.
description: Step-by-step first (and later) App Store release of a mobile game - App Store Connect API key, bundle id, app record, signing and xcodebuild archive/upload with the API key, TestFlight, version + listing text in many locales, screenshots, age rating, App Privacy, review details, in-app purchases with the first version, and submitting for review. Use when the user wants to publish, release, upload or set up an iOS game/app on the App Store or TestFlight, or hits App Store Connect API errors.
---
# App Store: first release
@ -22,7 +22,7 @@ of a first version is the owner's click. Shared agent rules: `docs/agents-core.m
3. **UI · App record.** Apps > + > New App: iOS, name, primary language, the bundle id, SKU. **No API for this.**
Then `storebound apple status` finds it (put the Apple ID in `apple.appId` to skip the lookup).
4. **Local · Info.plist.** `ITSAppUsesNonExemptEncryption` with the true answer (`export-compliance` skill; `NO` only
when the app uses nothing beyond OS / HTTPS encryption) so builds arrive answered;
when the game uses nothing beyond OS / HTTPS encryption) so builds arrive answered;
`NSUserTrackingUsageDescription` if ads use the IDFA; privacy policy reachable inside the app (guideline 5.1.1).
5. **Local · Build + upload** (Mac, no Xcode account login needed, the API key does signing):
```sh
@ -48,11 +48,8 @@ of a first version is the owner's click. Shared agent rules: `docs/agents-core.m
all territories. The **first** availability record of a new app may be refused by the public API (an error on
POST /v2/appAvailabilities); then set it once in App Store Connect > Pricing and Availability and re-run (later runs only read it).
10. **API · Review details.** `storebound apple review-details` (contact from `.storebound/credentials.json`
`reviewContact`, or `--contact-from <Apple ID of another app of the team>`; notes from the config). Apps behind a
sign-in: the demo account from `.storebound/` (`review-access` skill). Apps with accounts: in-app deletion
(`account-deletion` skill).
11. **API + UI · In-app purchases and subscriptions.** `store-iap-setup` and `store-subscriptions` skills. First
IAPs and subscriptions go to review **with** this version.
`reviewContact`, or `--contact-from <Apple ID of another app of the team>`; notes from the config).
11. **API + UI · In-app purchases.** `store-iap-setup` skill. First IAPs go to review **with** this version.
12. **UI · App Privacy.** `store-declarations` skill (nutrition labels), then **Publish**.
13. **Preflight.** `storebound validate --apple` until it shows no blocker (`store-preflight`).
14. **UI · Submit.** Version page > Add for Review (with the IAPs in the same draft submission) > Submit for Review

View file

@ -1,12 +1,12 @@
---
name: aso-basics
description: App store optimization basics for a mobile app's or game's text - App Store keyword field rules (100 characters, commas without spaces, no repeats of name / subtitle words, fill 90%+), subtitle and name, cross-localization keyword room per storefront, screenshot captions with real keywords, Google Play title / short / full description keyword placement without stuffing. Use when the user writes or improves store listing text, keywords, or asks why the app or game is not found in store search.
description: App store optimization basics for a mobile game's text - App Store keyword field rules (100 characters, commas without spaces, no repeats of name / subtitle words, fill 90%+), subtitle and name, cross-localization keyword room per storefront, screenshot captions with real keywords, Google Play title / short / full description keyword placement without stuffing. Use when the user writes or improves store listing text, keywords, or asks why the game is not found in store search.
---
# ASO basics
Audit: `storebound check --aso` (offline, over `store/appstore.md` + `store/listing.md`; errors exit 1). Keep claims
true; never use competitor or other apps' or games' names, "best / #1", or unrelated popular terms (both stores reject it).
true; never use competitor or other games' names, "best / #1", or unrelated popular terms (both stores reject it).
## App Store
- **Indexed fields**: app name (30), subtitle (30), keyword field (100). The description is **not** indexed for search.
@ -22,7 +22,7 @@ true; never use competitor or other apps' or games' names, "best / #1", or unrel
every storefront that supports its language. That the keyword fields of several localizations **stack** in one
storefront (e.g. extra English words in the es-MX field for US search) is community ASO knowledge, not an Apple
statement: if you use it, the localization must still be a real translation for its own users.
- **Screenshot captions**: write them with the words people search for ("Budget planner with shared lists", "Match 3 puzzles offline", not "Fun awaits").
- **Screenshot captions**: write them with the words players search for ("Match 3 puzzles offline", not "Fun awaits").
Claims that Apple reads caption text for search ranking are unverified; good captions help conversion either way.
- Changing keywords needs a new version (submitted with it); promotional text (170) changes any time but is not indexed.
@ -35,8 +35,8 @@ true; never use competitor or other apps' or games' names, "best / #1", or unrel
- Localize every listing you can; Play machine-translates otherwise, which ranks and converts worse.
## Workflow
1. List 20-30 candidate terms with the owner: what people would type to find this app (the job it does, the problem it solves; for a game:
genre, mechanic, theme, setting, mood). No paid tool needed to start; store search suggestions are a free signal.
1. List 20-30 candidate terms with the owner: what players would type to find this game (genre, mechanic, theme,
setting, mood). No paid tool needed to start; store search suggestions are a free signal.
2. Put the best 1-2 in name / title and subtitle / short description; the rest in the keyword field per locale.
3. `storebound check --aso`, fix errors, read warnings.
4. Push with `apple listing` / `play listing`; measure after a few weeks (App Store Connect / Play Console acquisition

View file

@ -1,6 +1,6 @@
---
name: export-compliance
description: Answer App Store export compliance (encryption) for a mobile app or game correctly - ITSAppUsesNonExemptEncryption in Info.plist, the per-build usesNonExemptEncryption answer and encryption declarations through the App Store Connect API (storebound apple encryption), French declaration, and what counts as exempt. Use when a build shows "Missing Compliance", App Store Connect asks about encryption, or before the first TestFlight / App Store upload.
description: Answer App Store export compliance (encryption) for a mobile game correctly - ITSAppUsesNonExemptEncryption in Info.plist, the per-build usesNonExemptEncryption answer and encryption declarations through the App Store Connect API (storebound apple encryption), French declaration, and what counts as exempt. Use when a build shows "Missing Compliance", App Store Connect asks about encryption, or before the first TestFlight / App Store upload.
---
# Export compliance (App Store)
@ -10,7 +10,7 @@ Compliance" and cannot go to TestFlight testers or review. The answer is a legal
**never declare exempt to get past the question**. When the code does not prove the answer, ask the owner.
## Decide
Usually exempt (answer `false`), when the app only uses encryption through the OS or standard protocols:
Usually exempt (answer `false`), when the game only uses encryption through the OS or standard protocols:
- HTTPS / TLS through URLSession, WKWebView, the engine's HTTP client using the system TLS
- Apple frameworks (Keychain, CryptoKit used only for authentication / integrity), StoreKit, Game Center
- Ad, analytics, crash SDKs that talk HTTPS

View file

@ -1,6 +1,6 @@
---
name: play-first-release
description: Step-by-step first (and later) Google Play release of a mobile app or game - Play Console app creation, service account + API access, signing, AAB upload to internal testing, store listing, graphics, data safety, App content declarations, production draft and sending for review. Use when the user wants to publish, release, upload or set up an Android app or game on Google Play, push a Play listing or AAB, or hits Play Developer API errors (edits, "outside of this Edit", draft app releases).
description: Step-by-step first (and later) Google Play release of a mobile game - Play Console app creation, service account + API access, signing, AAB upload to internal testing, store listing, graphics, data safety, App content declarations, production draft and sending for review. Use when the user wants to publish, release, upload or set up an Android game/app on Google Play, push a Play listing or AAB, or hits Play Developer API errors (edits, "outside of this Edit", draft app releases).
---
# Google Play: first release
@ -15,7 +15,7 @@ deleting products. Sending a first release for review is the owner's action in t
## Steps (API = storebound does it, UI = Play Console by hand)
1. **UI · Create the app.** Play Console > Home > Create app: name, default language, App or Game, Free or Paid, declarations.
1. **UI · Create the app.** Play Console > Home > Create app: name, default language, Game, Free, declarations.
The package name is fixed by the first uploaded AAB.
2. **UI · API access.** Google Cloud project (any) > enable "Google Play Android Developer API" > create a service
account > JSON key (keep it outside the repo). Play Console > Users and permissions > Invite new users > the
@ -41,9 +41,7 @@ deleting products. Sending a first release for review is the owner's action in t
9. **API · Data safety.** Answers in `dataSafety` of the config, `storebound play data-safety`, then check the summary
in Policy and programs > App content > Data safety.
10. **UI · App content.** `store-declarations` skill: privacy policy, ads, app access, content rating (IARC), target
audience, advertising ID, government / financial / health / news, data safety review. Behind a sign-in: App access
with the demo account (`review-access`); with accounts: the delete-account URL (`account-deletion`); subscriptions:
`storebound play subscriptions` (`store-subscriptions`).
audience, advertising ID, government / financial / health / news, data safety review.
11. **UI · Store settings.** Category + tags, contact details.
12. **API + UI · Production.** `storebound play release --version-code N --production draft`, then in the Console:
Production > Countries/regions > Add countries > select all > Save; Production > the draft release > Edit >

View file

@ -1,42 +1,41 @@
---
name: portfolio-originality
description: Originality gate for studios and developers that ship many similar mobile apps or games (templates, white-label apps, reskins) - score a planned or finished app or game against your own catalogue (mechanic, content, art, metadata, screenshots), require a clear differentiator, and suggest merging thin ideas, to avoid App Store Guideline 4.3 (spam) and Play repetitive content rejections. Use before starting a new app or game, before submitting one, or after a 4.3 / "repetitive content" rejection.
description: Originality gate for studios that ship many similar mobile games - score a planned or finished game against the studio's own catalogue (mechanic, content, art, metadata, screenshots), require a clear differentiator, and suggest merging thin ideas, to avoid App Store Guideline 4.3 (spam) and Play repetitive content rejections. Use before starting a new game, before submitting one, or after a 4.3 / "repetitive content" rejection.
---
# Portfolio originality (Guideline 4.3 gate)
Apple 4.3 and Play's repetitive content policy reject apps that are near-copies of other apps, **including your own**.
Studios with a template engine and white-label / reskinned apps hit this first. Run this gate twice: before building (idea stage) and before submitting.
Studios with a template engine hit this first. Run this gate twice: before building (idea stage) and before submitting.
## Inputs
- The new app or game: one-paragraph pitch, core loop or main task, controls or flows, progression or features, art
direction, the planned listing (name,
- The new game: one-paragraph pitch, core loop, controls, progression, art direction, the planned listing (name,
subtitle, short description, keywords, screenshot captions).
- The catalogue: the same for every app or game you have published or submitted (store links are fine).
- The catalogue: the same for every game the studio has published or submitted (store links are fine).
## Score each pair (new app vs each catalogue app), 0 = identical, 2 = clearly different
## Score each pair (new game vs each catalogue game), 0 = identical, 2 = clearly different
| axis | 0 | 1 | 2 |
|---|---|---|---|
| core mechanic or main task | same verb, same rules | same verb, new rule that changes decisions | different verb / goal |
| core mechanic | same verb, same rules | same verb, new rule that changes decisions | different verb / goal |
| content | same levels / items reskinned | new content, same structure | different structure (modes, progression) |
| art and audio | same assets / palette / UI kit | same kit, new theme | own visual identity |
| metadata | same description pattern / keywords | rewritten, same promises | different promise and audience |
| screenshots | same layout and captions | same layout, new captions | different scenes and message |
Total 0-10 per pair. **Below 6 against any catalogue app: stop.** 6-7: ship only with a differentiator a user can
Total 0-10 per pair. **Below 6 against any catalogue game: stop.** 6-7: ship only with a differentiator a player can
see in the first screenshot. 8+: fine.
## Differentiator test
Write one sentence: "Unlike <our other app>, in <new app> the user <does something they cannot do there>."
Write one sentence: "Unlike <our other game>, in <new game> the player <does something they cannot do there>."
If the sentence needs the words "theme", "skin", "colours" or "levels" to work, it is not a differentiator.
## When the score is low
- **Merge** the idea into the existing app as a mode, feature, world or event instead of a new app.
- **Merge** the idea into the existing game as a mode, world or event instead of a new app.
- **Deepen** one axis until it scores 2 (usually mechanic or progression), not five axes a little.
- Never vary only the name, icon and keywords: reviewers compare binaries and screenshots, and that is the pattern
4.3 describes.
- After a 4.3 rejection: list the concrete differences in the reply (`review-rejections`); if there are none, merge.
## Output for the owner
A table per catalogue app with the five scores, the total, the differentiator sentence, and a recommendation:
ship / ship after <change> / merge into <app>.
A table per catalogue game with the five scores, the total, the differentiator sentence, and a recommendation:
ship / ship after <change> / merge into <game>.

View file

@ -1,6 +1,6 @@
---
name: privacy-manifest
description: Add and check Apple privacy manifests (PrivacyInfo.xcprivacy) for an iOS app or game - required-reason API categories (UserDefaults, file timestamps, system boot time, disk space, active keyboards) with approved reason codes, tracking flag and domains, collected data types, and third-party SDK manifests (ad networks, analytics, Firebase, Unity, Capacitor plugins). Use when App Store Connect sends ITMS-91053 "Missing API declaration" or ITMS-91061 "Missing privacy manifest", or before submitting an iOS build.
description: Add and check Apple privacy manifests (PrivacyInfo.xcprivacy) for an iOS game - required-reason API categories (UserDefaults, file timestamps, system boot time, disk space, active keyboards) with approved reason codes, tracking flag and domains, collected data types, and third-party SDK manifests (ad networks, analytics, Firebase, Unity, Capacitor plugins). Use when App Store Connect sends ITMS-91053 "Missing API declaration" or ITMS-91061 "Missing privacy manifest", or before submitting an iOS build.
---
# Privacy manifest (iOS)
@ -18,20 +18,20 @@ the iOS folder: add `--sdk-dirs node_modules/@capacitor,node_modules/<plugin>`.
## Steps
1. Xcode > File > New > File > App Privacy (PrivacyInfo.xcprivacy), target = the app.
2. Run the scan. For each used category add `NSPrivacyAccessedAPITypes` > item with `NSPrivacyAccessedAPIType` and
`NSPrivacyAccessedAPITypeReasons`. Typical for apps and games:
`NSPrivacyAccessedAPITypeReasons`. Typical for games:
- `NSPrivacyAccessedAPICategoryUserDefaults` + `CA92.1` (settings / saves read and written by the app itself;
Capacitor Preferences and most engines use UserDefaults)
- `NSPrivacyAccessedAPICategoryFileTimestamp` + `C617.1` (timestamps of files in the app container)
- `NSPrivacyAccessedAPICategorySystemBootTime` + `35F9.1` (elapsed time between events)
- `NSPrivacyAccessedAPICategoryDiskSpace` + `E174.1` (check space before writing)
Pick the reason that is true; read Apple's reason list ("Describing use of required reason API") if unsure.
3. Tracking: `NSPrivacyTracking` true only if the app tracks (ad SDK with IDFA after ATT); then list
3. Tracking: `NSPrivacyTracking` true only if the game tracks (ad SDK with IDFA after ATT); then list
`NSPrivacyTrackingDomains` the SDK docs name. Keep it consistent with App Privacy "used for tracking" and the ATT
prompt (`store-declarations`).
4. `NSPrivacyCollectedDataTypes`: what the app itself collects; SDK manifests cover their own collection. Xcode's
Privacy Report (Product > Archive > Generate Privacy Report) merges all manifests; compare it with App Privacy.
5. SDKs flagged "ships no PrivacyInfo.xcprivacy": update to a version that has one (ad networks and mediation
adapters added manifests in 2024 releases; see `ads-mediation-checks` for adapter / SDK version pairs).
adapters added manifests in 2024 releases; see `ads-levelplay-checks` for adapter / SDK version pairs).
6. Re-run the scan, archive, upload; Apple's email lists any remaining ITMS-910xx issue per framework.
## Gotchas

View file

@ -1,6 +1,6 @@
---
name: privacy-policy
description: Write and host one studio-wide privacy policy page for all of a developer's mobile apps and games - a per-app services table (analytics, ads, server, purchases), children, retention and contact sections, linked from both store listings and inside each app. Use when the user needs a privacy policy, privacy URL for Google Play / App Store, or must update the policy after adding an SDK.
description: Write and host one studio-wide privacy policy page for all of a developer's mobile games - a per-game services table (analytics, ads, server, purchases), children, retention and contact sections, linked from both store listings and inside each game. Use when the user needs a privacy policy, privacy URL for Google Play / App Store, or must update the policy after adding an SDK.
---
# Studio-wide privacy policy
@ -9,24 +9,23 @@ Template: `store/privacy-policy.html` (from `storebound init`, or `templates/pri
A single static page, light/dark, mobile friendly, English + a second language section.
## Steps
1. **One page for the developer, one row per app and service.** Columns: app, service (analytics, ad mediation +
networks, your server or backend, sign-in provider, app stores), what data and why, the user's choice (in-app switch,
ATT prompt, OS ad settings, "remove ads", deleting the account). Remove what you do not use; never list services you do not ship.
1. **One page for the studio, one row per game and service.** Columns: game, service (analytics, ad mediation +
networks, your server, app stores), what data and why, the player's choice (in-game switch, ATT prompt, OS ad
settings, "remove ads"). Remove what you do not use; never list services you do not ship.
2. Sections to keep: what we use (table), children (general audience, not directed at under 13 unless you really are
a kids app), retention and rights (how to request a copy / deletion, response time; with accounts: how to delete the account,
in the app and on the web, see the `account-deletion` skill), security (HTTPS), changes
a kids app), retention and rights (how to request a copy / deletion, response time), security (HTTPS), changes
(date at the top), contact email.
3. **Host** it at a stable URL on your developer website, the same domain that serves `app-ads.txt` and is named as
website in both listings (e.g. `https://example.com/privacy`). Any static host works.
4. **Link it everywhere**: `app.privacyPolicyUrl` in `storebound.config.ts` (pushed by `storebound apple listing`), Play
Console > App content > Privacy policy, and **inside the app** (Settings > Privacy opens the URL): App Store
Console > App content > Privacy policy, and **inside the game** (Settings > Privacy opens the URL): App Store
guideline 5.1.1 requires the in-app link.
5. **Verify**: the URL answers 200 over HTTPS without login or cookie wall, the table matches the Data safety /
App Privacy answers (`store-declarations` skill), the date is current.
## Gotchas
- Update the policy first, then the store forms, whenever an app adds an SDK or starts storing something new.
- Update the policy first, then the store forms, whenever a game adds an SDK or starts storing something new.
- The policy must not be a PDF or a Google Doc behind a login; a plain page is safest for review.
- Do not put a personal address or private email in it; use a studio contact address.
- If an app uses ads in the EU / EEA / UK / CH, say how consent works (CMP or non-personalized ads).
- If a game uses ads in the EU / EEA / UK / CH, say how consent works (CMP or non-personalized ads).
- This template is a starting point, not legal advice.

View file

@ -1,40 +0,0 @@
---
name: review-access
description: Give App Store and Google Play reviewers working access to an app behind a sign-in - a demo account that never expires and needs no 2FA, App Review demoAccountName / demoAccountPassword through storebound apple review-details (credentials only in .storebound/credentials.json or env, masked in logs), the Play App content "App access" declaration (console only), and notes that say where every feature is. Use when the app needs a login, after a Guideline 2.1 "we were unable to sign in" rejection, or a Play "App access" policy issue.
---
# Review access (demo account)
Sources: App Store Review Guideline 2.1 (https://developer.apple.com/app-store/review/guidelines/), App Review
Information (https://developer.apple.com/help/app-store-connect/reference/app-information/platform-version-information),
Google Play sign-in details (https://support.google.com/googleplay/android-developer/answer/15748846 and
https://support.google.com/googleplay/android-developer/answer/9859455).
## Rules from the stores
- The account must work for the whole review, must not expire, needs **no 2FA / one-time code** (or give a bypass),
and must reach every feature, paid ones included (sandbox purchases work on Apple's side).
- Apple: sign-in required + user name + password in App Review Information, plus notes (up to 4000 bytes). Keep your
backend live. A demo mode instead of an account is possible only when Apple approves it.
- Google Play: Policy and programs > App content > **App access**: "All or some functionality is restricted", then the
credentials and steps (in English). There is no API for it.
## Never commit credentials
The demo account lives only in the project's gitignored `.storebound/credentials.json`:
`"reviewDemoAccount": { "username": "demo@example.com", "password": "..." }`, or in `REVIEW_DEMO_USER` /
`REVIEW_DEMO_PASSWORD`. Never ask for it in chat, never write it into the config, docs, issues or commits. The owner
creates the account and pastes it into that file. storebound prints it masked (`d***@example.com / ********`).
## Steps
1. Create a dedicated demo account with realistic sample data (no real user data), on production.
2. Config: `reviewAccess: { signInRequired: true, instructions: 'Sign in with the demo account, then ...' }`.
`storebound check` errors while the demo account is missing.
3. `storebound apple review-details --dry`, then without `--dry`: sets demoAccountRequired, demoAccountName,
demoAccountPassword, the contact and the notes (review notes + instructions + where account deletion is).
4. Play: App content > App access with the same credentials and steps (agent with browser tools or the owner).
5. `storebound validate`: blocker when sign-in is required and App Review has no demo account.
6. Before each submission sign in with it on a clean device; reset its data if a test changed it.
## Gotchas
- A password change or an expired trial on the demo account means a rejection: tell the owner to keep it stable.
- Region locks, IP allow-lists or SMS checks block reviewers; switch them off for the demo account.
- If sign-in is optional (everything works signed out), set `signInRequired: false`; the demo fields are cleared.

View file

@ -1,6 +1,6 @@
---
name: review-rejections
description: Triage and answer an App Store or Google Play rejection, policy warning or strike for a mobile app or game - decide fix / clarify / push back / appeal, write a short Resolution Center reply, and map the message to the usual guidelines (Apple 2.1, 2.3, 3.1.1, 4.2, 4.3, 5.1.1, 5.1.2, privacy label mismatch; Play Data safety mismatch, disruptive ads, Families, strikes and appeals). Use when the user pastes a rejection or policy email, an update is "Rejected" / "Metadata Rejected", or Play Console shows a policy issue.
description: Triage and answer an App Store or Google Play rejection, policy warning or strike for a mobile game - decide fix / clarify / push back / appeal, write a short Resolution Center reply, and map the message to the usual guidelines (Apple 2.1, 2.3, 3.1.1, 4.2, 4.3, 5.1.1, 5.1.2, privacy label mismatch; Play Data safety mismatch, disruptive ads, Families, strikes and appeals). Use when the user pastes a rejection or policy email, an update is "Rejected" / "Metadata Rejected", or Play Console shows a policy issue.
---
# Review rejections and policy issues
@ -13,7 +13,7 @@ they turn a rejection into an account termination.
## 1. Triage (pick one, say why)
| route | when | what you do |
|---|---|---|
| **Fix** | the reviewer is right (crash, missing restore button, wrong label) | change the app / metadata, resubmit, reply what changed |
| **Fix** | the reviewer is right (crash, missing restore button, wrong label) | change the game / metadata, resubmit, reply what changed |
| **Clarify** | the feature exists but the reviewer did not find it, or misread it | reply with exact steps / a video link; no new build if nothing changed |
| **Push back** | the guideline does not apply, with a concrete reason | short factual reply quoting the guideline text; offer a call |
| **Appeal** | a clarification was rejected and you still believe it complies | Apple: App Review Board appeal form; Play: the appeal form linked from the notice |
@ -33,27 +33,20 @@ Happy to clarify anything else.
```
Plain, polite, specific; one guideline per paragraph; no blame, no threats, no "other apps do it".
## 3. Apple guidelines apps and games hit most
## 3. Apple guidelines games hit most
- **2.1 App completeness**: crash on launch / during review (check the crash log in the message, test the review
device class and OS), placeholder text or art, broken links, IAPs not working in the sandbox (Paid Apps agreement
active? products READY_TO_SUBMIT and in the same submission?), features behind a login without a demo
account (`review-access` skill: demo account in `.storebound/credentials.json`, `storebound apple review-details`
sends it).
- **2.3 Accurate metadata**: screenshots must show the real app (for a game: real gameplay); no prices, no "free"
claims for paid items, no other platforms' UI; keywords without competitor names; age rating answers that match
the content.
active? products READY_TO_SUBMIT and in the same submission?), features behind a login without a demo account.
- **2.3 Accurate metadata**: screenshots must show the real game; no prices, no "free" claims for paid items, no other
platforms' UI; keywords without competitor names; age rating answers that match the content.
- **3.1.1 In-app purchase**: digital goods only through IAP; a visible **Restore Purchases** for non-consumables;
no links to outside payment; loot boxes must show odds.
- **3.1.2 Subscriptions**: the purchase screen shows title, length, price per period and what the user gets; links to
the privacy policy and the Terms of Use (EULA) in the app and in the metadata; free trial terms clear. See
`store-subscriptions`.
- **4.2 Minimum functionality**: a thin app (one screen, a tutorial-level loop) or a web wrapper. Add depth (for a game:
levels, progression, offline play; for an app: native features, offline use, real utility). Explain what the user
does in the notes.
- **4.2 Minimum functionality**: a thin game (one screen, a tutorial-level loop) or a web wrapper. Add depth: levels,
progression, offline play, native feel. Explain what the player does in the notes.
- **4.3 Spam**: too similar to your own or others' apps (same template, reskins). See `portfolio-originality`; merge
ideas instead of shipping near-duplicates. Hard to appeal without real differences.
- **5.1.1 Data collection**: privacy policy link in the listing **and inside the app**; only collect what you need;
account deletion in-app if you have accounts (5.1.1(v), `account-deletion` skill).
- **5.1.1 Data collection**: privacy policy link in the listing **and inside the game**; only collect what you need;
account deletion in-app if you have accounts.
- **5.1.2 Data use / ATT**: the App Tracking Transparency prompt before any tracking SDK reads the IDFA, a purpose string
that says why, no incentive or pressure to allow, no tracking when denied.
- **Privacy label mismatch**: App Privacy must match what the SDKs really collect (ads / analytics SDK docs list it).
@ -65,7 +58,7 @@ Plain, polite, specific; one guideline per paragraph; no blame, no threats, no "
- **Ads policy / disruptive ads**: no interstitials at launch, on exit or mid-gameplay; close buttons visible; rewarded
ads only opt-in. Ads must not imitate system UI.
- **Families**: if the target audience includes children, only Families-certified ad SDKs, no ad id, teacher-approved
rules. If the app is not for children, make sure store art and the target audience form say so.
rules. If the game is not for children, make sure store art and the target audience form say so.
- **Metadata**: no keyword stuffing, no "best/#1", no unrelated keywords (`aso-basics`).
- **Strikes and suspensions**: one policy strike affects the account; repeated strikes can terminate it. Fix first,
then appeal from the notice with the change described. Do not upload the same app under a new package to dodge it.
@ -73,4 +66,4 @@ Plain, polite, specific; one guideline per paragraph; no blame, no threats, no "
## 5. After sending
- `storebound apple status --wait-review` (exit 0 approved, 1 rejected, 7 timeout) or `storebound play status`.
- Write down guideline, cause and fix in the project's docs so the next app does not repeat it.
- Write down guideline, cause and fix in the project's docs so the next game does not repeat it.

View file

@ -1,6 +1,6 @@
---
name: review-replies
description: Reply to App Store and Google Play reviews of a mobile app or game the safe way - list new reviews, write reply drafts into local files (.storebound/replies), keep the tone human and short, never offer incentives or ask for a better rating, respect the store limits (Play 350 characters), and send only drafts the owner approved. Use when the user asks to answer reviews, handle bad ratings, or check what players are saying.
description: Reply to App Store and Google Play reviews of a mobile game the safe way - list new reviews, write reply drafts into local files (.storebound/replies), keep the tone human and short, never offer incentives or ask for a better rating, respect the store limits (Play 350 characters), and send only drafts the owner approved. Use when the user asks to answer reviews, handle bad ratings, or check what players are saying.
---
# Review replies
@ -25,7 +25,7 @@ tool, and an agent never sets `approved: true` by itself.
- **Short and specific**: thank them in one line, answer the actual point, say what changed or what to do. Play
allows **350 characters** (HTML is stripped); App Store replies can be longer but rarely should be.
- **Bug reports**: name the fix and the version if it is released ("Version 1.2.1 fixes the crash on level 3"); if
not, say it is known and being worked on, without dates you cannot keep. Point to in-app Settings > Support or the
not, say it is known and being worked on, without dates you cannot keep. Point to in-game Settings > Support or the
public support page for details.
- **Ads / difficulty / price complaints**: explain the option that exists (e.g. "Remove Ads" in the shop, a setting),
no argument, no blame.
@ -39,9 +39,9 @@ tool, and an agent never sets `approved: true` by itself.
(Play Console Help, "User Ratings, Reviews, and Installs", answer 9898684); Apple removes apps that manipulate
reviews or ratings (App Review Guidelines, Developer Code of Conduct). `reviews send` refuses replies that match
these patterns.
- **No personal data**: no user names beyond what the store shows, no emails or phone numbers of users, no
- **No personal data**: no player names beyond what the store shows, no emails or phone numbers of players, no
account details. Your public support address is fine.
- **No marketing or spam**: no promo codes, no links to other apps or games, no all-caps or "!!!" (Apple's guidance:
- **No marketing or spam**: no promo codes, no links to other games, no all-caps or "!!!" (Apple's guidance:
https://developer.apple.com/app-store/responding-to-reviews/).
- **No arguing or disclosing**: do not dispute facts publicly, do not reveal internal plans, cheats or how anti-cheat
works. Hostile or abusive reviews: skip or keep it to one polite line; report policy-violating reviews in the console.

View file

@ -1,6 +1,6 @@
---
name: store-analytics
description: Take store analytics snapshots for a mobile app or game (App Store impressions, product page views, downloads and conversion through the Analytics Reports API; Google Play store listing visitors, acquisitions and installs from the Play reports bucket) and compare them with listing, screenshot and experiment changes from git. Use when the user asks whether a listing change, new screenshots or a store experiment worked, wants install / conversion numbers, or sets up store reporting.
description: Take store analytics snapshots for a mobile game (App Store impressions, product page views, downloads and conversion through the Analytics Reports API; Google Play store listing visitors, acquisitions and installs from the Play reports bucket) and compare them with listing, screenshot and experiment changes from git. Use when the user asks whether a listing change, new screenshots or a store experiment worked, wants install / conversion numbers, or sets up store reporting.
---
# Store analytics
@ -36,7 +36,7 @@ CLI: `storebound analytics setup | snapshot | compare`. MCP: `analytics_snapshot
readable.
4. `storebound analytics compare` (or `--md` for a report): for every commit that touched the store files, daily
impressions (App Store) or visitors (Play) and conversion in the 7 days before vs the 7 days from the change
(`--days 14` for small apps).
(`--days 14` for small games).
## Read it honestly
- Small numbers swing: under a few hundred page views a week, a 20 % change is noise. Say so.

View file

@ -1,17 +1,16 @@
---
name: store-declarations
description: Answer the store compliance forms for a mobile app or game - Google Play Data safety (API CSV), App content declarations (ads, app access, content rating IARC, target audience, advertising ID, government/financial/health/news), App Store App Privacy nutrition labels, age rating, export compliance. Use when the user fills in data safety, privacy labels, content rating, target audience, ads or advertising ID declarations, or gets Data safety CSV import errors.
description: Answer the store compliance forms for a mobile game - Google Play Data safety (API CSV), App content declarations (ads, app access, content rating IARC, target audience, advertising ID, government/financial/health/news), App Store App Privacy nutrition labels, age rating, export compliance. Use when the user fills in data safety, privacy labels, content rating, target audience, ads or advertising ID declarations, or gets Data safety CSV import errors.
---
# Store declarations
Templates: `store/declarations.md` (Play App content + IARC answers), `store/app-privacy.md` (Apple labels), both
from `storebound init --profile app|game|subscription-app` (default `app`). They are honest starting points for a
typical app of that kind, not your answers: edit every line to match what your app really does. Data safety answers live in `dataSafety` of `storebound.config.ts`.
from `storebound init`. Data safety answers live in `dataSafety` of `storebound.config.ts`.
CLI: `storebound` (or `bunx storebound` in a project that has it, or `bun <toolchain>/cli/index.ts`).
## Order
1. **Inventory first.** List every SDK and server call: what leaves the device, who receives it, can the user turn
1. **Inventory first.** List every SDK and server call: what leaves the device, who receives it, can the player turn
it off. The privacy policy (`privacy-policy` skill) must say the same; update it before the forms.
2. **Play Data safety (API).** Fill `dataSafety` (types not listed = not collected; `shared` = third party that is not
your service provider, e.g. ad networks; analytics vendors acting as processors are "collected" only).
@ -26,23 +25,12 @@ CLI: `storebound` (or `bunx storebound` in a project that has it, or `bun <toolc
6. **Export compliance.** `export-compliance` skill (`ITSAppUsesNonExemptEncryption` in Info.plist, `apple encryption`).
7. **Privacy manifest (iOS).** `privacy-manifest` skill; keep it consistent with App Privacy.
## Typical answers per profile (starting points, edit to match your app)
- **app** (utility / productivity, optional account, analytics, no ads): Data safety: email + user ids (account,
collected, functionality + account management), app interactions and diagnostics (analytics SDK as your processor:
collected, not shared), crash logs. Encrypted in transit: yes. Deletion: yes (in the app and on the web, see
`account-deletion`). Account creation: the methods you offer (e.g. `PSL_ACM_USER_ID_PASSWORD`, `PSL_ACM_OAUTH`).
Ads: No. Advertising ID: No (unless an SDK reads it). App access: sign-in needed, demo account given
(`review-access`). IARC category: not a game (utility, productivity, communication or social, reference ...).
Apple: Contact Info > Email Address and Identifiers > User ID are linked to the user (account), not used for tracking.
- **subscription-app**: as `app`, plus Purchases > Purchase History (linked, App Functionality) and Play
`PSL_PURCHASE_HISTORY` (collected, functionality). IARC: digital purchases Yes. App Review: subscriptions and their
disclosure (`store-subscriptions`).
- **game** (single-player free-to-play with ads + IAP, no accounts): approximate location (IP country; shared,
analytics + ads + fraud), app interactions (shared, analytics + ads), other app activity (save backup,
functionality), diagnostics (shared), device or other IDs (shared, ad id), purchase history (if your server checks
receipts). Encrypted in transit: yes. Deletion: yes, by email. Account creation: none. IARC (for games): everything
No except digital purchases Yes; target audience 13+; ads Yes; advertising ID yes (advertising, analytics, fraud
prevention); sign-in details: no login needed.
## Typical F2P game with ads + IAP (no accounts)
Data safety: approximate location (IP country; shared, analytics + ads + fraud), app interactions (shared, analytics +
ads), other app activity (save backup, functionality), diagnostics (shared), device or other IDs (shared, ad id),
purchase history (if your server checks receipts). Encrypted in transit: yes. Deletion: yes, by email. Account
creation: none. IARC: everything No except digital purchases Yes; target audience 13+; ads Yes; advertising ID yes
(advertising, analytics, fraud prevention); sign-in details: no login needed.
## Gotchas
- The Data safety CSV import **replaces** the whole form.
@ -51,9 +39,6 @@ CLI: `storebound` (or `bunx storebound` in a project that has it, or `bun <toolc
- "Optional" data is only allowed when the user can really choose for that data; otherwise required.
- Ads SDKs: read each network's own Play data safety guidance; adding a network can add data types.
- Target audience under 13 pulls the app into the Families policy (certified ad networks, no ad id): only if true.
- Apple: "linked to the user" is No when there are no accounts and nothing ties data to a name / email / phone;
with accounts, what you store under the account is linked.
- Accounts: Play asks for a delete-account URL in Data safety and Apple wants deletion inside the app
(`account-deletion` skill).
- Apple: "linked to the user" is No when there are no accounts and nothing ties data to a name / email / phone.
- App Privacy saved but not published = not submitted.
- Keep store answers, the privacy policy and the in-app privacy settings consistent; reviewers compare them.

View file

@ -1,6 +1,6 @@
---
name: store-health
description: Watch a released mobile app's or game's crash and ANR health on both stores - Google Play Android vitals (user-perceived crash rate 1.09 % and ANR rate 0.47 % bad behavior thresholds, 8 % per device model) through the Play Developer Reporting API, App Store power and performance metrics, diagnostic signatures and TestFlight crash reports, a weekly Markdown report, and validate blockers when a threshold is crossed. Use when the user asks about crashes, ANRs, vitals, stability, a weekly health check, or why Play shows a quality warning.
description: Watch a released mobile game's crash and ANR health on both stores - Google Play Android vitals (user-perceived crash rate 1.09 % and ANR rate 0.47 % bad behavior thresholds, 8 % per device model) through the Play Developer Reporting API, App Store power and performance metrics, diagnostic signatures and TestFlight crash reports, a weekly Markdown report, and validate blockers when a threshold is crossed. Use when the user asks about crashes, ANRs, vitals, stability, a weekly health check, or why Play shows a quality warning.
---
# Store health (crashes, ANRs, diagnostics)
@ -15,13 +15,13 @@ instead). `storebound validate` runs the same checks for live apps. MCP: `health
needs **View app information (read-only)** for the app. Scope used: `playdeveloperreporting`. Reference:
https://developers.google.com/play/developer/reporting/reference/rest
- **App Store**: the API key that storebound already uses (Admin, App Manager or Developer role reads metrics).
Metrics come from users who share analytics with developers; small apps may show none.
Metrics come from users who share analytics with developers; small games may show none.
## Read the numbers
- **Play bad behavior thresholds** (28-day average, user-perceived, checked daily; sources:
https://developer.android.com/topic/performance/vitals and Play Console Help answer 9844486):
user-perceived crash rate **1.09 %**, user-perceived ANR rate **0.47 %**, and **8 %** on any single phone model.
Over a threshold, Play can lower the app's visibility and show a warning on its store listing. storebound marks
Over a threshold, Play can lower the game's visibility and show a warning on its store listing. storebound marks
over = blocker, from 80 % of a threshold = warn.
- Daily values swing on small user counts; the 28-day user-weighted rate is what Play judges. Device rows with fewer
than 500 users are ignored.
@ -43,6 +43,6 @@ instead). `storebound validate` runs the same checks for live apps. MCP: `health
- storebound reads the Reporting API rates as fractions (0.0109 = 1.09 %). The API reference calls them a
"percentage of distinct users" without stating the scale (not verified against a live response yet): the first
time, compare one number with Play Console > Android vitals and report a mismatch.
- Never share crash logs that contain user data outside the team; never paste tester emails from TestFlight crash
- Never share crash logs that contain player data outside the team; never paste tester emails from TestFlight crash
reports into chats or issues.
- Nothing here changes the store: it is safe to run any time.

View file

@ -1,24 +1,14 @@
---
name: store-iap-setup
description: Create and price in-app purchases (consumables, non-consumables like "remove ads" or a Pro unlock, non-renewing passes, coin/gem packs, starter packs) on Google Play and App Store Connect from one product list - regional prices, local overrides, a price sheet CSV for many products and regions (diff first, future-dated App Store changes), activation, review screenshots, submitting first IAPs with a version, license/sandbox testers. Use when the user sets up, prices, re-prices or tests in-app products/IAPs, checks that both stores match (catalog diff), or hits Play onetimeproducts / inappproducts 403 or App Store IAP submission errors.
description: Create and price in-app purchases (consumables, non-consumables like "remove ads", coin/gem packs, starter packs) on Google Play and App Store Connect from one product list - regional prices, local overrides, a price sheet CSV for many products and regions (diff first, future-dated App Store changes), activation, review screenshots, submitting first IAPs with a version, license/sandbox testers. Use when the user sets up, prices, re-prices or tests in-app products/IAPs, or hits Play onetimeproducts / inappproducts 403 or App Store IAP submission errors.
---
# In-app purchases on both stores
CLI: `storebound` (or `bunx storebound` in a project that has it, or `bun <toolchain>/cli/index.ts`). One list in `storebound.config.ts` `products[]` drives
both stores: `id` (same on both), `type` (consumable | non_consumable | non_renewing), `usd` base price, optional
`overrides` (`{ region: 'TR', currency: 'TRY', price: 99.99 }`), `listings` per language (title <= 30, description <=
45 for Apple), `reviewScreenshot`, optional `platforms: ['ios']` / `['android']` to sell it on one store only.
Auto-renewable subscriptions are a separate list (`subscriptions`, `store-subscriptions` skill).
- `non_renewing`: Apple NON_RENEWING_SUBSCRIPTION (access for a fixed time; your app tracks the expiry and offers
restore through your account system). Google Play has no such type: storebound makes it a one-time product your
app consumes when the access ends (or model it as a prepaid base plan in Play Console).
- Cross-store parity: `storebound catalog diff` (MCP `catalog_diff`, read-only) compares the config with both stores:
missing / extra products, type, US and override prices, localizations, and regions where the two stores price the
same product more than 10 % apart (`--threshold`).
- Offer codes for one-time products exist on the App Store API (`inAppPurchaseOfferCodes`); storebound does not
create them yet (App Store Connect > the IAP > Offer Codes). Play promo codes have no API (Play Console > Monetize >
Promo codes).
both stores: `id` (same on both), `type` (consumable | non_consumable), `usd` base price, optional `overrides`
(`{ region: 'TR', currency: 'TRY', price: 99.99 }`), `listings` per language (title <= 30, description <= 45 for
Apple), `reviewScreenshot`.
## Prerequisites
- Play: a build with `com.android.vending.BILLING` uploaded to any track; payments profile set up.
@ -59,9 +49,7 @@ App Store only, a future YYYY-MM-DD).
without one follow Apple's equalization). Play: the purchase option's regional prices are replaced; regions the
product has no price for get `convertRegionPrices` from the USD base, `--reconvert` resets every region the CSV
does not list.
- Future-dated changes (`start_date`) are App Store only; Play has no scheduled prices (change them on the day). The
same CSV feeds subscription prices: `storebound apple subscriptions --csv store/prices.csv` (dated rows become
scheduled subscription price changes) and `storebound play subscriptions --csv store/prices.csv`.
- Future-dated changes (`start_date`) are App Store only; Play has no scheduled prices (change them on the day).
- Apple's IAP pricing guide warns that a price **increase cannot be reverted** once it is in effect: tell the owner.
- Prices are public the moment the stores apply them. Never import without the owner reading the diff.
@ -84,5 +72,5 @@ App Store only, a future YYYY-MM-DD).
purchase information"; an older App Store marketing page says 55, but App Store Connect enforces 45).
- Product ids can never be reused after deletion on either store. Never delete without the owner.
- Do not put prices or product names in store descriptions; say "offers optional in-app purchases".
- If the app ships without real billing yet, hide every purchase surface in store builds (review rejects mock
- If the game ships without real billing yet, hide every purchase surface in store builds (review rejects mock
purchases) and answer "digital purchases: No" in IARC.

View file

@ -1,6 +1,6 @@
---
name: store-preflight
description: Run and read the storebound readiness checks before submitting a mobile app or game - `storebound check` (offline config, copy limits, files), `storebound check --aso`, `storebound validate` (read-only App Store Connect + Google Play report with ordered blockers) and `storebound privacy-manifest`. Use before every submission, when the user asks "is my app ready to submit", or after changing listings, builds, IAPs or SDKs.
description: Run and read the storebound readiness checks before submitting a mobile game - `storebound check` (offline config, copy limits, files), `storebound check --aso`, `storebound validate` (read-only App Store Connect + Google Play report with ordered blockers) and `storebound privacy-manifest`. Use before every submission, when the user asks "is my app ready to submit", or after changing listings, builds, IAPs or SDKs.
---
# Store preflight
@ -11,16 +11,12 @@ the stores; run them freely.
## Order
1. `storebound check`: config, both listing files (limits are checked locally: title 30, subtitle 30, keywords 100
bytes, Play short 80, notes 500 ...), screenshot copy, Data safety answers, IAP texts (Apple description 45),
files the config points at, `.storebound/` gitignored, and the app profile: accounts need `accounts.deletionUrl`
(+ `inApp`), a sign-in for review needs the demo account in `.storebound/`, subscriptions need `app.termsUrl`.
Fix everything it lists; it exits 1 on problems.
files the config points at, `.storebound/` gitignored. Fix everything it lists; it exits 1 on problems.
2. `storebound check --aso`: keyword field use, repeats, stuffing (`aso-basics`). Errors exit 1, warnings are advice.
3. `storebound privacy-manifest --ios ios/App` (iOS): app manifest, required-reason APIs, SDKs without manifests
(`privacy-manifest` skill).
4. `storebound validate` (or `--apple` / `--play`): talks to both APIs read-only and prints findings in fix order.
Exit 1 while there is a blocker. `--json` for scripts.
5. With in-app products or subscriptions: `storebound catalog diff` (read-only): both stores against the config,
prices per region, offers. Exit 1 on missing or mismatched items.
## Reading `validate`
Each line: number, level (`BLOCKER`, `warn`, `ok`), store, message, and a `fix:` with the command or skill.
@ -36,13 +32,8 @@ Each line: number, level (`BLOCKER`, `warn`, `ok`), store, message, and a `fix:`
| no app price schedule / availability | pricing never set | `apple appinfo`; if the API refuses the first availability record, set it once in App Store Connect > Pricing and Availability |
| IAP MISSING_METADATA / no review screenshot | product incomplete | `apple iap`, `apple iap-review` |
| privacy policy HTTP 404 / unreachable | URL broken | `privacy-policy` skill |
| subscription MISSING_METADATA / no review screenshot / no group localization | subscription incomplete | `apple subscriptions` (`store-subscriptions`) |
| Play subscription base plan DRAFT | not active | `play subscriptions` |
| accounts.deletionUrl not set / unreachable | Play needs a delete-account page | `account-deletion` skill |
| sign-in required but no demo account | App Review cannot get in (2.1) | `review-access` skill, `apple review-details` |
| no Terms of Use URL / description without a Terms link | subscriptions need the EULA link (3.1.2) | `store-subscriptions` skill |
| Play `<lang>`: phoneScreenshots 1/2 | graphics missing | `shots render`, `play images` |
| app-ads.txt lacks lines / 404 | ad networks cannot verify you | `ads-mediation-checks`; the file lives at the root of the developer website |
| app-ads.txt lacks lines / 404 | ad networks cannot verify you | `ads-levelplay-checks`; the file lives at the root of the developer website |
| no release on any track | nothing uploaded | `play release <aab>` |
| product purchase option DRAFT | not active | `play products` |
| user-perceived crash / ANR rate over 1.09 % / 0.47 % (live apps) | Play's bad behavior threshold is crossed | `store-health` skill: `storebound health`, fix the top issues, ship a higher versionCode |
@ -52,7 +43,6 @@ Vitals need the Play Developer Reporting API enabled for the service account; wi
"vitals not readable". `--no-health` skips these checks.
## What validate cannot see (UI-only, check by hand)
App Privacy labels published, Play App content declarations (ads, target audience, content rating, advertising ID,
App access with the demo account), in-app account deletion working, first subscriptions added to the version,
App Privacy labels published, Play App content declarations (ads, target audience, content rating, advertising ID),
agreements / tax / banking, countries for production on Play. (TestFlight groups and testers: `storebound apple
testflight status`.) Tell the owner which are still open.

View file

@ -1,6 +1,6 @@
---
name: store-screenshots
description: Produce store screenshots and the Play feature graphic for a mobile app or game in every required size and many languages - capture raw frames from the running app or game (web build via playwright, iOS Simulator via simctl, Android emulator or device via adb, or a folder of frames from any engine), write per-language marketing copy (incl. RTL Arabic and CJK fonts), render captioned scenes with device frames, review them in a local gallery, A/B variants for Play store listing experiments and App Store Product Page Optimization tests (created and filled through the API), JPEG copies for Play, and upload to both stores. Use when the user needs App Store / Google Play screenshots, preview images, a feature graphic, localized screenshot captions, or screenshot sizes.
description: Produce store screenshots and the Play feature graphic for a mobile game in every required size and many languages - capture raw frames from the running game (web build via playwright, iOS Simulator via simctl, Android emulator or device via adb, or a folder of frames from any engine), write per-language marketing copy (incl. RTL Arabic and CJK fonts), render captioned scenes with device frames, review them in a local gallery, A/B variants for Play store listing experiments and App Store Product Page Optimization tests (created and filled through the API), JPEG copies for Play, and upload to both stores. Use when the user needs App Store / Google Play screenshots, preview images, a feature graphic, localized screenshot captions, or screenshot sizes.
---
# Store screenshots
@ -43,10 +43,8 @@ simulator screenshot fits after the bar is cropped. Play tablet sizes (tab7 / ta
in a plain Android tablet body instead of the iPad one.
## Steps
1. **Screenshot switches.** Give the app or game params for screenshots: language, demo data or a fixed seed, no ads /
analytics / purchase UI, skip onboarding or the tutorial, jump to a screen or level, freeze at a moment. Frames must
show the real app in use (store rule; for a game: real gameplay). Apps: sign in to a demo account with realistic,
non-personal sample data; never show real user data.
1. **Game switches.** Give the game URL params for screenshots: language, fixed seed, no ads / analytics / purchase
UI, skip tutorial, jump to a level, freeze at a moment. Frames must show real gameplay (store rule).
2. **Capture.** Configure `shots.capture` with a `source` (or pass `--source`), then
`storebound shots capture --lang en --dry` to see the plan, and without `--dry` to capture. Frames land in
`<shots.frames>/<lang>/<phone|tablet>/<shot>.png`, local, not committed.
@ -68,19 +66,15 @@ in a plain Android tablet body instead of the iPad one.
`cropTop` rows (the status bar) so they fit the template: by default the frame's bar share per device class
(162 px on a 6.9" iPhone, 48 px on a 13" iPad with `apple.ipad`); set `cropTop: 120` or `{ phone, tablet }` for
other devices, and `shots.phone` / `shots.tablet` to that device's screen in points. Capture warns when a frame's
aspect does not match. Give the app time to load: `delayMs` (simulator / emulator; 2500 default is short for a
aspect does not match. Give the game time to load: `delayMs` (simulator / emulator; 2500 default is short for a
cold start) or `waitFor` (web).
3. **Copy.** `store/shots/copy.json`: per language, per scene: `eyebrow`, `title` [white line, gold line], `sub`,
`badges` [[big, small]] (game style). Short and true (only claim what is in the app); about 15 Latin characters per title line.
Natural marketing tone per language, not literal translation; use the app's own terms.
`badges` [[big, small]]. Short and true (only claim what is in the game); about 15 Latin characters per title line.
Natural marketing tone per language, not literal translation; use the game's own terms.
4. **Fonts.** `storebound shots fonts` downloads title/body fonts and a Noto subset for every non-Latin script found in
the copy (CJK, Arabic, Hebrew, Devanagari, Thai, Cyrillic/Greek). Re-run after copy edits.
5. **Style and scenes.** `shots.style`: `game` (sunburst, sparkles, outlined titles, badges) or `app` (calm gradient,
one clean device frame, headline + subline, no sparkles; badges only as quiet chips when the copy has them).
Default: `app` for the app / subscription-app profiles, `game` otherwise. `shots.scenes`: palette (game: fire,
violet, blast, green, night, sky, gold, candy; app: mist, paper, mint, sand, rose, sky, ocean, slate; or custom
`{ bg, glow, ink, shadow }`), frames (one front phone + optional back phones with x / dy / scale / rotate), badge
slots (y, side, icon, hot, stars). Fonts default to Lilita One + Montserrat (game) or Inter (app).
5. **Scenes.** `shots.scenes`: palette (fire, violet, blast, green, night, sky, gold, candy or custom), frames (one
front phone + optional back phones with x / dy / scale / rotate), badge slots (y, side, icon, hot, stars).
6. **Render.** `storebound shots render --lang en` first, review `store/renders/en/sheet.png` (contact sheet, sizes
packed into a grid), then
all languages in the background: `storebound shots render > .storebound/render.log 2>&1 &`.

View file

@ -1,61 +0,0 @@
---
name: store-subscriptions
description: Set up auto-renewable subscriptions on the App Store and Google Play from one config - Apple subscription groups, levels, localizations, equalized prices with overrides and a price CSV, introductory offers, promotional offers, offer codes and custom codes; Play subscriptions with base plans, regional prices, intro and developer-chosen offers; first submission with a version, the disclosure Apple 3.1.2 and Play's subscription policy require, Terms of Use (EULA) links, price changes and the catalog parity report. Use when the user sells subscriptions, adds a free trial, changes subscription prices, or gets a 3.1.2 / subscription policy rejection.
---
# Subscriptions on both stores
CLI: `storebound apple subscriptions`, `storebound play subscriptions` (both `--dry` first; they print the plan and
ask before writing), `storebound catalog diff` (read-only parity of the whole catalog), `storebound validate`.
Config: `subscriptions: [{ name, listings, subscriptions: [{ id, period, level, usd, overrides, listings, intro,
offers, offerCodes, reviewScreenshot, basePlanId, gracePeriod, platforms }] }]`, `app.termsUrl`.
## Model
- **Apple**: a subscription group per product line (people hold one subscription per group); `level` 1 = highest
service (upgrades and downgrades follow it). Prices: the USA price point for `usd`, its equalizations for every
territory, then `overrides` and rows from `--csv store/prices.csv` (same CSV as `storebound prices`, rows with a
future `start_date` become scheduled price changes). `preserveCurrentPrice` is always true: existing subscribers keep
their price; raising it for them is a separate, consent-bound step in App Store Connect.
- **Google Play**: no groups. Each entry is a Play subscription with one auto-renewing base plan (`basePlanId`
default from the period: monthly, yearly, ...), prices from `convertRegionPrices` + overrides + CSV. A base plan price
change applies to new subscribers; existing ones keep their price until you run a price migration in the Console.
- **Intro offer** (`intro`): free trial, pay as you go (`periods` at `usd`), or pay up front. Apple: per territory,
first-time subscribers of the group. Play: an offer for people who never had this subscription (pay as you go is a
relative discount, so it follows every regional price).
- **Promotional offers** (`offers`, Apple + Play): Apple promotional offers (your server signs them at purchase
time); Play offers with an offer tag and no acquisition targeting (your app decides who sees them).
- **Offer codes** (`offerCodes`, Apple): a campaign (eligibility NEW / EXISTING / EXPIRED, replace or stack with the
intro offer). Custom codes are created only with `--codes` from a terminal that confirms (anyone with the code can
redeem it). One-time-use codes: the owner generates them in App Store Connect. **Play promo codes have no API**:
Play Console > Monetize > Promo codes.
## Steps
1. Prerequisites: Apple Paid Applications agreement, banking and tax; Play payments profile and a build with the
billing library on a track.
2. `storebound check` (limits: Apple name 30 / description 45; Play description 200, up to 4 benefits).
3. `storebound apple subscriptions --dry` and `storebound play subscriptions --dry`; read the plan with the owner; then
run them in a terminal (they ask). Through MCP (no terminal) they only create what is new; price changes of
existing subscriptions wait for the owner.
4. Review screenshot of the paywall per subscription (`reviewScreenshot`), uploaded by `apple subscriptions`.
5. **First subscriptions go with an app version**: on the version page in App Store Connect, add them under
"In-App Purchases and Subscriptions" before Submit for Review (no API; the owner or an agent with browser tools).
6. `storebound validate` (states, localizations, group names, review screenshots, active Play base plans, terms URL)
and `storebound catalog diff` (both stores against the config, prices per region).
## Disclosure (review checks it)
- Purchase screen: plan name, length, **full renewal price per period as the most prominent price**, what is included,
trial length and what is charged after it, how to cancel, Restore Purchases, links to the **Terms of Use** and the
**Privacy Policy** (Apple 3.1.2 and "Clearly describing subscriptions",
https://developer.apple.com/app-store/subscriptions/; Google Play subscriptions policy,
https://support.google.com/googleplay/android-developer/answer/9900533).
- Metadata: the Terms of Use link in the App Store description, or a custom EULA in App Information > License
Agreement; the privacy policy URL field (`storebound apple listing`). `validate` warns when a description has no
Terms link. 3.1.2(a): a subscription must give ongoing value and last at least 7 days.
- Review notes: where the paywall is, that the demo account can buy in the sandbox (`review-access`).
## Gotchas
- A product id, a billing period or a subscription's group cannot change; make a new id.
- Apple applies one introductory offer per customer per group; offers cannot be edited, only replaced.
- Account deletion does not cancel a subscription: say so (`account-deletion`).
- Unverified (no live account during development): free promotional offers and offer codes are sent with
territories but no price point; check the first run in App Store Connect.

View file

@ -1,6 +1,6 @@
---
name: testflight
description: Run TestFlight for a mobile app or game through the App Store Connect API - beta groups (internal / external, public links), testers from a CSV that never enters git, adding a build by its exact number to groups, "What to Test" per locale from the release notes, Test Information, and the Beta App Review submission the owner confirms. Use when the user wants testers on a build, sets up beta groups, writes What to Test, or asks why external testers do not see a build.
description: Run TestFlight for a mobile game through the App Store Connect API - beta groups (internal / external, public links), testers from a CSV that never enters git, adding a build by its exact number to groups, "What to Test" per locale from the release notes, Test Information, and the Beta App Review submission the owner confirms. Use when the user wants testers on a build, sets up beta groups, writes What to Test, or asks why external testers do not see a build.
---
# TestFlight
@ -74,6 +74,6 @@ beta app localization before a Beta App Review submission, and fields cannot be
https://developer.apple.com/help/app-store-connect/test-a-beta-version/testflight-overview).
- A public link (`publicLink: true`) lets anyone with it join, up to `publicLinkLimit` (1-10000). Share it only where
the owner wants; it still needs the approved build.
- External testers of an app with IAP or subscriptions buy with sandbox accounts automatically (no charge); say so in What to Test.
- External testers of a game with IAP buy with sandbox accounts automatically (no charge); say so in What to Test.
- Rejected beta review: read the message in App Store Connect > TestFlight, fix, upload a new build, submit again
(review-rejections skill for the tone of the reply).

View file

@ -1,6 +1,6 @@
---
name: whats-new
description: Write user-facing release notes ("What's new") for a mobile app or game update from the git log since the last tag - hook in the first line, plain user language, localized into every listing language, within store limits (Google Play 500, App Store 4000 characters). Use when preparing an update, when the user asks for release notes / changelog for the stores, or before play release / apple listing for a new version.
description: Write player-facing release notes ("What's new") for a mobile game update from the git log since the last tag - hook in the first line, plain player language, localized into every listing language, within store limits (Google Play 500, App Store 4000 characters). Use when preparing an update, when the user asks for release notes / changelog for the stores, or before play release / apple listing for a new version.
---
# What's new (release notes)
@ -11,17 +11,16 @@ writes a draft into the default language of `store/listing.md` (Play "What's new
(`whatsNew`). Nothing is sent to a store. `--all` writes the draft into every language as a starting point for
translation; `storebound check` warns while a translation is still identical to the source.
## Write it for your users
## Write it for players
1. Run `storebound whats-new --dry`, read the draft with the owner.
2. Rewrite:
- **First line = hook** (the stores show roughly the first 170 characters before "more"): the most exciting
change in user words ("New: shared lists with your family" for an app, "New: 20 desert levels and a daily challenge!"
for a game).
- Then 2-5 bullets, most visible first. User words, not code words: "Lists open faster" / "Levels load faster", not "refactor asset
change in player words ("New: 20 desert levels and a daily challenge!").
- Then 2-5 bullets, most visible first. Player words, not code words: "Levels load faster" not "refactor asset
loader"; never internal ids, branch names or ticket numbers.
- Fixes in one line unless a fix was a known user complaint.
- Fixes in one line unless a fix was a known player complaint.
- No promises of future features, no prices, no other platforms.
3. Translate into **every listing language** (natural tone, the app's own terms, same meaning; not word by word).
3. Translate into **every listing language** (natural tone, the game's own terms, same meaning; not word by word).
Arabic stays RTL; keep numbers and product names as they are.
4. Limits: Google Play **500** characters per language, App Store **4000**; `storebound check` enforces both. A first
App Store version has no "What's new" (storebound leaves it empty there).

View file

@ -3,6 +3,5 @@
"ASC_KEY_ID": "YOUR_KEY_ID",
"ASC_ISSUER_ID": "00000000-0000-0000-0000-000000000000",
"ASC_P8": "/absolute/path/to/AuthKey_<KEY_ID>.p8",
"reviewContact": { "firstName": "", "lastName": "", "phone": "+1 555 0100", "email": "review-contact@example.com" },
"reviewDemoAccount": { "username": "", "password": "" }
"reviewContact": { "firstName": "", "lastName": "", "phone": "+1 555 0100", "email": "review-contact@example.com" }
}

View file

@ -1,29 +0,0 @@
# Example App · App Store "App Privacy" answers
App Store Connect > your app > App Privacy. **Web UI only, there is no API.** Fill it from this table, then press
**Publish** (saving alone does not publish it). Keep it consistent with the privacy policy and the Play Data safety
answers (`dataSafety` in `storebound.config.ts`). **Edit to match your app.**
Typical utility / productivity app: optional account (email), content synced to your backend, an analytics SDK
acting as your processor, no ads, no tracking.
**Do you or your third-party partners collect data from this app?** Yes
**Tracking**: No (no ad SDK, no data broker, nothing combined with other companies' data for advertising). If that
changes, add the App Tracking Transparency prompt first.
| data type | collected | used to track | linked to the user | purposes |
|---|---|---|---|---|
| Contact Info > Email Address | yes (account) | no | yes | App Functionality |
| Identifiers > User ID | yes (account id) | no | yes | App Functionality, Analytics |
| User Content > Other User Content (lists, notes) | yes (synced) | no | yes | App Functionality |
| Usage Data > Product Interaction | yes (analytics) | no | yes if tied to the account, else no | Analytics |
| Diagnostics > Crash Data | yes | no | no | App Functionality, Analytics |
| Diagnostics > Performance Data | yes | no | no | Analytics |
"Linked to you" is **Yes** for what you store under the account. Not collected (typical): Location, Health and
Fitness, Financial Info, Contacts, Photos or Videos (unless people attach them), Browsing and Search History,
Purchases (until you sell something), Sensitive Info.
Per data type the UI asks, in order: purposes > "Is this data linked to the user's identity?" > "Do you or your
third-party partners use this data for tracking purposes?".

View file

@ -1,67 +0,0 @@
# Example App · App Store listing copy
Source for `storebound apple listing`. One `## <ASC locale>` section per locale (the first word is the locale code:
`en-US`, `tr`, `de-DE`, `ja`, `zh-Hans`, `ar-SA`, ...), one fenced block per `### <field>`, field names exactly:
`name` (optional, defaults to `app.name`), `subtitle` (30), `promotionalText` (170), `keywords` (100 bytes, comma
separated, no spaces after commas, do not repeat the app name), `description` (4000), `whatsNew` (optional; not allowed
on the first version). Shared values (privacy policy, support and marketing URL) come from `storebound.config.ts`.
---
## en-US · English (U.S.)
### subtitle
```
Lists and notes, in sync
```
### promotionalText
```
One or two sentences you can change any time without a new version.
```
### keywords
```
todo,checklist,groceries,planner,notes,shared,family,organizer,tasks,sync
```
### description
```
First paragraph: the job the app does and why it is easier with it.
FEATURES
• Lists and notes that sync across your devices
• Share a list with family or friends
• Export your data or delete your account in Settings, any time
Free to use. An account is optional and only needed for sync and sharing.
```
## tr · Türkçe
### subtitle
```
Listeler ve notlar, eşitli
```
### promotionalText
```
Yeni sürüm göndermeden istediğin zaman değiştirebileceğin bir iki cümle.
```
### keywords
```
yapılacaklar,kontrol,market,planlayıcı,not,paylaşım,aile,düzen,görev
```
### description
```
İlk paragraf: uygulamanın gördüğü iş ve onunla neden daha kolay olduğu.
ÖZELLİKLER
• Tüm cihazlarında eşitlenen listeler ve notlar
• Bir listeyi ailen ya da arkadaşlarınla paylaş
• Verilerini dışa aktar ya da hesabını Ayarlar'dan istediğin an sil
Ücretsiz. Hesap isteğe bağlıdır; yalnızca eşitleme ve paylaşım için gerekir.
```

View file

@ -1,57 +0,0 @@
# Example App · store declarations (answers to copy into the consoles)
Starting answers for a typical **utility / productivity app**: an optional account (email + password, or sign in
with a provider), an analytics SDK acting as your processor, data synced to your own backend, no ads, no chat with
strangers, general audience. **Edit every line to match your app**: these are your statements to the stores. Everything
marked **UI** has no API: Play Console > your app > Policy and programs > **App content**, and App Store Connect for
Apple. Data safety (Play) has an API: `storebound play data-safety`.
## Google Play · App content (UI)
| declaration | answer |
|---|---|
| Privacy policy | your policy URL (same one in the listing and inside the app) |
| App access | "All or some functionality is restricted": add the demo account (username, password) and the steps from `reviewAccess.instructions`; credentials must work at all times, no 2FA / OTP (review-access skill) |
| Ads | No, my app does not contain ads |
| Content rating | IARC questionnaire, below |
| Target audience and content | 18 and over (or 13+ if teens use it); "Could your app unintentionally appeal to children?" No (only if true) |
| News app | No |
| Data safety | `storebound play data-safety`, then check the summary; with accounts: the delete-account URL (`accounts.deletionUrl`) |
| Government apps | No |
| Financial features | My app doesn't provide any financial features |
| Health apps | No health features |
| Advertising ID | No (unless an SDK in your app reads it: check the SDK docs and your merged manifest) |
| Store settings | App, category (Productivity, Tools, ...); contact email + website |
## Account deletion (account-deletion skill)
- In the app: Settings > Account > Delete account deletes the account and its data (not only "deactivate").
- On the web: `accounts.deletionUrl` lets people request deletion without the app; Play asks for it in Data safety.
- With subscriptions: say that deleting the account does not cancel the store subscription, and how to cancel.
## IARC content rating (Play UI; Apple has its own form, `storebound apple appinfo`)
Category: not a game (e.g. Utility, Productivity, Communication, or Social Networking if people share content with
others). Typical answers for a lists / notes app:
| topic | answer |
|---|---|
| Violence, sexuality, language, controlled substances | No |
| Gambling (simulated / real money) | No |
| Users interact or exchange content | Yes only if people can share with others outside their own invitations; then also moderation and reporting |
| Shares location with other users | No |
| Digital purchases | No (Yes once you sell IAPs or subscriptions) |
| Unrestricted internet / browser | No |
Expected: PEGI 3, ESRB Everyone, IARC 3+. Apple age rating 4+ (all content questions None) unless users share
content publicly.
## App Store (UI-only parts)
- App record: App Store Connect > Apps > + > New App. No API.
- App Privacy: `app-privacy.md`, then **Publish**.
- App Review information: `storebound apple review-details` sends the contact, the demo account (from
`.storebound/credentials.json`, masked in the log) and the notes.
- Export compliance (export-compliance skill): `ITSAppUsesNonExemptEncryption = NO` only if true.
- Guideline 5.1.1: the privacy policy link must also be reachable **inside the app**; 5.1.1(v): account deletion
inside the app.

View file

@ -1,61 +0,0 @@
# Example App · Google Play listing copy
Source for `storebound play listing` (title, short + full description) and `storebound play release` (release notes).
Rules the parser follows:
- every `## ...` section with a `<!-- play: <codes> -->` line is a listing; one section can serve several Play codes
- under it, `### ...` headings that contain **title** (optional, defaults to `app.name`), **short**, **full** and
**what's new**, each followed by one fenced block
- limits (checked before anything is sent): title 30, short 80, full 4000, what's new 500 characters
Only claim what the app really does. No prices, no "best / #1", no other apps' names.
---
## English (en-US)
<!-- play: en-US -->
### Play short description (max 80)
```
What the app does for people, in one plain line
```
### Play full description (max 4000)
```
First paragraph: the job the app does and why it is easier with it, in two or three sentences.
FEATURES
• Lists and notes that sync across your devices
• Share a list with family or friends
• Export your data or delete your account in Settings, any time
Free to use. An account is optional and only needed for sync and sharing.
```
### What's new (max 500)
```
First release. Thanks for trying it!
```
## Türkçe (tr-TR)
<!-- play: tr-TR -->
### Play kısa açıklama · short (max 80)
```
Uygulamanın insanlar için ne yaptığını anlatan sade bir cümle
```
### Play tam açıklama · full (max 4000)
```
İlk paragraf: uygulamanın gördüğü iş ve onunla neden daha kolay olduğu, iki üç cümlede.
ÖZELLİKLER
• Tüm cihazlarında eşitlenen listeler ve notlar
• Bir listeyi ailen ya da arkadaşlarınla paylaş
• Verilerini dışa aktar ya da hesabını Ayarlar'dan istediğin an sil
Ücretsiz. Hesap isteğe bağlıdır; yalnızca eşitleme ve paylaşım için gerekir.
```
### Yenilikler · what's new (max 500)
```
İlk sürüm. Denediğin için teşekkürler!
```

View file

@ -1,88 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Privacy Policy · Example Studio</title>
<!--
One privacy policy for your apps (profile "app": accounts, synced content, analytics, no ads), with a per-app
services table. Host it at a stable URL (https://example.com/privacy) and use that URL in both store listings, in
storebound.config.ts and inside each app (Settings > Privacy; App Store guideline 5.1.1). Replace every "Example"
value and remove services you do not use. Update the date and the table whenever an app starts collecting something
new, then the store declarations. This is a template, not legal advice.
-->
<style>
:root { color-scheme: light dark; --fg: #1b1c20; --bg: #ffffff; --muted: #5d6170; --line: #e3e5ea; --accent: #2563eb; }
@media (prefers-color-scheme: dark) { :root { --fg: #eceef3; --bg: #15161a; --muted: #a3a8b6; --line: #2b2d35; --accent: #7aa2ff; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
main { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
h1 { font-size: 1.8rem; margin: 0 0 4px; } h2 { font-size: 1.2rem; margin-top: 2em; }
p.meta { color: var(--muted); margin: 0 0 24px; }
a { color: var(--accent); }
.table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }
nav a { margin-right: 12px; }
</style>
</head>
<body>
<main>
<nav><a href="#en">English</a><a href="#tr">Türkçe</a></nav>
<section id="en">
<h1>Privacy Policy</h1>
<p class="meta">Example Studio · applies to all our apps · last updated 2026-01-01</p>
<p>We collect what an app needs to work for you, never sell personal data and show no ads. This page explains what
each app collects, why, and what you can do about it.</p>
<h2>What our apps use</h2>
<div class="table"><table>
<tr><th>App</th><th>Service</th><th>What and why</th><th>Your choice</th></tr>
<tr><td>Example App</td><td>Account (our servers)</td><td>Email address, account id and the lists and notes you create: to sign you in and sync your content between your devices.</td><td>The account is optional; export or delete it in Settings &gt; Account</td></tr>
<tr><td>Example App</td><td>Analytics (e.g. a privacy-friendly analytics SDK)</td><td>Random install id, screens used, device model, OS version: to improve the app.</td><td>Settings &gt; Analytics off</td></tr>
<tr><td>Example App</td><td>Crash reporting</td><td>Crash logs and device model: to fix crashes.</td><td>-</td></tr>
<tr><td>Example App</td><td>App stores</td><td>Purchases and subscriptions are handled by Google Play / the App Store; we never see payment details.</td><td>-</td></tr>
</table></div>
<h2>Deleting your account</h2>
<p>In the app: Settings &gt; Account &gt; Delete account. Without the app: <a href="https://example.com/delete-account">example.com/delete-account</a>.
We delete your account and its content within 30 days; backups roll over within 90 days. A store subscription is
not cancelled by deleting the account: cancel it in your Google Play or App Store subscriptions.</p>
<h2>Children</h2>
<p>Our apps are not directed at children under 13. We do not knowingly collect personal data from children. If you
believe a child sent us data, contact us and we will delete it.</p>
<h2>Retention and your rights</h2>
<p>We keep account data while the account exists and analytics data for up to 24 months. You can ask for a copy or
the deletion of your data by writing to <a href="mailto:privacy@example.com">privacy@example.com</a>; we answer
within 30 days.</p>
<h2>Security</h2>
<p>All network traffic of our apps uses HTTPS; passwords are stored only as salted hashes.</p>
<h2>Changes</h2>
<p>When an app starts collecting something new we update this page and its date first.</p>
<h2>Contact</h2>
<p>Example Studio · <a href="mailto:privacy@example.com">privacy@example.com</a></p>
</section>
<section id="tr" lang="tr">
<h1>Gizlilik Politikası</h1>
<p class="meta">Example Studio · tüm uygulamalarımız için geçerlidir · son güncelleme 2026-01-01</p>
<p>Yalnızca uygulamanın sizin için çalışması gereken verileri topluyoruz, kişisel verileri asla satmıyoruz ve reklam
göstermiyoruz. Yukarıdaki tablo her uygulamanın neyi neden topladığını gösterir.</p>
<h2>Hesabınızı silmek</h2>
<p>Uygulamada: Ayarlar &gt; Hesap &gt; Hesabı sil. Uygulama olmadan: <a href="https://example.com/delete-account">example.com/delete-account</a>.
Mağaza aboneliği hesap silinince iptal olmaz; Google Play veya App Store aboneliklerinizden iptal edin.</p>
<h2>Haklarınız</h2>
<p>Verilerinizin bir kopyasını veya silinmesini <a href="mailto:privacy@example.com">privacy@example.com</a> adresine
yazarak isteyebilirsiniz; 30 gün içinde yanıtlıyoruz.</p>
</section>
</main>
</body>
</html>

View file

@ -1,14 +0,0 @@
{
"en": {
"home": { "eyebrow": "Example App", "title": ["Everything in order,", "in one calm place"], "sub": "Lists and notes, synced on all your devices." },
"detail": { "eyebrow": "Get it done", "title": ["See what is left", "at a glance"], "sub": "Tap to tick, swipe to reorder." },
"share": { "eyebrow": "Together", "title": ["Share a list,", "plan together"], "sub": "Invite people by link and edit live." },
"privacy": { "eyebrow": "Your data", "title": ["Private by default,", "yours to export"], "sub": "Export your data or delete your account in Settings." }
},
"tr": {
"home": { "eyebrow": "Example App", "title": ["Her şey düzenli,", "tek sakin bir yerde"], "sub": "Listeler ve notlar, tüm cihazlarında eşitlenir." },
"detail": { "eyebrow": "Bitir", "title": ["Kalanları", "bir bakışta gör"], "sub": "Dokun işaretle, sürükle sırala." },
"share": { "eyebrow": "Birlikte", "title": ["Listeyi paylaş,", "birlikte planla"], "sub": "Bağlantıyla davet et, canlı düzenleyin." },
"privacy": { "eyebrow": "Verilerin", "title": ["Varsayılan olarak gizli,", "dışa aktarması senin"], "sub": "Verilerini dışa aktar ya da hesabını Ayarlar'dan sil." }
}
}

View file

@ -1,130 +0,0 @@
// storebound config for one app (profile "app": a utility / productivity app with an optional account and an
// analytics SDK, no ads). Every answer below is a starting point: edit it to match your app. Credentials NEVER go
// here (env vars or .storebound/credentials.json, gitignored). Paths are relative to this file.
// The type import is optional: it only works when storebound is installed in the project (bun add -d storebound).
import type { ShipConfig } from 'storebound';
const config: ShipConfig = {
app: {
name: 'Example App',
profile: 'app',
copyright: '2026 Example Studio',
privacyPolicyUrl: 'https://example.com/privacy',
// termsUrl: 'https://example.com/terms', // Terms of Use; required once you sell subscriptions
supportUrl: 'https://example.com/support',
marketingUrl: 'https://example.com',
website: 'https://example.com',
contactEmail: 'support@example.com',
},
// Accounts (account-deletion skill). Remove this block if the app has no sign-up / sign-in at all.
// Apple 5.1.1(v): deletion must start inside the app. Google Play: in the app AND on a public web page.
accounts: {
enabled: true,
deletionUrl: 'https://example.com/delete-account', // public page, no login needed to request deletion
inApp: 'Settings > Account > Delete account', // goes into the App Review notes
},
// Sign-in for store reviewers (review-access skill). The demo account itself lives ONLY in
// .storebound/credentials.json ("reviewDemoAccount") or REVIEW_DEMO_USER / REVIEW_DEMO_PASSWORD.
reviewAccess: {
signInRequired: true, // false if every feature works without signing in
instructions: 'Sign in with the demo account. Sample data is already there; nothing needs a second device.',
},
// id = your folder / copy key; play = Play language code(s); apple = App Store Connect locale
languages: [
{ id: 'en', play: 'en-US', apple: 'en-US' },
{ id: 'tr', play: 'tr-TR', apple: 'tr' },
],
play: {
packageName: 'com.example.app',
defaultLanguage: 'en-US',
listing: 'store/listing.md',
icon: 'store/icons/play-512.png',
},
apple: {
bundleId: 'com.example.app',
listing: 'store/appstore.md',
// Export compliance (export-compliance skill): decide it, then uncomment. false ONLY if the app uses no encryption
// beyond the OS (HTTPS through the system, standard sign-in).
// usesNonExemptEncryption: false,
// ipad: true,
info: {
categories: { primary: 'PRODUCTIVITY', secondary: 'UTILITIES' },
ageRating: {}, // every content question NONE / false; change what applies (user-generated content, web access ...)
contentRights: 'DOES_NOT_USE_THIRD_PARTY_CONTENT',
free: true,
reviewNotes: [
'Example App keeps lists and notes in sync across devices. An account is optional on the first screen.',
'Privacy policy and Terms: Settings > About.',
].join('\n\n'),
},
},
// In-app purchases (optional): a one-time "Pro" unlock, for example. Subscriptions: see the subscription-app profile
// (storebound init --profile subscription-app) or the store-subscriptions skill.
// products: [{ id: 'com.example.app.pro', type: 'non_consumable', usd: 4.99,
// listings: { en: { title: 'Pro', description: 'Unlimited lists and themes.' } }, reviewScreenshot: 'store/iap-review/pro.png' }],
// Google Play Data safety. Types not listed = not collected. Typical app with accounts + an analytics SDK acting as
// your processor (collected, not shared). Edit to match what your app and its SDKs really do.
dataSafety: {
collectsData: true,
encryptedInTransit: true,
deletionRequest: true,
// Sign-up methods. Google does not publish these ids: compare with Play Console > App content > Data safety >
// Export to CSV before the first import. The delete-account URL question that follows: add it under `extra` with
// the exact id from that export, e.g. { question: '<id from the export>', value: 'https://example.com/delete-account' }.
accountCreation: ['PSL_ACM_USER_ID_PASSWORD'],
data: {
PSL_EMAIL: { shared: false, collect: ['functionality', 'account'] },
PSL_USER_ACCOUNT: { shared: false, collect: ['functionality', 'account'] },
PSL_USER_GENERATED_CONTENT: { shared: false, collect: ['functionality'] },
PSL_USER_INTERACTION: { shared: false, collect: ['analytics'] },
PSL_CRASH_LOGS: { shared: false, collect: ['analytics'] },
PSL_PERFORMANCE_DIAGNOSTICS: { shared: false, collect: ['analytics'] },
PSL_DEVICE_ID: { shared: false, collect: ['analytics'] },
},
},
renders: 'store/renders',
shots: {
style: 'app', // calm gradient, device frame, headline + subline (game: sparkles and badges)
copy: 'store/shots/copy.json',
frames: 'store/shots/frames', // <lang>/phone/<name>.png, <lang>/tablet/<name>.png
out: 'store/renders',
// fonts: { title: 'Inter', body: 'Inter' }, // the app style default
scenes: [
{ id: 'home', palette: 'mist', frames: [{ src: 'home.png' }] },
{ id: 'detail', palette: 'mint', frames: [{ src: 'detail.png' }] },
{ id: 'share', palette: 'sky', frames: [{ src: 'share.png' }] },
{ id: 'privacy', palette: 'slate', frames: [{ src: 'settings.png' }] },
],
feature: { frame: 'home.png', palette: 'mist' },
// Raw frames from a web build, the iOS Simulator (ios-sim) or an Android emulator (android-emu): sign in to a demo
// account with realistic sample data, never real user data (store-screenshots skill).
capture: {
baseUrl: 'http://127.0.0.1:5173',
query: 'lang={lang}&demo=1',
shots: {
'home': { path: '/', delayMs: 1000, device: 'both' },
'detail': { path: '/lists/1', delayMs: 1000, device: 'both' },
'share': { path: '/lists/1/share', delayMs: 1000, device: 'both' },
'settings': { path: '/settings', delayMs: 1000, device: 'both' },
},
},
},
icons: {
composite: 'store/icon/icon.png',
foreground: 'store/icon/foreground.png',
background: 'store/icon/background.png',
out: 'store/icons',
},
};
export default config;

View file

@ -1,30 +0,0 @@
# Example App · App Store "App Privacy" answers
App Store Connect > your app > App Privacy. **Web UI only, there is no API.** Fill it from this table, then press
**Publish** (saving alone does not publish it). Keep it consistent with the privacy policy and the Play Data safety
answers (`dataSafety` in `storebound.config.ts`). **Edit to match your app.**
Typical subscription app: account (email), content synced to your backend, auto-renewable subscriptions checked by
your server, an analytics SDK acting as your processor, no ads, no tracking.
**Do you or your third-party partners collect data from this app?** Yes
**Tracking**: No (no ad SDK, no data broker, nothing combined with other companies' data for advertising). If that
changes, add the App Tracking Transparency prompt first.
| data type | collected | used to track | linked to the user | purposes |
|---|---|---|---|---|
| Contact Info > Email Address | yes (account) | no | yes | App Functionality |
| Identifiers > User ID | yes (account id) | no | yes | App Functionality, Analytics |
| User Content > Other User Content (lists, notes) | yes (synced) | no | yes | App Functionality |
| Usage Data > Product Interaction | yes (analytics) | no | yes if tied to the account, else no | Analytics |
| Purchases > Purchase History (subscription status) | yes | no | yes | App Functionality |
| Diagnostics > Crash Data | yes | no | no | App Functionality, Analytics |
| Diagnostics > Performance Data | yes | no | no | Analytics |
"Linked to you" is **Yes** for what you store under the account. Not collected (typical): Location, Health and
Fitness, Financial Info, Contacts, Photos or Videos (unless people attach them), Browsing and Search History,
Sensitive Info.
Per data type the UI asks, in order: purposes > "Is this data linked to the user's identity?" > "Do you or your
third-party partners use this data for tracking purposes?".

View file

@ -1,73 +0,0 @@
# Example App · App Store listing copy
Source for `storebound apple listing`. One `## <ASC locale>` section per locale (the first word is the locale code:
`en-US`, `tr`, `de-DE`, `ja`, `zh-Hans`, `ar-SA`, ...), one fenced block per `### <field>`, field names exactly:
`name` (optional, defaults to `app.name`), `subtitle` (30), `promotionalText` (170), `keywords` (100 bytes, comma
separated, no spaces after commas, do not repeat the app name), `description` (4000), `whatsNew` (optional; not allowed
on the first version). Shared values (privacy policy, support and marketing URL) come from `storebound.config.ts`.
---
## en-US · English (U.S.)
### subtitle
```
Lists and notes, in sync
```
### promotionalText
```
One or two sentences you can change any time without a new version.
```
### keywords
```
todo,checklist,groceries,planner,notes,shared,family,organizer,tasks,sync
```
### description
```
First paragraph: the job the app does and why it is easier with it.
FEATURES
• Lists and notes that sync across your devices
• Share a list with family or friends
• Export your data or delete your account in Settings, any time
Free to use with up to 3 lists. Example Pro unlocks unlimited lists, sharing and themes: yearly with a 1-week free trial, or monthly. Payment is charged to your store account; the subscription renews automatically unless cancelled at least 24 hours before the end of the period, and you can manage or cancel it in your account settings.
Terms of Use: https://example.com/terms
Privacy Policy: https://example.com/privacy
```
## tr · Türkçe
### subtitle
```
Listeler ve notlar, eşitli
```
### promotionalText
```
Yeni sürüm göndermeden istediğin zaman değiştirebileceğin bir iki cümle.
```
### keywords
```
yapılacaklar,kontrol,market,planlayıcı,not,paylaşım,aile,düzen,görev
```
### description
```
İlk paragraf: uygulamanın gördüğü iş ve onunla neden daha kolay olduğu.
ÖZELLİKLER
• Tüm cihazlarında eşitlenen listeler ve notlar
• Bir listeyi ailen ya da arkadaşlarınla paylaş
• Verilerini dışa aktar ya da hesabını Ayarlar'dan istediğin an sil
3 listeye kadar ücretsiz. Example Pro sınırsız liste, paylaşım ve tema açar: 1 hafta ücretsiz denemeli yıllık ya da aylık. Ödeme mağaza hesabınızdan alınır; abonelik, dönem bitmeden en az 24 saat önce iptal edilmezse otomatik yenilenir; hesap ayarlarınızdan yönetebilir ya da iptal edebilirsiniz.
Kullanım Koşulları: https://example.com/terms
Gizlilik Politikası: https://example.com/privacy
```

View file

@ -1,69 +0,0 @@
# Example App · store declarations (answers to copy into the consoles)
Starting answers for a typical **subscription app**: auto-renewable subscriptions (free trial on the yearly plan), an account (email + password, or sign in
with a provider), an analytics SDK acting as your processor, data synced to your own backend, no ads, no chat with
strangers, general audience. **Edit every line to match your app**: these are your statements to the stores. Everything
marked **UI** has no API: Play Console > your app > Policy and programs > **App content**, and App Store Connect for
Apple. Data safety (Play) has an API: `storebound play data-safety`.
## Google Play · App content (UI)
| declaration | answer |
|---|---|
| Privacy policy | your policy URL (same one in the listing and inside the app) |
| App access | "All or some functionality is restricted": add the demo account (username, password) and the steps from `reviewAccess.instructions`; credentials must work at all times, no 2FA / OTP (review-access skill) |
| Ads | No, my app does not contain ads |
| Content rating | IARC questionnaire, below |
| Target audience and content | 18 and over (or 13+ if teens use it); "Could your app unintentionally appeal to children?" No (only if true) |
| News app | No |
| Data safety | `storebound play data-safety`, then check the summary; with accounts: the delete-account URL (`accounts.deletionUrl`) |
| Government apps | No |
| Financial features | My app doesn't provide any financial features |
| Health apps | No health features |
| Advertising ID | No (unless an SDK in your app reads it: check the SDK docs and your merged manifest) |
| Store settings | App, category (Productivity, Tools, ...); contact email + website |
## Account deletion (account-deletion skill)
- In the app: Settings > Account > Delete account deletes the account and its data (not only "deactivate").
- On the web: `accounts.deletionUrl` lets people request deletion without the app; Play asks for it in Data safety.
- With subscriptions: say that deleting the account does not cancel the store subscription, and how to cancel.
## IARC content rating (Play UI; Apple has its own form, `storebound apple appinfo`)
Category: not a game (e.g. Utility, Productivity, Communication, or Social Networking if people share content with
others). Typical answers for a lists / notes app:
| topic | answer |
|---|---|
| Violence, sexuality, language, controlled substances | No |
| Gambling (simulated / real money) | No |
| Users interact or exchange content | Yes only if people can share with others outside their own invitations; then also moderation and reporting |
| Shares location with other users | No |
| Digital purchases | Yes (subscriptions) |
| Unrestricted internet / browser | No |
Expected: PEGI 3, ESRB Everyone, IARC 3+. Apple age rating 4+ (all content questions None) unless users share
content publicly.
## App Store (UI-only parts)
- App record: App Store Connect > Apps > + > New App. No API.
- App Privacy: `app-privacy.md`, then **Publish**.
- App Review information: `storebound apple review-details` sends the contact, the demo account (from
`.storebound/credentials.json`, masked in the log) and the notes.
- Export compliance (export-compliance skill): `ITSAppUsesNonExemptEncryption = NO` only if true.
- Guideline 5.1.1: the privacy policy link must also be reachable **inside the app**; 5.1.1(v): account deletion
inside the app.
## Subscriptions (store-subscriptions skill)
- Purchase screen (both stores): plan name, length, the full renewal price per period (most prominent), what is
included, free trial length and what is charged after it, how to cancel, Restore Purchases, links to the Terms of Use
and the Privacy Policy. Apple 3.1.2; Google Play subscriptions policy.
- Metadata: the App Store description (or a custom EULA in App Information > License Agreement) links the Terms of
Use; the Privacy Policy URL field is set by `storebound apple listing`.
- First subscriptions are submitted together with an app version (App Store Connect: add them to the version on its
page before Submit for Review), like first in-app purchases.
- App Review notes say where the paywall is and that sandbox purchases work with the demo account.
- Play: base plans and offers must be active before people can buy; new subscribers see the converted regional prices.

View file

@ -1,67 +0,0 @@
# Example App · Google Play listing copy
Source for `storebound play listing` (title, short + full description) and `storebound play release` (release notes).
Rules the parser follows:
- every `## ...` section with a `<!-- play: <codes> -->` line is a listing; one section can serve several Play codes
- under it, `### ...` headings that contain **title** (optional, defaults to `app.name`), **short**, **full** and
**what's new**, each followed by one fenced block
- limits (checked before anything is sent): title 30, short 80, full 4000, what's new 500 characters
Only claim what the app really does. No prices, no "best / #1", no other apps' names.
---
## English (en-US)
<!-- play: en-US -->
### Play short description (max 80)
```
What the app does for people, in one plain line
```
### Play full description (max 4000)
```
First paragraph: the job the app does and why it is easier with it, in two or three sentences.
FEATURES
• Lists and notes that sync across your devices
• Share a list with family or friends
• Export your data or delete your account in Settings, any time
Free to use with up to 3 lists. Example Pro unlocks unlimited lists, sharing and themes: yearly with a 1-week free trial, or monthly. Payment is charged to your store account; the subscription renews automatically unless cancelled at least 24 hours before the end of the period, and you can manage or cancel it in your account settings.
Terms of Use: https://example.com/terms
Privacy Policy: https://example.com/privacy
```
### What's new (max 500)
```
First release. Thanks for trying it!
```
## Türkçe (tr-TR)
<!-- play: tr-TR -->
### Play kısa açıklama · short (max 80)
```
Uygulamanın insanlar için ne yaptığını anlatan sade bir cümle
```
### Play tam açıklama · full (max 4000)
```
İlk paragraf: uygulamanın gördüğü iş ve onunla neden daha kolay olduğu, iki üç cümlede.
ÖZELLİKLER
• Tüm cihazlarında eşitlenen listeler ve notlar
• Bir listeyi ailen ya da arkadaşlarınla paylaş
• Verilerini dışa aktar ya da hesabını Ayarlar'dan istediğin an sil
3 listeye kadar ücretsiz. Example Pro sınırsız liste, paylaşım ve tema açar: 1 hafta ücretsiz denemeli yıllık ya da aylık. Ödeme mağaza hesabınızdan alınır; abonelik, dönem bitmeden en az 24 saat önce iptal edilmezse otomatik yenilenir; hesap ayarlarınızdan yönetebilir ya da iptal edebilirsiniz.
Kullanım Koşulları: https://example.com/terms
Gizlilik Politikası: https://example.com/privacy
```
### Yenilikler · what's new (max 500)
```
İlk sürüm. Denediğin için teşekkürler!
```

Some files were not shown because too many files have changed in this diff Show more