appshot-cli 0.3.0 β†’ 0.4.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.
package/README.md CHANGED
@@ -1,1013 +1,1557 @@
1
1
  # Appshot πŸ“Έ
2
2
 
3
- > πŸŽ‰ **Now available on NPM!** Install with `npm install -g appshot-cli`
4
-
5
- Generate beautiful, App Store-ready screenshots with device frames, gradients, and captions.
3
+ > **AI-First CLI for App Store Screenshots** - Generate beautiful, localized screenshots with device frames, gradients, and captions.
6
4
 
7
5
  [![CI](https://github.com/chrisvanbuskirk/appshot/actions/workflows/ci.yml/badge.svg)](https://github.com/chrisvanbuskirk/appshot/actions/workflows/ci.yml)
8
6
  [![npm version](https://badge.fury.io/js/appshot-cli.svg)](https://www.npmjs.com/package/appshot-cli)
9
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
8
 
11
- ## Features
9
+ πŸ†• **Version 0.4.0** - Language-aware output directories, comprehensive font system, and system locale detection!
10
+
11
+ > ⚠️ **BREAKING CHANGE in v0.4.0**: Output structure now always uses language subdirectories.
12
+ > Single language builds now output to `final/device/lang/` instead of `final/device/`.
13
+ > Run `appshot migrate --output-structure` to update existing projects.
14
+
15
+ ## πŸ“– Table of Contents
16
+
17
+ - [Why Appshot?](#-why-appshot)
18
+ - [Features](#-features)
19
+ - [Quick Start](#-quick-start)
20
+ - [Prerequisites](#prerequisites)
21
+ - [Installation](#installation)
22
+ - [Your First Screenshot](#your-first-screenshot)
23
+ - [Core Concepts](#-core-concepts)
24
+ - [Visual Customization](#-visual-customization)
25
+ - [Gradient System](#gradient-system)
26
+ - [Font System](#font-system)
27
+ - [Device Frames](#device-frames)
28
+ - [Caption System](#caption-system)
29
+ - [Localization & Translation](#-localization--translation)
30
+ - [Device Support](#-device-support)
31
+ - [Command Reference](#-command-reference)
32
+ - [Configuration Reference](#️-configuration-reference)
33
+ - [Agent & Automation Guide](#-agent--automation-guide)
34
+ - [Recipes & Examples](#-recipes--examples)
35
+ - [Troubleshooting](#-troubleshooting)
36
+ - [Development](#-development)
37
+ - [Roadmap](#-roadmap)
38
+ - [License & Support](#-license--support)
39
+
40
+ ## 🌟 Why Appshot?
41
+
42
+ Appshot is the only **agent-first CLI tool** designed for automated App Store screenshot generation. Built for LLM agents, CI/CD pipelines, and developers who value automation over GUIs.
43
+
44
+ ### Key Differentiators
45
+
46
+ - πŸ€– **Agent-First Design** - JSON outputs, predictable commands, no interactive prompts in automation mode
47
+ - 🎯 **Smart Automation** - Auto-detects orientation, selects appropriate frames, handles batch operations
48
+ - 🌍 **AI-Powered Localization** - Translate captions in real-time using GPT-4o, GPT-5, o1, and o3 models
49
+ - πŸ“ **App Store Compliant** - Built-in validation for all official Apple App Store specifications
50
+ - ⚑ **Fast & Parallel** - Process hundreds of screenshots with configurable concurrency
51
+ - πŸ› οΈ **Pure CLI** - No web UI, no GUI, just predictable commands perfect for automation
52
+
53
+ ## ✨ Features
12
54
 
13
55
  - πŸ–ΌοΈ **Smart Frames** - Automatically detects portrait/landscape and selects appropriate device frame
14
- - 🎨 **Gradients** - Beautiful gradient backgrounds with customizable colors
15
- - ✏️ **Captions** - Add marketing text with full typography control (above or overlay)
16
- - 🌍 **Localization** - Multi-language support with AI-powered translations for international app stores
17
- - πŸ“± **Multi-Device** - Support for iPhone, iPad, Mac, Apple TV, Vision Pro, and Apple Watch
18
- - πŸ“ **App Store Specs** - Built-in support for all official App Store screenshot resolutions
19
- - βœ… **Validation** - Verify screenshots meet App Store requirements
20
- - πŸ”„ **Orientation Detection** - Intelligently handles both portrait and landscape screenshots
21
- - ⚑ **Fast** - Parallel processing with configurable concurrency
22
- - πŸ€– **AI Translation** - Real-time and batch translation using OpenAI models (GPT-4o, GPT-5, o1, o3)
23
- - πŸ› οΈ **CLI** - Simple command-line interface designed for agents and automation
24
-
25
- ## Quick Start
56
+ - 🎨 **Gradient Presets** - 24+ beautiful gradients with visual preview and easy application
57
+ - πŸ”€ **Font System** - 50+ font mappings, direct font setting, interactive selection, and system detection
58
+ - ✏️ **Dynamic Captions** - Smart text wrapping, auto-sizing, and multi-line support
59
+ - 🌍 **AI Translation** - Real-time and batch translation using OpenAI's latest models
60
+ - πŸ“± **Multi-Device** - iPhone, iPad, Mac, Apple TV, Vision Pro, and Apple Watch support
61
+ - πŸ“ **App Store Specs** - All official resolutions with validation and presets
62
+ - πŸ”„ **Orientation Detection** - Intelligently handles both portrait and landscape
63
+ - ⚑ **Parallel Processing** - Configurable concurrency for large batches
64
+ - πŸ” **Caption Autocomplete** - Intelligent suggestions with fuzzy search and learning
65
+
66
+ ## πŸš€ Quick Start
67
+
68
+ ### Prerequisites
69
+
70
+ - **Node.js 16+** - Required for ESM modules
71
+ - **npm** or **yarn** - Package manager
72
+ - **Operating System** - macOS, Linux, or Windows
73
+ - **Optional**: OpenAI API key for translation features
26
74
 
27
75
  ### Installation
28
76
 
29
77
  ```bash
78
+ # Install globally via npm
30
79
  npm install -g appshot-cli
80
+
81
+ # Or with yarn
82
+ yarn global add appshot-cli
83
+
84
+ # Verify installation
85
+ appshot --version
31
86
  ```
32
87
 
33
- > **Note**: The package is called `appshot-cli` on NPM, but the command is still `appshot`
88
+ > **Note**: The package is called `appshot-cli` on NPM, but the command is `appshot`
34
89
 
35
- ### Initialize a new project
90
+ ### Your First Screenshot
91
+
92
+ Create App Store-ready screenshots in 5 simple steps:
36
93
 
37
94
  ```bash
95
+ # 1. Initialize your project
38
96
  appshot init
39
- ```
40
97
 
41
- This creates:
42
- - `.appshot/config.json` - Main configuration file
43
- - `.appshot/captions/` - Device-specific caption files
44
- - `screenshots/` - Directory structure for your screenshots
98
+ # 2. Add your screenshots
99
+ cp ~/Desktop/screenshots/*.png screenshots/iphone/
45
100
 
46
- ### Add your screenshots
101
+ # 3. Add captions interactively
102
+ appshot caption --device iphone
47
103
 
48
- Place your app screenshots in the appropriate device folders:
49
- ```
50
- screenshots/
51
- β”œβ”€β”€ iphone/
52
- β”œβ”€β”€ ipad/
53
- β”œβ”€β”€ mac/
54
- └── watch/
55
- ```
104
+ # 4. Apply a gradient preset
105
+ appshot gradients --apply ocean
106
+
107
+ # 5. Build final screenshots
108
+ appshot build
56
109
 
57
- ### Add captions
110
+ # ✨ Output ready in final/ directory!
111
+ ```
58
112
 
59
- Use the interactive caption editor with autocomplete:
113
+ ### Example Output Structure
60
114
 
61
- ```bash
62
- appshot caption --device iphone
115
+ ```
116
+ final/
117
+ β”œβ”€β”€ iphone/
118
+ β”‚ └── en/ # Language subdirectory (always created)
119
+ β”‚ β”œβ”€β”€ home.png # 1284Γ—2778 with frame, gradient, and caption
120
+ β”‚ β”œβ”€β”€ features.png
121
+ β”‚ └── settings.png
122
+ └── ipad/
123
+ └── en/ # Language subdirectory
124
+ └── dashboard.png # 2048Γ—2732 iPad Pro screenshot
63
125
  ```
64
126
 
65
- Features:
66
- - πŸ” **Autocomplete** - Smart suggestions as you type
67
- - πŸ“Š **Frequency tracking** - Most-used captions appear first
68
- - 🎯 **Device-specific** - Suggestions tailored to device type
69
- - ⌨️ **Keyboard shortcuts** - Tab to complete, arrows to navigate
127
+ ## πŸ“˜ Core Concepts
70
128
 
71
- ### Build final screenshots
129
+ ### Project Structure
72
130
 
73
- Generate your App Store-ready screenshots:
131
+ Appshot uses a simple, predictable directory structure:
74
132
 
75
- ```bash
76
- appshot build
133
+ ```
134
+ your-project/
135
+ β”œβ”€β”€ .appshot/
136
+ β”‚ β”œβ”€β”€ config.json # Main configuration
137
+ β”‚ β”œβ”€β”€ captions/ # Device-specific captions
138
+ β”‚ β”‚ β”œβ”€β”€ iphone.json
139
+ β”‚ β”‚ └── ipad.json
140
+ β”‚ └── caption-history.json # Autocomplete history
141
+ β”œβ”€β”€ screenshots/ # Original screenshots
142
+ β”‚ β”œβ”€β”€ iphone/
143
+ β”‚ β”œβ”€β”€ ipad/
144
+ β”‚ └── mac/
145
+ β”œβ”€β”€ frames/ # Device frames (auto-downloaded)
146
+ └── final/ # Generated output
77
147
  ```
78
148
 
79
- Output appears in the `final/` directory, ready for upload!
80
-
81
- ## Configuration
149
+ ### Configuration Overview
82
150
 
83
- Edit `.appshot/config.json` to customize your screenshots:
151
+ All settings are stored in `.appshot/config.json`:
84
152
 
85
153
  ```json
86
154
  {
87
155
  "output": "./final",
88
- "frames": "./frames",
89
156
  "gradient": {
90
- "colors": ["#FF5733", "#FFC300"],
91
- "direction": "top-bottom"
157
+ "colors": ["#0077BE", "#33CCCC"],
158
+ "direction": "diagonal"
92
159
  },
93
160
  "caption": {
94
161
  "font": "SF Pro",
95
162
  "fontsize": 64,
96
163
  "color": "#FFFFFF",
97
- "align": "center",
98
- "paddingTop": 100
164
+ "position": "above"
99
165
  },
100
166
  "devices": {
101
167
  "iphone": {
102
- "input": "./screenshots/iphone",
103
168
  "resolution": "1284x2778",
104
- "autoFrame": true,
105
- "preferredFrame": "iphone-15-pro-max"
169
+ "autoFrame": true
106
170
  }
107
171
  }
108
172
  }
109
173
  ```
110
174
 
111
- ### Gradient Options
175
+ ### Workflow
176
+
177
+ 1. **Capture** - Take screenshots from simulator/device or design tool
178
+ 2. **Configure** - Set up gradients, fonts, and device settings
179
+ 3. **Caption** - Add marketing text with optional AI translation
180
+ 4. **Build** - Generate final App Store-ready screenshots
181
+ 5. **Validate** - Ensure compliance with App Store requirements
112
182
 
113
- - **colors**: Array of hex color codes
114
- - **direction**: `top-bottom`, `bottom-top`, `left-right`, `right-left`, `diagonal`
183
+ ## 🎨 Visual Customization
115
184
 
116
- #### Using Gradient Presets
185
+ ### Gradient System
117
186
 
118
- Instead of manually configuring gradients, you can use one of the 24+ built-in presets:
187
+ Appshot includes 24+ professional gradient presets organized by category:
188
+
189
+ #### Browse & Apply Gradients
119
190
 
120
191
  ```bash
121
- # Browse available gradients
192
+ # View all gradients with color preview
122
193
  appshot gradients
123
194
 
124
- # Apply a preset
195
+ # Apply a gradient to your project
125
196
  appshot gradients --apply sunset
126
197
 
127
- # Interactive selection with visual preview
198
+ # Interactive selection
128
199
  appshot gradients select
129
200
 
130
201
  # Generate preview image
131
202
  appshot gradients --preview ocean
132
203
 
133
- # Create samples of all gradients
204
+ # Create sample gallery
134
205
  appshot gradients --sample
135
206
  ```
136
207
 
137
- ##### Available Presets by Category
138
-
139
- **Warm Gradients** πŸ”₯
140
- - **sunset** - Warm orange to pink (#FF5733 β†’ #FFC300)
141
- - **autumn** - Fall foliage colors (#D2691E β†’ #FF4500)
142
- - **golden** - Rich golden tones (#FFD700 β†’ #FFA500)
143
- - **coral** - Soft coral reef (#FF6B6B β†’ #FFE66D)
144
-
145
- **Cool Gradients** ❄️
146
- - **ocean** - Deep blue waves (#0077BE β†’ #33CCCC)
147
- - **arctic** - Icy blue frost (#E0F7FA β†’ #81D4FA)
148
- - **mint** - Fresh mint green (#00C9A7 β†’ #00F5FF)
149
- - **twilight** - Evening sky (#667EEA β†’ #764BA2)
150
-
151
- **Vibrant Gradients** 🎨
152
- - **neon** - Electric glow (#FF006E β†’ #8338EC β†’ #3A86FF)
153
- - **tropical** - Paradise colors (#FE6B8B β†’ #FF8E53)
154
- - **rainbow** - Full spectrum (#FF0000 β†’ #FF7F00 β†’ #FFFF00 β†’ #00FF00 β†’ #0000FF β†’ #8B00FF)
155
- - **vivid** - Bold and bright (#F72585 β†’ #7209B7 β†’ #3A0CA3)
156
-
157
- **Subtle Gradients** πŸ•ŠοΈ
158
- - **pastel** - Soft blend (#E8D8F5 β†’ #D6E6FF)
159
- - **lavender** - Gentle purple (#E6E6FA β†’ #DDA0DD)
160
- - **peach** - Soft peach tones (#FFDAB9 β†’ #FFE4E1)
161
- - **sky** - Clear day (#87CEEB β†’ #E0F6FF)
162
-
163
- **Monochrome Gradients** ⚫βšͺ
164
- - **noir** - Deep black (#000000 β†’ #434343)
165
- - **silver** - Metallic shine (#C0C0C0 β†’ #F5F5F5)
166
- - **charcoal** - Dark grey (#36454F β†’ #708090)
167
- - **pearl** - Soft white (#F8F8FF β†’ #FFFFFF)
168
-
169
- **Brand-Inspired Gradients** 🏒
170
- - **instagram** - Brand colors (#833AB4 β†’ #FD1D1D β†’ #FCB045)
171
- - **spotify** - Green energy (#1DB954 β†’ #191414)
172
- - **twitter** - Blue bird (#1DA1F2 β†’ #14171A)
173
- - **slack** - Workspace hues (#4A154B β†’ #36C5F0 β†’ #2EB67D)
174
-
175
- ### Caption Options
176
-
177
- - **font**: Font family name
178
- - **fontsize**: Size in pixels
179
- - **color**: Hex color code
180
- - **align**: `left`, `center`, `right`
181
- - **paddingTop**: Space from top in pixels
182
- - **paddingBottom**: Space from bottom in pixels
183
- - **position**: `above` (above device frame) or `overlay` (on gradient)
184
- - **box**: Caption box configuration (see Dynamic Caption Box section)
185
-
186
- ### Device Options
187
-
188
- - **input**: Directory containing screenshots
189
- - **resolution**: Output resolution (use App Store specs or custom)
190
- - **autoFrame**: Enable automatic frame selection based on screenshot orientation (default: true)
191
- - **preferredFrame**: Preferred frame name from the registry (optional)
192
- - **partialFrame**: Cut off bottom portion of frame for dynamic look (default: false)
193
- - **frameOffset**: Percentage to cut off when partialFrame is true (default: 25)
194
-
195
- ## Commands
196
-
197
- ### `appshot init`
198
- Initialize a new appshot project with scaffolding.
208
+ #### Gradient Categories
199
209
 
200
- Options:
201
- - `--force` - Overwrite existing files
210
+ - **πŸ”₯ Warm**: sunset, autumn, golden, coral
211
+ - **❄️ Cool**: ocean, arctic, mint, twilight
212
+ - **🎨 Vibrant**: neon, tropical, rainbow, vivid
213
+ - **πŸ•ŠοΈ Subtle**: pastel, lavender, peach, sky
214
+ - **⚫βšͺ Monochrome**: noir, silver, charcoal, pearl
215
+ - **🏒 Brand**: instagram, spotify, twitter, slack
202
216
 
203
- ### `appshot caption`
204
- Interactively add or edit captions for screenshots with intelligent autocomplete and AI-powered translation.
217
+ #### Custom Gradients
205
218
 
206
- Features:
207
- - **Autocomplete suggestions** - Shows previous captions as you type
208
- - **Fuzzy search** - Finds captions even with typos
209
- - **Usage tracking** - Frequently used captions appear first
210
- - **Learning system** - Improves suggestions over time
211
- - **Device-specific** - Prioritizes captions used for the same device
212
- - **Real-time translation** - Instantly translate captions as you type (requires OpenAI API key)
219
+ ```json
220
+ {
221
+ "gradient": {
222
+ "colors": ["#FF5733", "#FFC300", "#FF1493"],
223
+ "direction": "diagonal" // top-bottom, left-right, diagonal
224
+ }
225
+ }
226
+ ```
213
227
 
214
- Options:
215
- - `--device <name>` - Device name (required)
216
- - `--lang <code>` - Primary language code (default: en)
217
- - `--translate` - Enable AI-powered real-time translation
218
- - `--langs <codes>` - Target languages for translation (comma-separated)
219
- - `--model <name>` - OpenAI model to use (default: gpt-4o-mini)
228
+ ### Font System
220
229
 
221
- Example with translation:
222
- ```bash
223
- # Add captions with instant translation to Spanish and French
224
- appshot caption --device iphone --translate --langs es,fr
230
+ Version 0.4.0 introduces comprehensive font management with intelligent fallbacks.
225
231
 
226
- # Use a specific model for translation
227
- appshot caption --device iphone --translate --langs zh-CN,ja --model gpt-5
228
- ```
232
+ #### Font Commands
229
233
 
230
- Keyboard shortcuts:
231
- - **Tab** - Autocomplete the top suggestion
232
- - **↑↓** - Navigate through suggestions
233
- - **Enter** - Select current suggestion
234
- - **Esc** - Dismiss suggestions
234
+ ```bash
235
+ # Browse recommended fonts
236
+ appshot fonts
235
237
 
236
- ### `appshot gradients`
237
- Browse, preview, and apply gradient presets for stunning backgrounds.
238
-
239
- Options:
240
- - `--list` - List all available gradient presets (default)
241
- - `--category <name>` - Filter by category (warm, cool, vibrant, subtle, monochrome, brand)
242
- - `--preview <id>` - Generate preview image for a specific gradient
243
- - `--sample` - Generate sample images for all gradients with HTML preview
244
- - `--apply <id>` - Apply gradient preset to current project
245
-
246
- Subcommands:
247
- - `select` - Interactive gradient selection with visual preview
248
-
249
- Features:
250
- - **24+ Beautiful Presets** - Curated collection of professional gradients
251
- - **6 Categories** - Warm, Cool, Vibrant, Subtle, Monochrome, Brand-inspired
252
- - **Visual Preview** - See color blocks in terminal with ANSI approximation
253
- - **Sample Generation** - Create PNG samples of all gradients
254
- - **HTML Preview Page** - Browse all gradients in your browser
255
- - **Quick Apply** - Instantly update project configuration
256
- - **Direction Support** - All gradient directions (top-bottom, diagonal, etc.)
257
-
258
- Example usage:
259
- ```bash
260
- # Browse all gradients with color previews
261
- appshot gradients
238
+ # Set font directly (NEW in v0.4.0)
239
+ appshot fonts --set "Montserrat"
262
240
 
263
- # Filter by category
264
- appshot gradients --category warm
241
+ # Interactive font selection (NEW in v0.4.0)
242
+ appshot fonts --select
265
243
 
266
- # Preview a specific gradient (creates gradient-sunset.png)
267
- appshot gradients --preview sunset
244
+ # Set device-specific font (NEW in v0.4.0)
245
+ appshot fonts --set "SF Pro" --device iphone
268
246
 
269
- # Apply a gradient to your project
270
- appshot gradients --apply ocean
247
+ # List ALL system fonts
248
+ appshot fonts --all
271
249
 
272
- # Interactive selection with arrow keys
273
- appshot gradients select
250
+ # Validate a font
251
+ appshot fonts --validate "SF Pro"
274
252
 
275
- # Generate samples for all gradients (creates gradient-samples/ directory)
276
- appshot gradients --sample
277
- # Then open gradient-samples/preview.html in your browser
253
+ # Get JSON output for automation
254
+ appshot fonts --json
278
255
  ```
279
256
 
280
- #### How Gradient Presets Work
257
+ #### Font Setting Methods
281
258
 
282
- 1. **Browsing** - The `gradients` command displays all presets with:
283
- - Visual color blocks showing the gradient colors
284
- - Name and description
285
- - Category grouping
286
- - Gradient ID for applying
259
+ You have three ways to set fonts:
287
260
 
288
- 2. **Previewing** - Generate a sample image to see exactly how a gradient looks:
261
+ 1. **Direct Command** (Fastest):
289
262
  ```bash
290
- appshot gradients --preview neon
291
- # Creates: gradient-neon.png (400x800px)
263
+ appshot fonts --set "Helvetica"
264
+ appshot fonts --set "SF Pro" --device iphone
292
265
  ```
293
266
 
294
- 3. **Applying** - Updates your `.appshot/config.json` automatically:
267
+ 2. **Interactive Selection**:
295
268
  ```bash
296
- appshot gradients --apply twilight
297
- # Updates gradient.colors and gradient.direction in config
269
+ appshot fonts --select
270
+ appshot style --device iphone # Also includes font selection
298
271
  ```
299
272
 
300
- 4. **Sample Generation** - Creates a gallery of all gradients:
301
- ```bash
302
- appshot gradients --sample
303
- # Creates: gradient-samples/
304
- # β”œβ”€β”€ sunset.png
305
- # β”œβ”€β”€ ocean.png
306
- # β”œβ”€β”€ neon.png
307
- # └── preview.html (view all in browser)
308
- ```
309
-
310
- 5. **Interactive Selection** - Visual menu for choosing gradients:
311
- ```bash
312
- appshot gradients select
313
- # Use arrow keys to navigate, Enter to apply, Esc to cancel
273
+ 3. **Manual Configuration**:
274
+ ```json
275
+ {
276
+ "caption": {
277
+ "font": "Montserrat", // Global default
278
+ "fontsize": 64
279
+ },
280
+ "devices": {
281
+ "iphone": {
282
+ "captionFont": "SF Pro" // Device override
283
+ }
284
+ }
285
+ }
314
286
  ```
315
287
 
316
- ### `appshot style`
317
- Configure device positioning and caption styling interactively.
318
-
319
- Options:
320
- - `--device <name>` - Device name (iphone, ipad, mac, watch)
321
- - `--reset` - Reset device styling to defaults (removes all custom settings)
322
-
323
- Features:
324
- - **Auto frame selection** - Enable/disable automatic frame selection based on screenshot dimensions
325
- - **Preferred frame** - Choose specific device frame when auto selection is disabled
326
- - **Partial frames** - Toggle on/off and adjust cut-off percentage (15%-50%)
327
- - **Frame positioning** - Top, center, bottom, or custom positioning (0-100%)
328
- - **Frame scaling** - Control device size (75%-130% or custom)
329
- - **Caption customization** - Device-specific size, position, and box behavior
330
- - **Caption box** - Auto-sizing, max lines, line height adjustments
331
- - **Interactive prompts** - Step-by-step configuration with visual descriptions
332
-
333
- ### `appshot build`
334
- Generate final screenshots with frames, gradients, and captions.
335
-
336
- Options:
337
- - `--devices <list>` - Comma-separated device list
338
- - `--preset <ids>` - Use specific App Store presets (e.g., iphone-6-9,ipad-13)
339
- - `--config <file>` - Use specific config file (default: .appshot/config.json)
340
- - `--langs <list>` - Comma-separated language codes
341
- - `--preview` - Generate low-res previews
342
- - `--concurrency <n>` - Parallel processing limit
343
- - `--no-frame` - Skip device frames
344
- - `--no-gradient` - Skip gradient backgrounds
345
- - `--no-caption` - Skip captions
288
+ #### Intelligent Fallbacks
346
289
 
347
- ### `appshot specs`
348
- Display device specifications and resolutions.
290
+ Every font automatically includes appropriate fallback chains:
349
291
 
350
- ### `appshot clean`
351
- Remove generated screenshots and temporary files.
292
+ - **SF Pro** β†’ `system-ui, -apple-system, Helvetica, Arial, sans-serif`
293
+ - **Custom Serif** β†’ `'Custom Serif', Georgia, Times New Roman, serif`
294
+ - **Code Font** β†’ `'Code Font', Monaco, Consolas, monospace`
352
295
 
353
- Options:
354
- - `--all` - Remove all generated files including .appshot/ directory
355
- - `--history` - Clear caption autocomplete history
356
- - `--keep-history` - Preserve caption history when using --all
357
- - `--yes` - Skip confirmation prompt
296
+ #### System Font Detection
358
297
 
359
- Options:
360
- - `--device <name>` - Filter by device type
361
- - `--json` - Output as JSON
298
+ - **macOS**: Uses `system_profiler` for complete font list
299
+ - **Linux**: Uses `fc-list` for fontconfig fonts
300
+ - **Windows**: PowerShell queries font registry
362
301
 
363
- ### `appshot check`
364
- Validate project configuration and assets.
302
+ ### Device Frames
365
303
 
366
- Options:
367
- - `--fix` - Attempt to fix issues automatically
304
+ #### Smart Frame Selection
368
305
 
369
- ### `appshot presets`
370
- Manage App Store screenshot presets for all official resolutions.
306
+ Appshot automatically detects screenshot orientation and selects the appropriate frame:
371
307
 
372
- Options:
373
- - `--list` - List all available presets
374
- - `--required` - Show only required presets for App Store submission
375
- - `--generate <ids>` - Generate config for specific preset IDs (comma-separated)
376
- - `--category <type>` - Filter by category (iphone, ipad, mac, appletv, visionpro, watch)
377
- - `--output <file>` - Output file for generated config (default: appshot-presets.json)
308
+ ```json
309
+ {
310
+ "devices": {
311
+ "iphone": {
312
+ "autoFrame": true, // Auto-detect orientation
313
+ "preferredFrame": "iphone-16-pro-max-portrait" // Override
314
+ }
315
+ }
316
+ }
317
+ ```
378
318
 
379
- ### `appshot validate`
380
- Validate screenshots against App Store requirements.
319
+ #### Partial Frames
381
320
 
382
- Options:
383
- - `--strict` - Validate against required presets only
384
- - `--fix` - Suggest fixes for invalid screenshots
321
+ Create modern App Store screenshots with cut-off device frames:
385
322
 
386
- ### `appshot localize`
387
- Generate translations for all existing captions using OpenAI's powerful language models.
323
+ ```json
324
+ {
325
+ "devices": {
326
+ "iphone": {
327
+ "partialFrame": true,
328
+ "frameOffset": 25, // Cut 25% from bottom
329
+ "framePosition": 40, // Position at 40% from top
330
+ "frameScale": 0.85 // Scale to 85%
331
+ }
332
+ }
333
+ }
334
+ ```
388
335
 
389
- Options:
390
- - `--langs <codes>` - Target languages (comma-separated, required)
391
- - `--device <name>` - Specific device or all devices
392
- - `--model <name>` - OpenAI model to use (default: gpt-4o-mini)
393
- - `--source <lang>` - Source language (default: en)
394
- - `--review` - Review translations before saving
395
- - `--overwrite` - Overwrite existing translations
336
+ ### Caption System
396
337
 
397
- Supported models:
398
- - **GPT-4o models**: gpt-4o, gpt-4o-mini (using max_tokens)
399
- - **GPT-5 models**: gpt-5, gpt-5-mini, gpt-5-nano (using max_completion_tokens)
400
- - **o1 models**: o1, o1-mini (reasoning models)
401
- - **o3 models**: o3, o3-mini (latest reasoning models)
338
+ #### Dynamic Caption Box
402
339
 
403
- Example usage:
404
- ```bash
405
- # Translate all captions to Spanish, French, and German
406
- appshot localize --langs es,fr,de
340
+ Intelligent caption rendering that adapts to content:
407
341
 
408
- # Translate iPhone captions only, with review
409
- appshot localize --device iphone --langs ja,ko --review
342
+ ```json
343
+ {
344
+ "caption": {
345
+ "position": "above", // above or overlay
346
+ "box": {
347
+ "autoSize": true, // Dynamic height
348
+ "maxLines": 3, // Line limit
349
+ "lineHeight": 1.4, // Line spacing
350
+ "minHeight": 100,
351
+ "maxHeight": 500
352
+ }
353
+ }
354
+ }
355
+ ```
410
356
 
411
- # Use GPT-5 for higher quality translations
412
- appshot localize --langs zh-CN,zh-TW --model gpt-5
357
+ #### Caption Autocomplete
413
358
 
414
- # Overwrite existing translations with new ones
415
- appshot localize --langs es,fr --overwrite
416
- ```
359
+ The caption command includes intelligent autocomplete:
417
360
 
418
- Setup:
419
361
  ```bash
420
- # Set your OpenAI API key
421
- export OPENAI_API_KEY="your-api-key-here"
362
+ appshot caption --device iphone
363
+ # Features:
364
+ # - Fuzzy search
365
+ # - Frequency tracking
366
+ # - Device-specific suggestions
367
+ # - Pattern detection
422
368
  ```
423
369
 
424
- ## AI-Powered Translation πŸ€–
370
+ Keyboard shortcuts:
371
+ - **Tab** - Complete suggestion
372
+ - **↑↓** - Navigate suggestions
373
+ - **Enter** - Select
374
+ - **Esc** - Dismiss
375
+
376
+ ## 🌍 Localization & Translation
377
+
378
+ ### AI-Powered Translation
425
379
 
426
- Appshot includes powerful AI translation capabilities using OpenAI's latest models, including GPT-4o, GPT-5, and reasoning models (o1, o3).
380
+ Appshot integrates with OpenAI for instant caption translation.
427
381
 
428
- ### Setup
382
+ #### Setup
429
383
 
430
- First, set your OpenAI API key:
431
384
  ```bash
432
385
  export OPENAI_API_KEY="your-api-key-here"
433
386
  ```
434
387
 
435
- ### Real-Time Translation
436
-
437
- Translate captions instantly as you type them:
388
+ #### Real-Time Translation
438
389
 
439
390
  ```bash
440
- # Add captions with automatic translation to Spanish and French
441
- appshot caption --device iphone --translate --langs es,fr
442
-
443
- # Use a specific model for higher quality
444
- appshot caption --device iphone --translate --langs zh-CN,ja --model gpt-5
445
- ```
391
+ # Translate as you type
392
+ appshot caption --device iphone --translate --langs es,fr,de
446
393
 
447
- When you enter a caption, translations appear immediately below:
448
- ```
449
- ? home.png: Welcome to the future
450
- es: Bienvenido al futuro
451
- fr: Bienvenue dans le futur
394
+ # Output:
395
+ # ? home.png: Welcome to the future
396
+ # es: Bienvenido al futuro
397
+ # fr: Bienvenue dans le futur
398
+ # de: Willkommen in der Zukunft
452
399
  ```
453
400
 
454
- ### Batch Translation
455
-
456
- Translate all existing captions at once:
401
+ #### Batch Translation
457
402
 
458
403
  ```bash
459
- # Translate all captions to multiple languages
404
+ # Translate all existing captions
460
405
  appshot localize --langs es,fr,de,ja,zh-CN
461
406
 
462
- # Translate specific device only
407
+ # Device-specific translation
463
408
  appshot localize --device iphone --langs es,fr
464
409
 
465
- # Review translations before saving
466
- appshot localize --langs es,fr --review
467
-
468
- # Use GPT-5 for best quality
410
+ # Use premium model
469
411
  appshot localize --langs ja,ko --model gpt-5
412
+
413
+ # Review before saving
414
+ appshot localize --langs es --review
470
415
  ```
471
416
 
472
417
  ### Supported Models
473
418
 
474
- Appshot intelligently handles different OpenAI models and their specific requirements:
419
+ | Model Series | Best For | Parameter | Temperature |
420
+ |-------------|----------|-----------|-------------|
421
+ | **GPT-4o** | Fast, cost-effective | `max_tokens` | 0.3 |
422
+ | **GPT-5** | High-quality, nuanced | `max_completion_tokens` | 1.0 |
423
+ | **o1** | Deep reasoning | `max_completion_tokens` | 1.0 |
424
+ | **o3** | State-of-the-art | `max_completion_tokens` | 1.0 |
475
425
 
476
- #### GPT-4o Series (General Purpose)
477
- - **Models**: `gpt-4o`, `gpt-4o-mini`, `gpt-4-turbo`
478
- - **Best for**: Fast, cost-effective translations
479
- - **Parameter**: Uses `max_tokens`
480
- - **Temperature**: Configurable (default 0.3)
426
+ ### Supported Languages
481
427
 
482
- #### GPT-5 Series (Advanced)
483
- - **Models**: `gpt-5`, `gpt-5-mini`, `gpt-5-nano`
484
- - **Best for**: High-quality, nuanced translations
485
- - **Parameter**: Uses `max_completion_tokens`
486
- - **Temperature**: Fixed at 1.0 (reasoning model requirement)
428
+ 25+ languages including:
429
+ - **European**: es, fr, de, it, pt, nl, sv, no, da, fi, pl, ru
430
+ - **Asian**: ja, ko, zh-CN, zh-TW, hi, th, vi, id, ms
431
+ - **Middle Eastern**: ar, he, tr
432
+ - **Variants**: pt-BR
487
433
 
488
- #### o1 Series (Deep Reasoning)
489
- - **Models**: `o1`, `o1-mini`
490
- - **Best for**: Complex marketing copy with cultural adaptation
491
- - **Parameter**: Uses `max_completion_tokens`
492
- - **Temperature**: Fixed at 1.0
434
+ ### Multi-Language Workflow
493
435
 
494
- #### o3 Series (Latest Reasoning)
495
- - **Models**: `o3`, `o3-mini`
496
- - **Best for**: State-of-the-art translation quality
497
- - **Parameter**: Uses `max_completion_tokens`
498
- - **Temperature**: Fixed at 1.0
436
+ ```bash
437
+ # 1. Add captions with translation
438
+ appshot caption --device iphone --translate --langs es,fr
499
439
 
500
- ### Language Support
440
+ # 2. Build localized screenshots
441
+ appshot build --langs en,es,fr
501
442
 
502
- Built-in support for 25+ languages:
503
- - **European**: Spanish (es), French (fr), German (de), Italian (it), Portuguese (pt), Dutch (nl), Swedish (sv), Norwegian (no), Danish (da), Finnish (fi), Polish (pl), Russian (ru)
504
- - **Asian**: Japanese (ja), Korean (ko), Simplified Chinese (zh-CN), Traditional Chinese (zh-TW), Hindi (hi), Thai (th), Vietnamese (vi), Indonesian (id), Malay (ms)
505
- - **Middle Eastern**: Arabic (ar), Hebrew (he), Turkish (tr)
506
- - **Portuguese Variants**: Brazilian Portuguese (pt-BR)
443
+ # Output structure (always uses language subdirectories):
444
+ # final/
445
+ # iphone/
446
+ # en/
447
+ # es/
448
+ # fr/
449
+ ```
507
450
 
508
- ### Translation Features
451
+ ## πŸ“± Device Support
509
452
 
510
- #### Smart Caching
511
- Translations are cached to avoid duplicate API calls. If you translate the same caption again, it returns instantly without using API credits.
453
+ ### Apple Devices
512
454
 
513
- #### Marketing-Optimized Prompts
514
- The system uses specialized prompts designed for app marketing text:
515
- - Maintains marketing tone and impact
516
- - Keeps translations concise
517
- - Ensures cultural appropriateness
518
- - Preserves call-to-action strength
455
+ | Device | Orientations | Frame Variants | Special Features |
456
+ |--------|-------------|----------------|------------------|
457
+ | **iPhone** | Portrait, Landscape | 15+ models | Notch/Dynamic Island support |
458
+ | **iPad** | Portrait, Landscape | 10+ models | Multiple sizes |
459
+ | **Mac** | Landscape | 4 resolutions | 16:10 aspect ratio |
460
+ | **Apple Watch** | Portrait | 5 sizes | Band cropping |
461
+ | **Apple TV** | Landscape | HD, 4K | TV frame |
462
+ | **Vision Pro** | Landscape | 3840Γ—2160 | Spatial computing |
519
463
 
520
- #### Error Handling
521
- - Graceful fallback if API is unavailable
522
- - Clear error messages for rate limits
523
- - Automatic retry with delays for batch operations
524
- - Continues with other translations if one fails
464
+ ### App Store Specifications
525
465
 
526
- ### Advanced Configuration
466
+ #### Required Resolutions
527
467
 
528
- Create `.appshot/ai-config.json` for custom settings:
468
+ **iPhone** (choose one):
469
+ - 6.9" Display: 1290Γ—2796 (iPhone 16/15 Pro Max)
470
+ - 6.5" Display: 1284Γ—2778 (iPhone 14 Plus)
529
471
 
530
- ```json
531
- {
532
- "defaultModel": "gpt-5",
533
- "temperature": 0.3,
534
- "cache": true,
535
- "systemPrompt": "You are translating premium app marketing text. Keep it impactful and concise."
536
- }
537
- ```
472
+ **iPad**:
473
+ - 13" Display: 2064Γ—2752 or 2048Γ—2732
538
474
 
539
- ### Cost Optimization Tips
475
+ **Mac**:
476
+ - 16:10 aspect: 2880Γ—1800, 2560Γ—1600, 1440Γ—900, or 1280Γ—800
540
477
 
541
- 1. **Use `gpt-4o-mini`** for draft translations (very cost-effective)
542
- 2. **Enable caching** to avoid retranslating identical text
543
- 3. **Batch operations** are more efficient than real-time for large projects
544
- 4. **Review mode** lets you verify before committing translations
478
+ **Apple Watch**:
479
+ - Must use same size across all localizations
545
480
 
546
- ### Example Workflow
481
+ #### Preset Management
547
482
 
548
483
  ```bash
549
- # 1. Initialize project
550
- appshot init
551
-
552
- # 2. Add screenshots
553
- cp ~/Desktop/screenshots/*.png screenshots/iphone/
484
+ # View all presets
485
+ appshot presets
554
486
 
555
- # 3. Add captions with instant translation
556
- appshot caption --device iphone --translate --langs es,fr,de
487
+ # Show required only
488
+ appshot presets --required
557
489
 
558
- # 4. Build localized screenshots
559
- appshot build --langs en,es,fr,de
490
+ # Generate config for specific presets
491
+ appshot presets --generate iphone-6-9,ipad-13
560
492
 
561
- # Output structure:
562
- # final/
563
- # iphone/
564
- # en/
565
- # home.png
566
- # es/
567
- # home.png
568
- # fr/
569
- # home.png
570
- # de/
571
- # home.png
493
+ # Build with presets
494
+ appshot build --preset iphone-6-9,ipad-13
572
495
  ```
573
496
 
574
- ## Multi-Language Support
497
+ ### Validation
575
498
 
576
- Captions are stored with all translations in JSON format:
499
+ ```bash
500
+ # Validate against App Store requirements
501
+ appshot validate
577
502
 
578
- ```json
579
- {
580
- "home.png": {
581
- "en": "Organize your life",
582
- "fr": "Organisez votre vie",
583
- "es": "Organiza tu vida",
584
- "de": "Organisieren Sie Ihr Leben",
585
- "ja": "δΊΊη”Ÿγ‚’ζ•΄η†γ™γ‚‹"
586
- }
587
- }
503
+ # Strict mode (required presets only)
504
+ appshot validate --strict
505
+
506
+ # Get fix suggestions
507
+ appshot validate --fix
588
508
  ```
589
509
 
590
- Build for specific languages:
510
+ ## πŸ“ Command Reference
511
+
512
+ ### `appshot build`
513
+
514
+ Generate final screenshots with frames, gradients, and captions.
591
515
 
592
516
  ```bash
593
- appshot build --langs en,fr,es
517
+ appshot build [options]
594
518
  ```
595
519
 
596
- ## App Store Specifications
520
+ **Options:**
521
+ - `--devices <list>` - Comma-separated device list (default: all)
522
+ - `--preset <ids>` - Use App Store presets (e.g., `iphone-6-9,ipad-13`)
523
+ - `--config <file>` - Custom config file (default: `.appshot/config.json`)
524
+ - `--langs <list>` - Build for specific languages (if not specified, auto-detects)
525
+ - `--preview` - Generate low-res previews
526
+ - `--concurrency <n>` - Parallel processing limit (default: 5)
527
+ - `--no-frame` - Skip device frames
528
+ - `--no-gradient` - Skip gradient backgrounds
529
+ - `--no-caption` - Skip captions
597
530
 
598
- Appshot includes all official App Store screenshot resolutions. View them with:
531
+ **Language Detection:**
532
+ When `--langs` is not specified, appshot automatically determines languages in this order:
533
+ 1. Languages found in caption files (if using multi-language captions)
534
+ 2. `defaultLanguage` setting in config.json
535
+ 3. System locale (e.g., `fr` for French systems)
536
+ 4. Fallback to `en`
599
537
 
538
+ **Examples:**
600
539
  ```bash
601
- # Show all presets
602
- appshot presets
540
+ # Build all devices
541
+ appshot build
603
542
 
604
- # Show only required presets
605
- appshot presets --required
543
+ # Specific devices and languages
544
+ appshot build --devices iphone,ipad --langs en,fr,es
606
545
 
607
- # Generate config for specific devices
608
- appshot presets --generate iphone-6-9,ipad-13,mac-2880,watch-ultra
609
- ```
546
+ # Use App Store presets
547
+ appshot build --preset iphone-6-9-portrait,ipad-13-landscape
610
548
 
611
- ### Required Resolutions
549
+ # Preview mode
550
+ appshot build --preview --devices iphone
551
+ ```
612
552
 
613
- **iPhone** (choose one):
614
- - **6.9" Display**: 1290Γ—2796 (iPhone 16 Pro Max, 15 Pro Max, etc.)
615
- - **6.5" Display**: 1284Γ—2778 (iPhone 14 Plus, 13 Pro Max, etc.)
553
+ **Exit Codes:**
554
+ - `0` - Success
555
+ - `1` - Configuration error
556
+ - `2` - Missing screenshots
557
+ - `3` - Processing error
616
558
 
617
- **iPad** (required):
618
- - **13" Display**: 2064Γ—2752 or 2048Γ—2732
559
+ ### `appshot caption`
619
560
 
620
- **Mac** (for Mac apps):
621
- - **16:10 aspect ratio**: 2880Γ—1800, 2560Γ—1600, 1440Γ—900, or 1280Γ—800
561
+ Add or edit captions with autocomplete and AI translation.
622
562
 
623
- **Apple Watch** (for Watch apps):
624
- - **Ultra**: 410Γ—502
625
- - **Series 10**: 416Γ—496
626
- - **Series 9/8/7**: 396Γ—484
563
+ ```bash
564
+ appshot caption --device <name> [options]
565
+ ```
627
566
 
628
- ### Quick Preset Usage
567
+ **Options:**
568
+ - `--device <name>` - Device name (required)
569
+ - `--lang <code>` - Primary language (default: en)
570
+ - `--translate` - Enable real-time AI translation
571
+ - `--langs <codes>` - Target languages for translation
572
+ - `--model <name>` - OpenAI model (default: gpt-4o-mini)
629
573
 
574
+ **Examples:**
630
575
  ```bash
631
- # Build with iPhone 6.9" and iPad 13" presets
632
- appshot build --preset iphone-6-9,ipad-13
576
+ # Basic caption entry
577
+ appshot caption --device iphone
633
578
 
634
- # Validate existing screenshots
635
- appshot validate --strict
636
- ```
579
+ # With translation
580
+ appshot caption --device iphone --translate --langs es,fr,de
637
581
 
638
- ## Examples
582
+ # Custom model
583
+ appshot caption --device ipad --translate --langs ja --model gpt-5
584
+ ```
639
585
 
640
- See the `examples/minimal-project` directory for a complete example setup.
586
+ ### `appshot check`
641
587
 
642
- ## Development
588
+ Validate project configuration and assets.
643
589
 
644
590
  ```bash
645
- # Clone the repository
646
- git clone https://github.com/chrisvanbuskirk/appshot.git
647
- cd appshot
591
+ appshot check [options]
592
+ ```
648
593
 
649
- # Install dependencies
650
- npm install
594
+ **Options:**
595
+ - `--fix` - Attempt automatic fixes
651
596
 
652
- # Build
653
- npm run build
597
+ **Checks:**
598
+ - Configuration file validity
599
+ - Screenshot presence
600
+ - Frame availability
601
+ - Directory structure
602
+ - Caption files
654
603
 
655
- # Run tests
656
- npm test
604
+ ### `appshot clean`
657
605
 
658
- # Link for local development
659
- npm link
606
+ Remove generated files and temporary data.
607
+
608
+ ```bash
609
+ appshot clean [options]
660
610
  ```
661
611
 
662
- ## Contributing
612
+ **Options:**
613
+ - `--all` - Remove all generated files including `.appshot/`
614
+ - `--history` - Clear caption autocomplete history
615
+ - `--keep-history` - Preserve history when using `--all`
616
+ - `--yes` - Skip confirmation prompt
663
617
 
664
- We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.
618
+ **Examples:**
619
+ ```bash
620
+ # Clean output only
621
+ appshot clean
665
622
 
666
- ## Security
623
+ # Full reset
624
+ appshot clean --all --yes
667
625
 
668
- For security issues, please see [SECURITY.md](SECURITY.md).
626
+ # Clear history
627
+ appshot clean --history
628
+ ```
669
629
 
670
- ## License
630
+ ### `appshot fonts`
671
631
 
672
- MIT Β© Chris Van Buskirk
632
+ Browse, validate, and set fonts for captions.
673
633
 
674
- ## Advanced Features
634
+ ```bash
635
+ appshot fonts [options]
636
+ ```
675
637
 
676
- ### Smart Frame Selection
638
+ **Options:**
639
+ - `--all` - List all system fonts
640
+ - `--recommended` - Show recommended fonts only (default)
641
+ - `--validate <name>` - Check if font is available
642
+ - `--set <name>` - Set the caption font
643
+ - `--select` - Interactive font selection
644
+ - `--device <name>` - Target specific device (with --set or --select)
645
+ - `--json` - Output as JSON
677
646
 
678
- Appshot automatically detects whether your screenshots are portrait or landscape and selects the appropriate device frame:
647
+ **Examples:**
648
+ ```bash
649
+ # Browse recommended fonts
650
+ appshot fonts
679
651
 
680
- - **iPhone screenshots** automatically use portrait frames for vertical shots and landscape frames for horizontal ones
681
- - **iPad screenshots** work seamlessly in both orientations
682
- - **Mac screenshots** always use landscape frames
683
- - **Watch screenshots** always use portrait frames
652
+ # Set global font directly
653
+ appshot fonts --set "Montserrat"
684
654
 
685
- Override automatic selection with `preferredFrame` in your device configuration.
655
+ # Interactive font selection
656
+ appshot fonts --select
686
657
 
687
- ### Partial Frames
658
+ # Set device-specific font
659
+ appshot fonts --set "SF Pro" --device iphone
688
660
 
689
- Create dynamic App Store screenshots with partial device frames in `.appshot/config.json`:
661
+ # Validate before setting
662
+ appshot fonts --validate "My Font" && appshot fonts --set "My Font"
690
663
 
691
- ```json
692
- {
693
- "devices": {
694
- "iphone": {
695
- "partialFrame": true,
696
- "frameOffset": 25 // Cut off bottom 25%
697
- }
698
- }
699
- }
664
+ # List all system fonts
665
+ appshot fonts --all
666
+
667
+ # JSON output for automation
668
+ appshot fonts --json > fonts.json
700
669
  ```
701
670
 
702
- ### Caption Positioning
671
+ ### `appshot gradients`
703
672
 
704
- Place captions above the device frame (recommended) or as an overlay:
673
+ Manage gradient presets.
705
674
 
706
- ```json
707
- {
708
- "caption": {
709
- "position": "above", // or "overlay"
710
- "paddingTop": 120,
711
- "paddingBottom": 80
712
- }
713
- }
675
+ ```bash
676
+ appshot gradients [options]
677
+ appshot gradients select
714
678
  ```
715
679
 
716
- ### Dynamic Caption Box System
680
+ **Options:**
681
+ - `--list` - List all presets (default)
682
+ - `--category <name>` - Filter by category
683
+ - `--preview <id>` - Generate preview image
684
+ - `--sample` - Generate all samples with HTML
685
+ - `--apply <id>` - Apply preset to project
686
+
687
+ **Examples:**
688
+ ```bash
689
+ # Browse all
690
+ appshot gradients
717
691
 
718
- Appshot features an intelligent caption system that automatically adapts to your content and device positioning:
692
+ # Apply preset
693
+ appshot gradients --apply ocean
719
694
 
720
- #### How It Works
695
+ # Interactive selection
696
+ appshot gradients select
721
697
 
722
- 1. **Automatic Text Wrapping** - Long captions automatically wrap to multiple lines based on available width
723
- 2. **Dynamic Height Calculation** - Caption area expands or contracts based on:
724
- - Text content length
725
- - Device frame position
726
- - Available space constraints
727
- 3. **Smart Positioning** - Caption space adjusts to device placement:
728
- - Device at **top** β†’ Minimal caption space (15% of screen)
729
- - Device at **center** β†’ Balanced caption space
730
- - Device at **bottom** β†’ Maximum caption space (up to 50% of screen)
698
+ # Generate samples
699
+ appshot gradients --sample
700
+ ```
731
701
 
732
- #### Configuration
702
+ ### `appshot init`
733
703
 
734
- Global caption box settings in `.appshot/config.json`:
704
+ Initialize new project with scaffolding.
735
705
 
736
- ```json
737
- {
738
- "caption": {
739
- "fontsize": 64,
740
- "box": {
741
- "autoSize": true, // Auto-size height based on content
742
- "maxLines": 3, // Maximum lines before truncation
743
- "lineHeight": 1.4, // Line spacing (1.2-1.8)
744
- "minHeight": 100, // Minimum caption area height
745
- "maxHeight": 500 // Maximum caption area height
746
- }
747
- }
748
- }
706
+ ```bash
707
+ appshot init [options]
749
708
  ```
750
709
 
751
- Device-specific overrides:
710
+ **Options:**
711
+ - `--force` - Overwrite existing files
752
712
 
753
- ```json
754
- {
755
- "devices": {
756
- "iphone": {
757
- "captionBox": {
758
- "autoSize": true,
759
- "maxLines": 4, // iPhone can show more lines
760
- "lineHeight": 1.5 // More spacing for readability
761
- }
762
- },
763
- "watch": {
764
- "captionBox": {
765
- "maxLines": 2, // Watch limited to 2 lines
766
- "lineHeight": 1.3 // Tighter spacing
767
- }
768
- }
769
- }
770
- }
713
+ **Creates:**
714
+ - `.appshot/config.json`
715
+ - `.appshot/captions/`
716
+ - `screenshots/` directories
717
+ - Default configuration
718
+
719
+ ### `appshot migrate`
720
+
721
+ Migrate project structure to latest version.
722
+
723
+ ```bash
724
+ appshot migrate [options]
771
725
  ```
772
726
 
773
- #### Examples
727
+ **Options:**
728
+ - `--output-structure` - Migrate to language subdirectory structure
729
+ - `--dry-run` - Preview changes without making them
730
+ - `--lang <code>` - Language to use for migration (default: system language)
774
731
 
775
- **Long Caption Handling:**
776
- - Input: "This is a very long caption that needs multiple lines to display properly"
777
- - Result: Automatically wrapped to 2-3 centered lines with proper spacing
732
+ **Examples:**
733
+ ```bash
734
+ # Migrate existing screenshots to language subdirectories
735
+ appshot migrate --output-structure
778
736
 
779
- **Device Position Impact:**
780
- - `framePosition: "top"` β†’ Caption gets ~400px height
781
- - `framePosition: "center"` β†’ Caption gets ~700px height
782
- - `framePosition: "bottom"` β†’ Caption gets ~1400px height
737
+ # Preview migration without changes
738
+ appshot migrate --output-structure --dry-run
783
739
 
784
- **Best Practices:**
785
- - Keep captions concise (under 100 characters)
786
- - Use 3-4 lines maximum for readability
787
- - Test with `appshot build --preview` to quickly iterate
788
- - Adjust `lineHeight` for visual balance (1.4 recommended)
740
+ # Specify target language
741
+ appshot migrate --output-structure --lang fr
742
+ ```
789
743
 
790
- ### Device-Specific Styling
744
+ ### `appshot localize`
791
745
 
792
- Use the `appshot style` command or configure directly in `.appshot/config.json`:
746
+ Batch translate all captions using AI.
793
747
 
794
- ```json
795
- {
748
+ ```bash
749
+ appshot localize --langs <codes> [options]
750
+ ```
751
+
752
+ **Options:**
753
+ - `--langs <codes>` - Target languages (required)
754
+ - `--device <name>` - Specific device only
755
+ - `--model <name>` - OpenAI model (default: gpt-4o-mini)
756
+ - `--source <lang>` - Source language (default: en)
757
+ - `--review` - Review before saving
758
+ - `--overwrite` - Replace existing translations
759
+
760
+ **Examples:**
761
+ ```bash
762
+ # Translate all
763
+ appshot localize --langs es,fr,de
764
+
765
+ # Device-specific
766
+ appshot localize --device iphone --langs ja,ko
767
+
768
+ # Premium model with review
769
+ appshot localize --langs zh-CN --model gpt-5 --review
770
+ ```
771
+
772
+ ### `appshot presets`
773
+
774
+ Manage App Store screenshot presets.
775
+
776
+ ```bash
777
+ appshot presets [options]
778
+ ```
779
+
780
+ **Options:**
781
+ - `--list` - List all presets (default)
782
+ - `--required` - Show required only
783
+ - `--generate <ids>` - Generate config for presets
784
+ - `--category <type>` - Filter by device type
785
+ - `--output <file>` - Output file for config
786
+
787
+ **Examples:**
788
+ ```bash
789
+ # View all
790
+ appshot presets
791
+
792
+ # Required only
793
+ appshot presets --required
794
+
795
+ # Generate config
796
+ appshot presets --generate iphone-6-9,ipad-13
797
+ ```
798
+
799
+ ### `appshot specs`
800
+
801
+ Display device specifications.
802
+
803
+ ```bash
804
+ appshot specs [options]
805
+ ```
806
+
807
+ **Options:**
808
+ - `--device <name>` - Filter by device
809
+ - `--json` - Output as JSON
810
+
811
+ **Shows:**
812
+ - Supported resolutions
813
+ - Frame availability
814
+ - Orientation support
815
+ - App Store requirements
816
+
817
+ ### `appshot style`
818
+
819
+ Configure device styling interactively.
820
+
821
+ ```bash
822
+ appshot style --device <name> [options]
823
+ ```
824
+
825
+ **Options:**
826
+ - `--device <name>` - Device name (required)
827
+ - `--reset` - Reset to defaults
828
+
829
+ **Configures:**
830
+ - Font selection
831
+ - Frame settings
832
+ - Partial frames
833
+ - Frame positioning
834
+ - Frame scaling
835
+ - Caption settings
836
+
837
+ **Examples:**
838
+ ```bash
839
+ # Configure iPhone
840
+ appshot style --device iphone
841
+
842
+ # Reset to defaults
843
+ appshot style --device iphone --reset
844
+ ```
845
+
846
+ ### `appshot validate`
847
+
848
+ Validate screenshots against App Store requirements.
849
+
850
+ ```bash
851
+ appshot validate [options]
852
+ ```
853
+
854
+ **Options:**
855
+ - `--strict` - Validate required presets only
856
+ - `--fix` - Show fix suggestions
857
+
858
+ **Validates:**
859
+ - Resolution compliance
860
+ - Aspect ratios
861
+ - Required presets
862
+ - File formats
863
+
864
+ ## βš™οΈ Configuration Reference
865
+
866
+ ### Complete Schema
867
+
868
+ ```json
869
+ {
870
+ "output": "./final", // Output directory
871
+ "frames": "./frames", // Frame directory
872
+ "defaultLanguage": "en", // Default language for builds (optional)
873
+ "gradient": {
874
+ "colors": ["#hex1", "#hex2"],
875
+ "direction": "top-bottom" // or diagonal, left-right
876
+ },
877
+ "caption": {
878
+ "font": "Font Name",
879
+ "fontsize": 64, // Pixels
880
+ "color": "#FFFFFF",
881
+ "align": "center", // left, center, right
882
+ "position": "above", // above, overlay
883
+ "paddingTop": 100,
884
+ "paddingBottom": 60,
885
+ "box": {
886
+ "autoSize": true, // Dynamic height
887
+ "maxLines": 3,
888
+ "lineHeight": 1.4,
889
+ "minHeight": 100,
890
+ "maxHeight": 500
891
+ }
892
+ },
796
893
  "devices": {
797
894
  "iphone": {
798
- "partialFrame": true, // Enable partial frame
799
- "frameOffset": 25, // Cut off bottom 25%
800
- "framePosition": "center", // or "top", "bottom", 0-100
801
- "frameScale": 0.9, // Size multiplier (0.5-2.0)
802
- "captionSize": 72, // Override global caption size
803
- "captionPosition": "above", // Override global position
804
- "captionBox": { // Caption box configuration
805
- "autoSize": true, // Auto-size based on content
806
- "maxLines": 4, // Maximum lines before truncation
807
- "lineHeight": 1.4 // Line spacing multiplier
895
+ "input": "./screenshots/iphone",
896
+ "resolution": "1284x2778",
897
+ "autoFrame": true,
898
+ "preferredFrame": "frame-name",
899
+ "partialFrame": false,
900
+ "frameOffset": 25, // Percentage
901
+ "framePosition": "center", // or top, bottom, 0-100
902
+ "frameScale": 0.9, // 0.5-2.0
903
+ "captionFont": "Override",
904
+ "captionSize": 72,
905
+ "captionPosition": "above",
906
+ "captionBox": {
907
+ "autoSize": false,
908
+ "minHeight": 320,
909
+ "maxHeight": 320
808
910
  }
809
- },
810
- "watch": {
811
- "framePosition": "bottom", // Position at bottom
812
- "frameScale": 1.3, // Make watch larger
813
- "partialFrame": true, // Cut off band
814
- "frameOffset": 30 // Cut 30% from bottom
815
911
  }
816
912
  }
817
913
  }
818
914
  ```
819
915
 
820
- ### Achieving Consistent Device Positioning
916
+ ### Device Configuration
821
917
 
822
- ⚠️ **Important**: Caption sizing can affect device frame positioning and size. Here's how to achieve perfectly consistent screenshots:
918
+ Each device can override global settings:
823
919
 
824
- #### The Problem
825
-
826
- By default, appshot uses dynamic caption sizing which causes:
827
- - **Variable device sizes** - Longer captions = smaller devices
828
- - **Variable device positions** - Caption height affects vertical placement
829
- - **Inconsistent layouts** - Each screenshot looks different
920
+ ```json
921
+ {
922
+ "devices": {
923
+ "iphone": {
924
+ // Required
925
+ "input": "./screenshots/iphone",
926
+ "resolution": "1284x2778",
927
+
928
+ // Frame options
929
+ "autoFrame": true,
930
+ "preferredFrame": "iphone-16-pro-max-portrait",
931
+ "partialFrame": true,
932
+ "frameOffset": 25,
933
+ "framePosition": 40,
934
+ "frameScale": 0.85,
935
+
936
+ // Caption overrides
937
+ "captionFont": "SF Pro",
938
+ "captionSize": 64,
939
+ "captionPosition": "above",
940
+ "captionBox": {
941
+ "autoSize": false,
942
+ "minHeight": 320,
943
+ "maxHeight": 320,
944
+ "maxLines": 3
945
+ }
946
+ }
947
+ }
948
+ }
949
+ ```
830
950
 
831
- #### The Solution: Fixed Layout Configuration
951
+ ### Fixed Layout Configuration
832
952
 
833
- To ensure all screenshots have identical device size and position regardless of caption length:
953
+ For consistent screenshots regardless of caption length:
834
954
 
835
955
  ```json
836
956
  {
837
957
  "devices": {
838
958
  "iphone": {
839
- "autoFrame": false, // Disable auto frame selection
840
- "preferredFrame": "iphone-16-pro-max-portrait", // Use specific frame
841
- "frameScale": 0.85, // Lock device at 85% size
842
- "framePosition": 40, // Position at 40% from top
959
+ "autoFrame": false,
960
+ "preferredFrame": "iphone-16-pro-max-portrait",
961
+ "frameScale": 0.85,
962
+ "framePosition": 40,
843
963
  "captionBox": {
844
- "autoSize": false, // CRITICAL: Disable auto-sizing
845
- "minHeight": 320, // CRITICAL: Set fixed height
846
- "maxHeight": 320 // CRITICAL: Same as minHeight
964
+ "autoSize": false, // Critical
965
+ "minHeight": 320, // Fixed height
966
+ "maxHeight": 320 // Same as min
847
967
  }
848
968
  }
849
969
  }
850
970
  }
851
971
  ```
852
972
 
853
- #### Key Settings Explained
973
+ ## πŸ€– Agent & Automation Guide
974
+
975
+ ### Design Principles
976
+
977
+ Appshot is built for automation:
978
+
979
+ 1. **Predictable** - Consistent commands and outputs
980
+ 2. **Scriptable** - JSON configs, exit codes, no GUI
981
+ 3. **Composable** - Unix philosophy, pipe-friendly
982
+ 4. **Fast** - Parallel processing, no overhead
983
+
984
+ ### JSON Output Mode
985
+
986
+ Most commands support JSON output for parsing:
987
+
988
+ ```bash
989
+ # Device specs as JSON
990
+ appshot specs --json
991
+
992
+ # Font list as JSON
993
+ appshot fonts --json
994
+
995
+ # Preset data as JSON
996
+ appshot presets --json
997
+
998
+ # Validation results as JSON
999
+ appshot validate --json
1000
+ ```
1001
+
1002
+ ### Exit Codes
1003
+
1004
+ | Code | Meaning | Commands |
1005
+ |------|---------|----------|
1006
+ | 0 | Success | All |
1007
+ | 1 | Configuration error | build, check |
1008
+ | 2 | Missing files | build, validate |
1009
+ | 3 | Processing error | build |
1010
+ | 4 | Invalid input | All |
1011
+ | 5 | API error | localize, caption |
1012
+
1013
+ ### Batch Operations
1014
+
1015
+ ```bash
1016
+ # Process multiple devices
1017
+ appshot build --devices iphone,ipad,mac
1018
+
1019
+ # Multiple languages
1020
+ appshot build --langs en,es,fr,de,ja
1021
+
1022
+ # Parallel processing
1023
+ appshot build --concurrency 10
1024
+ ```
1025
+
1026
+ ### CI/CD Integration
1027
+
1028
+ #### GitHub Actions
1029
+
1030
+ ```yaml
1031
+ name: Generate Screenshots
1032
+ on: [push]
1033
+
1034
+ jobs:
1035
+ screenshots:
1036
+ runs-on: macos-latest
1037
+ steps:
1038
+ - uses: actions/checkout@v2
1039
+
1040
+ - name: Setup Node
1041
+ uses: actions/setup-node@v2
1042
+ with:
1043
+ node-version: '18'
1044
+
1045
+ - name: Install Appshot
1046
+ run: npm install -g appshot-cli
1047
+
1048
+ - name: Generate Screenshots
1049
+ run: |
1050
+ appshot init --force
1051
+ appshot gradients --apply ocean
1052
+ appshot build --preset iphone-6-9,ipad-13
1053
+
1054
+ - name: Upload Artifacts
1055
+ uses: actions/upload-artifact@v2
1056
+ with:
1057
+ name: screenshots
1058
+ path: final/
1059
+ ```
1060
+
1061
+ #### Shell Script Automation
1062
+
1063
+ ```bash
1064
+ #!/bin/bash
1065
+ set -e
1066
+
1067
+ # Configure
1068
+ cat > .appshot/config.json << EOF
1069
+ {
1070
+ "gradient": {"colors": ["#FF5733", "#FFC300"]},
1071
+ "devices": {
1072
+ "iphone": {"resolution": "1284x2778"}
1073
+ }
1074
+ }
1075
+ EOF
1076
+
1077
+ # Add captions programmatically
1078
+ echo '{"home.png": "Welcome"}' > .appshot/captions/iphone.json
1079
+
1080
+ # Build
1081
+ appshot build --devices iphone
1082
+
1083
+ # Validate
1084
+ appshot validate --strict || exit 1
1085
+ ```
1086
+
1087
+ ### MCP Integration
854
1088
 
855
- 1. **`autoFrame: false`** - Disables automatic frame selection
856
- - Use with `preferredFrame` to specify exact device frame
857
- - Ensures consistent frame across all screenshots
1089
+ Works with Model Context Protocol tools:
858
1090
 
859
- 2. **`frameScale`** - Controls device size (0.5 to 2.0)
860
- - Set explicitly to lock device size
861
- - Without this, device scales based on available space
1091
+ ```bash
1092
+ # MCP captures screenshot
1093
+ mcp-screenshot capture --output ./screenshots/iphone/home.png
862
1094
 
863
- 3. **`framePosition`** - Vertical positioning (0-100 or "top"/"center"/"bottom")
864
- - Number = percentage from top of available space
865
- - Keeps device at consistent height
1095
+ # Appshot processes
1096
+ appshot build --devices iphone --no-interactive
1097
+ ```
866
1098
 
867
- 4. **`captionBox.autoSize: false`** - Disables dynamic caption sizing
868
- - MUST be false for consistent layouts
869
- - Default is true (adapts to content)
1099
+ ### Python Automation
1100
+
1101
+ ```python
1102
+ import subprocess
1103
+ import json
1104
+
1105
+ def generate_screenshots(device, captions):
1106
+ # Configure
1107
+ config = {
1108
+ "gradient": {"colors": ["#0077BE", "#33CCCC"]},
1109
+ "devices": {
1110
+ device: {"resolution": "1284x2778"}
1111
+ }
1112
+ }
1113
+
1114
+ with open('.appshot/config.json', 'w') as f:
1115
+ json.dump(config, f)
1116
+
1117
+ # Add captions
1118
+ with open(f'.appshot/captions/{device}.json', 'w') as f:
1119
+ json.dump(captions, f)
1120
+
1121
+ # Build
1122
+ result = subprocess.run(
1123
+ ['appshot', 'build', '--devices', device],
1124
+ capture_output=True,
1125
+ text=True
1126
+ )
1127
+
1128
+ return result.returncode == 0
1129
+
1130
+ # Usage
1131
+ captions = {
1132
+ "home.png": "Your Dashboard",
1133
+ "settings.png": "Customize Everything"
1134
+ }
1135
+ generate_screenshots("iphone", captions)
1136
+ ```
1137
+
1138
+ ### Node.js Automation
1139
+
1140
+ ```javascript
1141
+ import { exec } from 'child_process';
1142
+ import { writeFileSync } from 'fs';
1143
+
1144
+ async function generateScreenshots() {
1145
+ // 1. Initialize
1146
+ await execPromise('appshot init --force');
1147
+
1148
+ // 2. Configure
1149
+ const config = {
1150
+ gradient: { colors: ['#FF5733', '#FFC300'] },
1151
+ caption: { font: 'SF Pro', fontsize: 64 }
1152
+ };
1153
+ writeFileSync('.appshot/config.json', JSON.stringify(config));
1154
+
1155
+ // 3. Add captions
1156
+ const captions = {
1157
+ 'home.png': {
1158
+ en: 'Welcome',
1159
+ es: 'Bienvenido',
1160
+ fr: 'Bienvenue'
1161
+ }
1162
+ };
1163
+ writeFileSync('.appshot/captions/iphone.json', JSON.stringify(captions));
1164
+
1165
+ // 4. Build with multiple languages
1166
+ await execPromise('appshot build --langs en,es,fr');
1167
+ }
1168
+
1169
+ function execPromise(cmd) {
1170
+ return new Promise((resolve, reject) => {
1171
+ exec(cmd, (error, stdout) => {
1172
+ if (error) reject(error);
1173
+ else resolve(stdout);
1174
+ });
1175
+ });
1176
+ }
1177
+ ```
870
1178
 
871
- 5. **`minHeight` = `maxHeight`** - Forces exact caption height
872
- - Both MUST be set to same value
873
- - Creates fixed caption area regardless of text length
1179
+ ## 🎯 Recipes & Examples
874
1180
 
875
- #### Complete Example for Consistent iPhone Screenshots
1181
+ ### App Store Submission Workflow
1182
+
1183
+ ```bash
1184
+ # 1. Initialize project
1185
+ appshot init
1186
+
1187
+ # 2. Configure for App Store
1188
+ appshot presets --generate iphone-6-9,ipad-13 > .appshot/config.json
1189
+
1190
+ # 3. Add screenshots
1191
+ cp simulator/*.png screenshots/iphone/
1192
+
1193
+ # 4. Add captions with translation
1194
+ export OPENAI_API_KEY="sk-..."
1195
+ appshot caption --device iphone --translate --langs es,fr,de,ja,zh-CN
1196
+
1197
+ # 5. Apply premium gradient
1198
+ appshot gradients --apply twilight
1199
+
1200
+ # 6. Configure styling
1201
+ appshot style --device iphone
1202
+
1203
+ # 7. Build all localizations
1204
+ appshot build --preset iphone-6-9,ipad-13 --langs en,es,fr,de,ja,zh-CN
1205
+
1206
+ # 8. Validate
1207
+ appshot validate --strict
1208
+
1209
+ # 9. Output ready in final/
1210
+ ```
1211
+
1212
+ ### Consistent Marketing Screenshots
1213
+
1214
+ For identical device positioning across all screenshots:
876
1215
 
877
1216
  ```json
878
1217
  {
879
- "gradient": {
880
- "colors": ["#FF5733", "#FFC300"],
881
- "direction": "top-bottom"
882
- },
883
- "caption": {
884
- "fontsize": 64,
885
- "color": "#FFFFFF",
886
- "align": "center",
887
- "paddingTop": 100
888
- },
889
1218
  "devices": {
890
1219
  "iphone": {
891
- "input": "./screenshots/iphone",
892
1220
  "resolution": "1284x2778",
893
1221
  "autoFrame": false,
894
1222
  "preferredFrame": "iphone-16-pro-max-portrait",
1223
+ "frameScale": 0.85,
1224
+ "framePosition": 40,
1225
+ "partialFrame": true,
1226
+ "frameOffset": 25,
895
1227
  "captionBox": {
896
1228
  "autoSize": false,
897
1229
  "minHeight": 320,
898
1230
  "maxHeight": 320,
899
1231
  "maxLines": 3
900
- },
901
- "frameScale": 0.85,
902
- "framePosition": 40
1232
+ }
903
1233
  }
904
1234
  }
905
1235
  }
906
1236
  ```
907
1237
 
908
- With this configuration:
909
- - βœ… All devices are exactly the same size
910
- - βœ… All devices are at the same vertical position
911
- - βœ… Caption area is always 320px tall
912
- - βœ… Long captions truncate instead of expanding
913
- - βœ… Professional, consistent App Store screenshots
1238
+ ### Brand Guidelines Compliance
1239
+
1240
+ ```json
1241
+ {
1242
+ "gradient": {
1243
+ "colors": ["#BrandColor1", "#BrandColor2"],
1244
+ "direction": "diagonal"
1245
+ },
1246
+ "caption": {
1247
+ "font": "Brand Font Name",
1248
+ "fontsize": 72,
1249
+ "color": "#BrandTextColor",
1250
+ "align": "center"
1251
+ }
1252
+ }
1253
+ ```
1254
+
1255
+ ### Multi-Device Campaign
1256
+
1257
+ ```bash
1258
+ # Configure each device
1259
+ appshot style --device iphone
1260
+ appshot style --device ipad
1261
+ appshot style --device mac
1262
+
1263
+ # Build all at once
1264
+ appshot build --devices iphone,ipad,mac --langs en,es,fr
1265
+
1266
+ # Output structure (language subdirectories):
1267
+ # final/
1268
+ # iphone/
1269
+ # en/ es/ fr/
1270
+ # ipad/
1271
+ # en/ es/ fr/
1272
+ # mac/
1273
+ # en/ es/ fr/
1274
+ ```
1275
+
1276
+ ### A/B Testing Different Styles
914
1277
 
915
- #### Interactive Styling
1278
+ ```bash
1279
+ # Version A - Ocean gradient
1280
+ appshot gradients --apply ocean
1281
+ appshot build --devices iphone --output final-ocean
916
1282
 
917
- Run `appshot style --device iphone` for step-by-step configuration:
918
- 1. **Partial Frame** - Choose whether to cut off device bottom
919
- 2. **Frame Offset** - Select how much to cut (15%, 25%, 35%, 50%, or custom)
920
- 3. **Frame Position** - Set vertical position (top, center, bottom, or 0-100%)
921
- 4. **Frame Scale** - Adjust device size
922
- 5. **Caption Settings** - Customize text size, position, and box behavior
1283
+ # Version B - Sunset gradient
1284
+ appshot gradients --apply sunset
1285
+ appshot build --devices iphone --output final-sunset
923
1286
 
924
- #### Reset Styling
1287
+ # Version C - Monochrome
1288
+ appshot gradients --apply noir
1289
+ appshot build --devices iphone --output final-noir
1290
+ ```
1291
+
1292
+ ## πŸ”§ Troubleshooting
1293
+
1294
+ ### Common Issues
1295
+
1296
+ #### Screenshots Not Found
925
1297
 
926
- To reset a device to default settings:
927
1298
  ```bash
928
- appshot style --device iphone --reset
1299
+ # Check path configuration
1300
+ appshot check
1301
+
1302
+ # Verify screenshot location
1303
+ ls screenshots/iphone/
1304
+
1305
+ # Fix: Update config
1306
+ {
1307
+ "devices": {
1308
+ "iphone": {
1309
+ "input": "./correct/path/to/screenshots"
1310
+ }
1311
+ }
1312
+ }
929
1313
  ```
930
1314
 
931
- ## Agent-First Design πŸ€–
1315
+ #### Font Not Rendering
932
1316
 
933
- Appshot is designed to work seamlessly with LLM agents and automation tools. The CLI interface is structured for predictable, scriptable operations that agents can easily control.
1317
+ ```bash
1318
+ # 1. Validate font availability
1319
+ appshot fonts --validate "Font Name"
934
1320
 
935
- ### Working with AI Agents
1321
+ # 2. Use fallback font
1322
+ appshot fonts --recommended
936
1323
 
937
- - **Structured Commands** - All commands have consistent, predictable outputs
938
- - **JSON Support** - Most commands support `--json` output for agent parsing
939
- - **Error Codes** - Consistent exit codes for automation workflows
940
- - **File-Based Config** - Agents can modify `.appshot/config.json` directly
941
- - **Batch Operations** - Process multiple devices/languages in single commands
1324
+ # 3. Set web-safe font
1325
+ {
1326
+ "caption": {
1327
+ "font": "Arial" // Always works
1328
+ }
1329
+ }
1330
+ ```
942
1331
 
943
- ### MCP (Model Context Protocol) Integration
1332
+ #### Translation Not Working
944
1333
 
945
- Appshot works perfectly with MCP screenshot tools:
1334
+ ```bash
1335
+ # Check API key
1336
+ echo $OPENAI_API_KEY
1337
+
1338
+ # Test with different model
1339
+ appshot caption --device iphone --translate --model gpt-4o-mini
1340
+
1341
+ # Check rate limits
1342
+ # Wait 60 seconds between large batches
1343
+ ```
1344
+
1345
+ #### Blurry Output
946
1346
 
947
1347
  ```bash
948
- # Agent takes screenshot via MCP
949
- mcp-screenshot capture --app "MyApp" --output ./screenshots/iphone/home.png
1348
+ # Ensure high-res input
1349
+ # Minimum: 1242x2208 for iPhone
950
1350
 
951
- # Agent processes with appshot
1351
+ # Check scaling
1352
+ {
1353
+ "devices": {
1354
+ "iphone": {
1355
+ "frameScale": 1.0 // No scaling
1356
+ }
1357
+ }
1358
+ }
1359
+ ```
1360
+
1361
+ #### Memory Issues with Large Batches
1362
+
1363
+ ```bash
1364
+ # Reduce concurrency
1365
+ appshot build --concurrency 2
1366
+
1367
+ # Process in batches
952
1368
  appshot build --devices iphone
1369
+ appshot build --devices ipad
953
1370
  ```
954
1371
 
955
- ### Agent Workflow Example
1372
+ ### Performance Tips
956
1373
 
957
- ```python
958
- # Example: Agent automating screenshot generation
959
- def generate_app_store_screenshots():
960
- # 1. Agent captures screenshots from simulator/device
961
- run_command("xcrun simctl io booted screenshot screen1.png")
962
-
963
- # 2. Agent initializes appshot project
964
- run_command("appshot init")
965
-
966
- # 3. Agent configures styling
967
- modify_json(".appshot/config.json", {
968
- "gradient": {"colors": ["#FF5733", "#FFC300"]},
969
- "devices": {"iphone": {"frameScale": 0.85}}
970
- })
971
-
972
- # 4. Agent adds captions programmatically
973
- modify_json(".appshot/captions/iphone.json", {
974
- "screen1.png": "Your perfect companion"
975
- })
976
-
977
- # 5. Agent builds final screenshots
978
- run_command("appshot build --devices iphone")
1374
+ 1. **Use appropriate concurrency**
1375
+ ```bash
1376
+ # For 8GB RAM
1377
+ appshot build --concurrency 3
1378
+
1379
+ # For 16GB+ RAM
1380
+ appshot build --concurrency 8
1381
+ ```
1382
+
1383
+ 2. **Optimize images before processing**
1384
+ ```bash
1385
+ # Use imagemagick to optimize
1386
+ mogrify -quality 95 screenshots/iphone/*.png
1387
+ ```
1388
+
1389
+ 3. **Cache translations**
1390
+ - Translations are automatically cached
1391
+ - Reuse improves speed and reduces costs
1392
+
1393
+ 4. **Use preview mode for testing**
1394
+ ```bash
1395
+ appshot build --preview
1396
+ ```
1397
+
1398
+ ### Error Messages
1399
+
1400
+ | Error | Cause | Solution |
1401
+ |-------|-------|----------|
1402
+ | `Frame not found` | Missing frame file | Run `appshot check --fix` |
1403
+ | `Invalid resolution` | Wrong dimensions | Check with `appshot validate` |
1404
+ | `Font validation failed` | Font not available | Use `appshot fonts` to find alternatives |
1405
+ | `API rate limit` | Too many requests | Add delays or reduce batch size |
1406
+ | `Out of memory` | Large images | Reduce concurrency or image size |
1407
+
1408
+ ## πŸ§‘β€πŸ’» Development
1409
+
1410
+ ### Building from Source
1411
+
1412
+ ```bash
1413
+ # Clone repository
1414
+ git clone https://github.com/chrisvanbuskirk/appshot.git
1415
+ cd appshot
1416
+
1417
+ # Install dependencies
1418
+ npm install
1419
+
1420
+ # Build TypeScript
1421
+ npm run build
1422
+
1423
+ # Run tests
1424
+ npm test
1425
+
1426
+ # Link for local development
1427
+ npm link
1428
+
1429
+ # Run in development mode
1430
+ npm run dev -- build --devices iphone
1431
+ ```
1432
+
1433
+ ### Project Structure
1434
+
1435
+ ```
1436
+ appshot/
1437
+ β”œβ”€β”€ src/
1438
+ β”‚ β”œβ”€β”€ cli.ts # Entry point
1439
+ β”‚ β”œβ”€β”€ commands/ # Command implementations
1440
+ β”‚ β”œβ”€β”€ core/ # Core functionality
1441
+ β”‚ β”œβ”€β”€ services/ # Services (fonts, translation)
1442
+ β”‚ └── types.ts # TypeScript definitions
1443
+ β”œβ”€β”€ tests/ # Test files
1444
+ β”œβ”€β”€ frames/ # Device frame images
1445
+ └── examples/ # Example projects
979
1446
  ```
980
1447
 
981
- ### Why CLI-Only?
1448
+ ### Testing
1449
+
1450
+ Appshot includes comprehensive test coverage with unit tests, integration tests, and CI/CD validation.
1451
+
1452
+ #### Test Suites
1453
+
1454
+ - **Unit Tests** (50+ test files)
1455
+ - Device detection and frame selection
1456
+ - Gradient rendering and presets
1457
+ - Font validation and fallbacks
1458
+ - Caption positioning and text wrapping
1459
+ - Multi-language support
1460
+ - App Store specifications validation
982
1461
 
983
- - **Predictable** - Agents need consistent, scriptable interfaces
984
- - **Composable** - Integrates with any automation pipeline
985
- - **Version Control** - All config is text files, perfect for Git
986
- - **Fast** - No UI overhead, pure processing power
987
- - **Universal** - Works on any system with Node.js
1462
+ - **Integration Tests** (`tests/integration/`)
1463
+ - Full CLI command testing
1464
+ - End-to-end workflow validation
1465
+ - Multi-platform compatibility
1466
+ - Error handling scenarios
1467
+
1468
+ - **CI/CD Testing**
1469
+ - Automated testing on every PR
1470
+ - Multi-OS testing (Ubuntu, macOS, Windows)
1471
+ - Multi-Node version testing (18.x, 20.x, 22.x)
1472
+ - Visual validation workflows
1473
+ - Screenshot artifact generation
1474
+
1475
+ ```bash
1476
+ # Run all tests
1477
+ npm test
1478
+
1479
+ # Run specific test
1480
+ npm test -- fonts.test.ts
1481
+
1482
+ # Run integration tests
1483
+ npm test -- tests/integration/cli-integration.test.ts
1484
+
1485
+ # Watch mode
1486
+ npm run test:watch
1487
+
1488
+ # Run with coverage
1489
+ npm run test:coverage
1490
+ ```
988
1491
 
989
- ## Roadmap
1492
+ ### Contributing
990
1493
 
991
- - [x] Official App Store specifications support
992
- - [x] Caption positioning (above/overlay)
1494
+ We welcome contributions! Please:
1495
+
1496
+ 1. Fork the repository
1497
+ 2. Create a feature branch
1498
+ 3. Add tests for new features
1499
+ 4. Ensure all tests pass
1500
+ 5. Submit a pull request
1501
+
1502
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
1503
+
1504
+ ## πŸ—ΊοΈ Roadmap
1505
+
1506
+ ### Completed βœ…
1507
+ - [x] Official App Store specifications
1508
+ - [x] Caption positioning (above/overlay)
993
1509
  - [x] Partial frame support
994
1510
  - [x] Intelligent caption autocomplete
995
1511
  - [x] Apple Watch optimizations
996
1512
  - [x] Gradient presets system (24+ gradients)
997
- - [x] **AI-Powered Translations** - Translate captions using OpenAI models (GPT-4o, GPT-5, o1, o3)
998
- - [ ] **MCP Integration Guide** - Documentation for screenshot tool integration
999
- - [ ] **Agent API Mode** - Structured JSON input/output for all commands
1000
- - [ ] **Android Device Support** - Google Play Store specifications
1001
- - [ ] **Batch Config Files** - Process multiple configurations in one run
1002
- - [ ] **Screenshot Validation API** - Programmatic validation for CI/CD
1003
- - [ ] **Auto-Caption Generation** - Use AI to generate marketing captions from screenshots
1004
- - [ ] **Smart Frame Detection** - AI-powered frame selection based on screenshot content
1005
- - [ ] **Pipeline Mode** - Stream processing for large batches
1006
- - [ ] **WebP/AVIF Support** - Modern image formats for smaller files
1007
- - [ ] **Differential Builds** - Only rebuild changed screenshots
1008
-
1009
- ## Support
1010
-
1011
- - [Report issues](https://github.com/chrisvanbuskirk/appshot/issues)
1012
- - [Request features](https://github.com/chrisvanbuskirk/appshot/issues/new?labels=enhancement)
1013
- - [Documentation](https://github.com/chrisvanbuskirk/appshot/wiki)
1513
+ - [x] AI-Powered Translations (GPT-4o, GPT-5, o1, o3)
1514
+ - [x] Comprehensive Font System (v0.4.0)
1515
+
1516
+ ### In Progress 🚧
1517
+ - [ ] MCP Integration Guide
1518
+ - [ ] Agent API Mode
1519
+
1520
+ ### Planned πŸ“‹
1521
+ - [ ] Android Device Support (Google Play Store)
1522
+ - [ ] Batch Config Files
1523
+ - [ ] Screenshot Validation API
1524
+ - [ ] Auto-Caption Generation
1525
+ - [ ] Smart Frame Detection
1526
+ - [ ] Pipeline Mode
1527
+ - [ ] WebP/AVIF Support
1528
+ - [ ] Differential Builds
1529
+
1530
+ ## πŸ“„ License & Support
1531
+
1532
+ ### License
1533
+
1534
+ MIT Β© Chris Van Buskirk
1535
+
1536
+ ### Support
1537
+
1538
+ - πŸ› [Report Issues](https://github.com/chrisvanbuskirk/appshot/issues)
1539
+ - πŸ’‘ [Request Features](https://github.com/chrisvanbuskirk/appshot/issues/new?labels=enhancement)
1540
+ - πŸ“š [Documentation Wiki](https://github.com/chrisvanbuskirk/appshot/wiki)
1541
+ - πŸ’¬ [Discussions](https://github.com/chrisvanbuskirk/appshot/discussions)
1542
+
1543
+ ### Security
1544
+
1545
+ For security vulnerabilities, please see [SECURITY.md](SECURITY.md).
1546
+
1547
+ ### NPM Package
1548
+
1549
+ - πŸ“¦ [appshot-cli on NPM](https://www.npmjs.com/package/appshot-cli)
1550
+ - πŸ”„ Latest version: 0.4.0
1551
+ - ⬇️ Weekly downloads: ![npm](https://img.shields.io/npm/dw/appshot-cli)
1552
+
1553
+ ---
1554
+
1555
+ <div align="center">
1556
+ Built with ❀️ for developers and AI agents who automate everything.
1557
+ </div>