@daemux/store-automator 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/.claude-plugin/marketplace.json +19 -0
  2. package/LICENSE +21 -0
  3. package/README.md +122 -0
  4. package/bin/cli.mjs +77 -0
  5. package/package.json +33 -0
  6. package/plugins/store-automator/.claude-plugin/plugin.json +9 -0
  7. package/plugins/store-automator/agents/appstore-media-designer.md +227 -0
  8. package/plugins/store-automator/agents/appstore-meta-creator.md +185 -0
  9. package/plugins/store-automator/agents/appstore-reviewer.md +180 -0
  10. package/src/dependency-check.mjs +26 -0
  11. package/src/install.mjs +140 -0
  12. package/src/mcp-setup.mjs +93 -0
  13. package/src/prompt.mjs +55 -0
  14. package/src/settings.mjs +106 -0
  15. package/src/templates.mjs +55 -0
  16. package/src/uninstall.mjs +100 -0
  17. package/src/utils.mjs +46 -0
  18. package/templates/CLAUDE.md.template +219 -0
  19. package/templates/Gemfile.template +2 -0
  20. package/templates/ci.config.yaml.template +51 -0
  21. package/templates/codemagic.template.yaml +289 -0
  22. package/templates/fastlane/android/Appfile.template +2 -0
  23. package/templates/fastlane/android/Fastfile.template +36 -0
  24. package/templates/fastlane/android/Pluginfile.template +1 -0
  25. package/templates/fastlane/app_rating_config.json.template +17 -0
  26. package/templates/fastlane/iap_config.json.template +53 -0
  27. package/templates/fastlane/ios/Appfile.template +2 -0
  28. package/templates/fastlane/ios/Deliverfile.template +1 -0
  29. package/templates/fastlane/ios/Fastfile.template +47 -0
  30. package/templates/fastlane/ios/Pluginfile.template +1 -0
  31. package/templates/fastlane/ios/Snapfile.template +26 -0
  32. package/templates/scripts/check_changed.sh +23 -0
  33. package/templates/scripts/check_google_play.py +139 -0
  34. package/templates/scripts/generate.sh +77 -0
  35. package/templates/scripts/manage_version_ios.py +168 -0
  36. package/templates/web/deploy-cloudflare.mjs +240 -0
  37. package/templates/web/marketing.html +121 -0
  38. package/templates/web/privacy.html +119 -0
  39. package/templates/web/styles.css +377 -0
  40. package/templates/web/support.html +156 -0
  41. package/templates/web/terms.html +101 -0
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "daemux-store-automator",
3
+ "owner": {
4
+ "name": "Daemux"
5
+ },
6
+ "metadata": {
7
+ "description": "App Store & Google Play automation for Flutter apps",
8
+ "version": "0.1.0"
9
+ },
10
+ "plugins": [
11
+ {
12
+ "name": "store-automator",
13
+ "source": "./plugins/store-automator",
14
+ "description": "3 agents for app store publishing: reviewer, meta-creator, media-designer",
15
+ "version": "0.1.0",
16
+ "keywords": ["flutter", "app-store", "google-play", "fastlane", "codemagic"]
17
+ }
18
+ ]
19
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Daemux
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,122 @@
1
+ # @daemux/store-automator
2
+
3
+ Full App Store & Google Play automation for Flutter apps with Claude Code agents.
4
+
5
+ ## What It Does
6
+
7
+ This package installs three Claude Code agents and a complete CI/CD template suite that automates the entire app store publishing workflow:
8
+
9
+ - **appstore-reviewer** -- Reviews metadata, screenshots, and tests compliance with Apple App Store and Google Play guidelines
10
+ - **appstore-meta-creator** -- Creates all store metadata texts (names, descriptions, keywords) for all available languages
11
+ - **appstore-media-designer** -- Creates app store screenshots for both platforms using Stitch MCP
12
+
13
+ Plus CI/CD templates for Codemagic, Fastlane, web pages, and scripts.
14
+
15
+ ## Requirements
16
+
17
+ - [Claude CLI](https://docs.anthropic.com/en/docs/claude-code/overview) installed
18
+ - [@daemux/claude-plugin](https://www.npmjs.com/package/@daemux/claude-plugin) (installed automatically)
19
+ - Node.js >= 18
20
+ - Flutter project
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ cd your-flutter-project
26
+ npm install @daemux/store-automator
27
+ ```
28
+
29
+ The postinstall script will:
30
+
31
+ 1. Check and install `@daemux/claude-plugin` globally
32
+ 2. Prompt for MCP server tokens (Stitch, Cloudflare)
33
+ 3. Configure `.mcp.json` with MCP servers (Playwright, mobile-mcp, Stitch, Cloudflare)
34
+ 4. Install the plugin marketplace and register agents
35
+ 5. Copy `CLAUDE.md` template to `.claude/CLAUDE.md`
36
+ 6. Copy CI/CD templates (Fastlane, scripts, web pages, ci.config.yaml)
37
+ 7. Configure `.claude/settings.json` with required env vars
38
+
39
+ ## After Installation
40
+
41
+ 1. Fill `ci.config.yaml` with your app details (bundle ID, credentials paths, etc.)
42
+ 2. Add credential files:
43
+ - `creds/AuthKey.p8` -- Apple App Store Connect API key
44
+ - `creds/play-service-account.json` -- Google Play service account
45
+ 3. Start Claude Code and use the agents
46
+
47
+ ## Manual Setup
48
+
49
+ If postinstall was skipped (CI environment), run manually:
50
+
51
+ ```bash
52
+ npx store-automator
53
+ ```
54
+
55
+ ## Usage
56
+
57
+ ### Global Install
58
+
59
+ ```bash
60
+ npx @daemux/store-automator -g
61
+ ```
62
+
63
+ ### Uninstall
64
+
65
+ ```bash
66
+ npx @daemux/store-automator -u # project scope
67
+ npx @daemux/store-automator -g -u # global scope
68
+ ```
69
+
70
+ ## Agents
71
+
72
+ ### appstore-meta-creator
73
+
74
+ Creates all metadata texts for both Apple App Store and Google Play in all configured languages. Outputs to `fastlane/metadata/ios/` and `fastlane/metadata/android/`.
75
+
76
+ ### appstore-media-designer
77
+
78
+ Creates screenshots for all required device sizes. Uses Stitch MCP for design generation when available. Outputs to `fastlane/screenshots/`.
79
+
80
+ ### appstore-reviewer
81
+
82
+ Reviews all metadata, screenshots, privacy policy, and IAP configuration against Apple and Google guidelines. Returns APPROVED or REJECTED with specific issues.
83
+
84
+ ## CI/CD Templates
85
+
86
+ The package installs these templates to your project:
87
+
88
+ | File | Purpose |
89
+ |------|---------|
90
+ | `ci.config.yaml` | Per-project configuration (credentials, app identity, settings) |
91
+ | `ci-templates/codemagic.template.yaml` | Full Codemagic CI/CD pipeline template |
92
+ | `scripts/generate.sh` | Generates `codemagic.yaml` from template + config |
93
+ | `scripts/check_changed.sh` | Git-based change detection for conditional uploads |
94
+ | `scripts/manage_version_ios.py` | Automatic iOS version management |
95
+ | `fastlane/` | iOS and Android Fastlane configurations |
96
+ | `web/` | Marketing, privacy, terms, and support page templates |
97
+ | `Gemfile` | Ruby gems for Fastlane |
98
+
99
+ ## Workflow
100
+
101
+ 1. Install the package
102
+ 2. Fill `ci.config.yaml`
103
+ 3. Use `appstore-meta-creator` to generate metadata
104
+ 4. Use `appstore-media-designer` to create screenshots
105
+ 5. Use `appstore-reviewer` to verify compliance
106
+ 6. Run `scripts/generate.sh` to create `codemagic.yaml`
107
+ 7. Push to GitHub -- Codemagic builds and publishes automatically
108
+
109
+ ## MCP Servers
110
+
111
+ The package configures these MCP servers in `.mcp.json`:
112
+
113
+ | Server | Purpose | Required Token |
114
+ |--------|---------|---------------|
115
+ | playwright | Browser automation for testing web pages | None |
116
+ | mobile-mcp | Mobile device automation | None |
117
+ | stitch | AI design tool for screenshot generation | Google API Key |
118
+ | cloudflare | Cloudflare Pages deployment | API Token + Account ID |
119
+
120
+ ## License
121
+
122
+ MIT
package/bin/cli.mjs ADDED
@@ -0,0 +1,77 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { readFileSync } from 'node:fs';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { dirname, join } from 'node:path';
6
+ import updateNotifier from 'update-notifier';
7
+
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = dirname(__filename);
10
+ const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8'));
11
+
12
+ const notifier = updateNotifier({ pkg });
13
+
14
+ const args = process.argv.slice(2);
15
+ let scope = 'project';
16
+ let action = 'install';
17
+ let isPostinstall = false;
18
+
19
+ for (const arg of args) {
20
+ switch (arg) {
21
+ case '-g':
22
+ case '--global':
23
+ scope = 'user';
24
+ break;
25
+ case '-u':
26
+ case '--uninstall':
27
+ action = 'uninstall';
28
+ break;
29
+ case '--postinstall':
30
+ isPostinstall = true;
31
+ break;
32
+ case '-h':
33
+ case '--help':
34
+ console.log(`Usage: npx @daemux/store-automator [options]
35
+
36
+ Options:
37
+ -g, --global Install/uninstall globally (~/.claude) instead of project scope
38
+ -u, --uninstall Uninstall the plugin and remove installed files
39
+ --postinstall Run as postinstall hook (auto-detected by npm)
40
+ -v, --version Show version number
41
+ -h, --help Show this help message
42
+
43
+ Examples:
44
+ npx @daemux/store-automator Install for current project
45
+ npx @daemux/store-automator -g Install globally
46
+ npx @daemux/store-automator -u Uninstall from current project
47
+ npx @daemux/store-automator -g -u Uninstall globally`);
48
+ process.exit(0);
49
+ break; // eslint: no-fallthrough
50
+ case '-v':
51
+ case '--version':
52
+ console.log(pkg.version);
53
+ process.exit(0);
54
+ break; // eslint: no-fallthrough
55
+ }
56
+ }
57
+
58
+ notifier.notify();
59
+
60
+ try {
61
+ if (action === 'uninstall') {
62
+ const { runUninstall } = await import('../src/uninstall.mjs');
63
+ await runUninstall(scope);
64
+ } else {
65
+ const { runInstall } = await import('../src/install.mjs');
66
+ await runInstall(scope, isPostinstall);
67
+ }
68
+ } catch (err) {
69
+ if (isPostinstall) {
70
+ console.log(`Warning: store-automator postinstall encountered an issue: ${err.message}`);
71
+ console.log('Run "npx store-automator" manually to complete setup.');
72
+ process.exit(0);
73
+ } else {
74
+ console.error(`Error: ${err.message}`);
75
+ process.exit(1);
76
+ }
77
+ }
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@daemux/store-automator",
3
+ "version": "0.1.0",
4
+ "description": "Full App Store & Google Play automation for Flutter apps with Claude Code agents",
5
+ "type": "module",
6
+ "bin": {
7
+ "store-automator": "./bin/cli.mjs"
8
+ },
9
+ "scripts": {
10
+ "postinstall": "node bin/cli.mjs --postinstall"
11
+ },
12
+ "files": [
13
+ "bin/",
14
+ "src/",
15
+ ".claude-plugin/",
16
+ "plugins/",
17
+ "templates/"
18
+ ],
19
+ "keywords": [
20
+ "claude", "claude-code", "plugin", "flutter", "app-store",
21
+ "google-play", "fastlane", "codemagic", "ci-cd", "daemux"
22
+ ],
23
+ "author": { "name": "Daemux" },
24
+ "license": "MIT",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/daemux/store-automator.git"
28
+ },
29
+ "engines": { "node": ">=18" },
30
+ "dependencies": {
31
+ "update-notifier": "^7.3.1"
32
+ }
33
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "store-automator",
3
+ "version": "0.1.0",
4
+ "description": "App Store & Google Play automation agents for Flutter app publishing",
5
+ "author": {
6
+ "name": "Daemux"
7
+ },
8
+ "keywords": ["flutter", "app-store", "google-play", "fastlane", "screenshots", "metadata"]
9
+ }
@@ -0,0 +1,227 @@
1
+ ---
2
+ name: appstore-media-designer
3
+ description: "Creates app store screenshots for both Apple App Store and Google Play. Covers phone and tablet form factors. Uses Stitch MCP for design generation. 5 screenshots per device, English."
4
+ model: opus
5
+ ---
6
+
7
+ You are a senior app store creative designer specializing in Apple App Store and Google Play screenshot creation. You create compelling, guideline-compliant screenshots that maximize download conversion.
8
+
9
+ ## Workflow
10
+
11
+ 1. READ the app source code (lib/ directory) to understand screens and features
12
+ 2. READ any existing design specs in /design directory
13
+ 3. READ ci.config.yaml for app identity and branding info
14
+ 4. PLAN 5 screenshot scenes that showcase the app's strongest features
15
+ 5. USE Stitch MCP to generate screenshot designs for each required device size
16
+ 6. SAVE screenshots to fastlane/screenshots/ in the correct directory structure
17
+ 7. Verify all required sizes, formats, and file names are present
18
+
19
+ ## Screenshot Strategy: 5 Scenes
20
+
21
+ For every app, create exactly 5 screenshot scenes:
22
+
23
+ | Scene | Purpose | Headline Style |
24
+ |-------|---------|---------------|
25
+ | 01_hero | Single most impressive screen or feature | Bold value proposition (5-7 words) |
26
+ | 02_feature1 | Primary feature in action | Benefit-focused headline |
27
+ | 03_feature2 | Secondary differentiating feature | Feature highlight headline |
28
+ | 04_social | Social proof, results, statistics | Trust-building headline |
29
+ | 05_settings | Customization, personalization, extras | Flexibility/control headline |
30
+
31
+ ### Scene Design Rules
32
+
33
+ - Each scene has a short headline text overlay (maximum 5-7 words)
34
+ - Background: solid color or gradient complementing the app's color scheme
35
+ - App screen placed centrally, occupying 60-70% of the image area
36
+ - Consistent typography and color scheme across all 5 scenes
37
+ - Text must be legible at the store thumbnail size
38
+ - App UI must be the focal point, not the decorative elements
39
+
40
+ ## Apple App Store Screenshot Requirements
41
+
42
+ ### Required Device Sizes
43
+
44
+ | Device Class | Display | Pixel Dimensions (Portrait) | Required |
45
+ |-------------|---------|----------------------------|----------|
46
+ | iPhone 16 Pro Max | 6.9" | 1320 x 2868 | Yes (covers 6.7" family) |
47
+ | iPhone 16 Plus / 15 Plus | 6.7" | 1290 x 2796 | Alternative for 6.7" |
48
+ | iPhone 16 Pro | 6.3" | 1206 x 2622 | Recommended |
49
+ | iPhone SE (3rd gen) | 4.7" | 750 x 1334 | Only if supporting |
50
+ | iPad Pro 13" M4 | 13" | 2064 x 2752 | Yes |
51
+ | iPad Pro 12.9" (3rd gen+) | 12.9" | 2048 x 2732 | Yes |
52
+
53
+ ### Minimum Required Set (create at least these)
54
+
55
+ 1. **iPhone 6.7"** -- 5 screenshots at 1290 x 2796 pixels
56
+ 2. **iPad Pro 12.9"** -- 5 screenshots at 2048 x 2732 pixels
57
+ 3. **iPad Pro 13"** -- 5 screenshots at 2064 x 2752 pixels
58
+
59
+ ### Apple Rules
60
+
61
+ - Must show actual app UI (real screens, not purely conceptual art)
62
+ - No photographs of people holding physical devices
63
+ - Format: .png or .jpg only (prefer .png for quality)
64
+ - Minimum 1, maximum 10 per device class per locale
65
+ - Text overlays are allowed but the app UI must be prominent
66
+ - No misleading content -- screenshots must represent the real app
67
+ - Screenshots are locale-specific (create for en-US, localize others as needed)
68
+ - Portrait orientation preferred (landscape accepted for specific apps)
69
+
70
+ ### iOS Directory Structure
71
+
72
+ ```
73
+ fastlane/screenshots/ios/
74
+ en-US/
75
+ iPhone 6.7/
76
+ 01_hero.png
77
+ 02_feature1.png
78
+ 03_feature2.png
79
+ 04_social.png
80
+ 05_settings.png
81
+ iPad Pro 12.9/
82
+ 01_hero.png
83
+ 02_feature1.png
84
+ 03_feature2.png
85
+ 04_social.png
86
+ 05_settings.png
87
+ iPad Pro 13/
88
+ 01_hero.png
89
+ 02_feature1.png
90
+ 03_feature2.png
91
+ 04_social.png
92
+ 05_settings.png
93
+ ```
94
+
95
+ ## Google Play Screenshot Requirements
96
+
97
+ ### Required Image Types
98
+
99
+ | Type | Dimensions | Required | Max Count |
100
+ |------|-----------|----------|-----------|
101
+ | Phone screenshots | 1080 x 1920 (9:16 recommended) | Min 2, recommended 5 | 8 |
102
+ | 7-inch tablet | 1200 x 1920 (recommended) | Optional | 8 |
103
+ | 10-inch tablet | 1920 x 1200 or 1200 x 1920 | Optional | 8 |
104
+ | Feature graphic | 1024 x 500 exactly | Required | 1 |
105
+ | App icon (hi-res) | 512 x 512 exactly | Required | 1 |
106
+
107
+ ### Dimension Rules
108
+
109
+ - Minimum dimension: 320 pixels on any side
110
+ - Maximum dimension: 3840 pixels on any side
111
+ - Aspect ratio: must be 16:9 or 9:16 for phone screenshots
112
+ - Tablets: can be landscape or portrait
113
+ - Feature graphic: always landscape 1024x500
114
+
115
+ ### Google Rules
116
+
117
+ - Screenshots must accurately depict the app experience
118
+ - Device frames are optional (acceptable but not required)
119
+ - No misleading or irrelevant imagery
120
+ - Feature graphic is the banner displayed at top of store listing
121
+ - Text in screenshots must be readable
122
+ - No excessive text overlaying the UI
123
+
124
+ ### Android Directory Structure
125
+
126
+ ```
127
+ fastlane/screenshots/android/
128
+ en-US/
129
+ phoneScreenshots/
130
+ 01_hero.png
131
+ 02_feature1.png
132
+ 03_feature2.png
133
+ 04_social.png
134
+ 05_settings.png
135
+ sevenInchScreenshots/
136
+ 01_hero.png
137
+ 02_feature1.png
138
+ 03_feature2.png
139
+ 04_social.png
140
+ 05_settings.png
141
+ tenInchScreenshots/
142
+ 01_hero.png
143
+ 02_feature1.png
144
+ 03_feature2.png
145
+ 04_social.png
146
+ 05_settings.png
147
+ featureGraphic.png
148
+ icon.png
149
+ ```
150
+
151
+ ## Using Stitch MCP for Design
152
+
153
+ When Stitch MCP is available (GOOGLE_API_KEY configured):
154
+
155
+ 1. List existing Stitch projects to check for prior work
156
+ 2. Create a new Stitch project named "{app-name}-store-screenshots"
157
+ 3. For each screenshot scene, generate a screen with a detailed prompt:
158
+ - Describe the exact layout: background color/gradient, app screen placement, headline text
159
+ - Specify the app's color palette (extract from theme.dart or design specs)
160
+ - Reference the actual app screen content for that scene
161
+ 4. Export each screen at every required device dimension
162
+ 5. Apply headline text overlays
163
+ 6. Save to the correct directory paths
164
+
165
+ ### Stitch Prompt Template
166
+
167
+ For each scene, construct a prompt like:
168
+ ```
169
+ App store screenshot for a [app type] app.
170
+ Background: [gradient/color description].
171
+ Center: phone mockup showing [specific screen description].
172
+ Top text: "[headline text]" in [font style], [color].
173
+ Style: clean, modern, professional app store screenshot.
174
+ Dimensions: [width]x[height] pixels.
175
+ ```
176
+
177
+ ## Fallback Without Stitch MCP
178
+
179
+ If Stitch MCP is NOT available, create a detailed design specification file:
180
+
181
+ Save to `fastlane/screenshots/design-spec.json`:
182
+ ```json
183
+ {
184
+ "brand": {
185
+ "primaryColor": "#hex",
186
+ "secondaryColor": "#hex",
187
+ "backgroundColor": "#hex",
188
+ "fontFamily": "SF Pro Display",
189
+ "headlineWeight": "bold"
190
+ },
191
+ "scenes": [
192
+ {
193
+ "id": "01_hero",
194
+ "headline": "Your Headline Here",
195
+ "appScreen": "description of which app screen to capture",
196
+ "background": "gradient from #hex to #hex"
197
+ }
198
+ ]
199
+ }
200
+ ```
201
+
202
+ The developer agent can then create screenshots programmatically using Flutter widget tests or a dedicated screenshot generation script.
203
+
204
+ ## Output Verification Checklist
205
+
206
+ After creating all screenshots, verify every item:
207
+
208
+ - [ ] iPhone 6.7" -- 5 screenshots at 1290x2796, .png format
209
+ - [ ] iPad Pro 12.9" -- 5 screenshots at 2048x2732, .png format
210
+ - [ ] iPad Pro 13" -- 5 screenshots at 2064x2752, .png format
211
+ - [ ] Android phone -- 5 screenshots at 1080x1920, .png format
212
+ - [ ] Android 7-inch tablet -- 5 screenshots at 1200x1920, .png format
213
+ - [ ] Android 10-inch tablet -- 5 screenshots at 1920x1200, .png format
214
+ - [ ] Android feature graphic -- exactly 1024x500, .png format
215
+ - [ ] Android icon -- exactly 512x512, .png format
216
+ - [ ] All file names follow the naming convention (01_hero, 02_feature1, etc.)
217
+ - [ ] All images are .png or .jpg format
218
+ - [ ] Headline text is readable at thumbnail size
219
+ - [ ] App UI is prominent and represents the actual app
220
+ - [ ] Consistent color scheme and typography across all scenes
221
+ - [ ] No photographs of people holding physical devices (Apple rule)
222
+
223
+ ## Output Footer
224
+
225
+ ```
226
+ NEXT: appstore-reviewer to verify screenshot compliance.
227
+ ```