Perfect! This clarifies everything. You're building an AI-agent-operated screenshot generator - way more interesting than just a script. Here's the architecture:
Phase 1: CAPTURE (new - iOS Simulator automation)
- Launch simulator for the project
- Navigate through key app screens
- Capture raw screenshots
- Extract app metadata (name, primary colors, icon)
Phase 2: GENERATE (your existing compositor + enhancements)
- Submission mode: Resize to exact App Store dimensions, no frills
- Display mode: Apply device frames, gradients, trending text styles
The agent should be able to run a single command like:
ios-screenshot-gen /path/to/LMWFY --output-dir ./screenshotsThis generates:
screenshots/
├── submission/ # App Store size requirements
│ ├── 6.9inch/ # iPhone 15 Pro Max
│ │ ├── 01-main.png
│ │ └── 02-detail.png
│ └── 6.5inch/ # iPhone 11 Pro Max (secondary)
└── display/ # Marketing screenshots
├── 01-main-hero.png
├── 02-detail-gradient.png
└── config.json # What was generated
1. Simulator Controller (lib/simulator.js)
// Launch app in simulator
async function launchApp(projectPath, simulator = 'iPhone 15 Pro')
// Navigate to screen (via deep link or UI automation)
async function navigateTo(screen)
// Capture screenshot
async function captureScreen(outputPath)
// Get app info (bundle ID, display name, colors)
async function getAppMetadata(projectPath)2. App Store Size Config (lib/appstore-specs.js)
// Official App Store screenshot dimensions
const SPECS = {
'6.9inch': { width: 1320, height: 2868 }, // Required
'6.5inch': { width: 1242, height: 2688 }, // Secondary
'6.7inch': { width: 1290, height: 2796 }, // Also common
'5.5inch': { width: 1242, height: 2208 }, // Legacy support
}3. Trend Detector (lib/trending-styles.js)
- Parse current App Store top apps
- Extract common patterns: gradient directions, font weights, layouts
- Generate style presets: "minimal-2024", "gradient-bold", "dark-premium"
4. AI Prompt Parser (lib/prompt-parser.js)
// Parse natural language → config
parsePrompt("generate screenshots for LMWFY with dark theme")
// Returns: { project: 'LMWFY', displayStyle: 'dark', ... }Your existing compositor is perfect - just refactor it:
createDeviceFrame()✅ keepaddTextOverlay()✅ keepcreateBackground()✅ keep- Template processing → replace with real screenshots
Before: HTML templates → Puppeteer → compositing After: iOS Simulator → screenshots → compositing
The compositing logic stays the same, just swap the input source.
- Simulator automation - capture raw screenshots from real app
- Submission generator - resize to App Store specs (no frames)
- Simple display generator - reuse your existing compositor
- Trend detector - analyze top apps, generate style presets
- AI prompt system - natural language → screenshot configs
- Auto screen detection - figure out which screens to capture
- Web scraper - monitor App Store trends weekly
- Template library - pre-made styles users can choose
- Preview mode - show before generating
{
"core": {
"simulator": "xcrun simctl", // iOS Simulator CLI
"imageProcessing": "sharp", // Keep what you have
"automation": "appium" or "maestro" // UI navigation (optional)
},
"aiPromptParsing": {
"llm": "call Claude API", // Parse user intent
"fallback": "simple keyword matching"
},
"trendDetection": {
"scraping": "playwright", // Scrape App Store web
"analysis": "manual + AI vision" // Identify design patterns
}
}ios-screenshot-generator/
├── bin/
│ └── ios-screenshot-gen # CLI entry point
├── lib/
│ ├── simulator.js # Simulator automation
│ ├── compositor.js # Your existing logic (refactored)
│ ├── appstore-specs.js # Size requirements
│ ├── trending-styles.js # Design trend presets
│ └── prompt-parser.js # AI prompt interface
├── presets/
│ ├── minimal-2024.json
│ ├── gradient-bold.json
│ └── dark-premium.json
├── tests/
└── README.md
Agent sees this prompt: "Generate App Store screenshots for LMWFY with trending gradient style"
Agent does:
- Finds LMWFY project path
- Runs:
ios-screenshot-gen ~/projects/LMWFY --style trending-gradient - Tool outputs both submission + display screenshots
- Agent uploads to App Store Connect or shares with you
Want me to:
- Start building the simulator automation module?
- Refactor your existing compositor into the new architecture?
- Create the App Store specs config?
- Build a simple CLI wrapper first so we can test the flow?
Which part should we tackle first?