appshot-cli 0.9.1 → 1.0.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 (57) hide show
  1. package/README.md +208 -98
  2. package/dist/cli.js +6 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/build.d.ts.map +1 -1
  5. package/dist/commands/build.js +9 -0
  6. package/dist/commands/build.js.map +1 -1
  7. package/dist/commands/frame.d.ts.map +1 -1
  8. package/dist/commands/frame.js +11 -2
  9. package/dist/commands/frame.js.map +1 -1
  10. package/dist/commands/mcp.d.ts +3 -0
  11. package/dist/commands/mcp.d.ts.map +1 -0
  12. package/dist/commands/mcp.js +19 -0
  13. package/dist/commands/mcp.js.map +1 -0
  14. package/dist/commands/skill.d.ts +3 -0
  15. package/dist/commands/skill.d.ts.map +1 -0
  16. package/dist/commands/skill.js +119 -0
  17. package/dist/commands/skill.js.map +1 -0
  18. package/dist/core/compose.d.ts +1 -0
  19. package/dist/core/compose.d.ts.map +1 -1
  20. package/dist/core/compose.js +85 -140
  21. package/dist/core/compose.js.map +1 -1
  22. package/dist/core/layout-utils.d.ts +12 -0
  23. package/dist/core/layout-utils.d.ts.map +1 -0
  24. package/dist/core/layout-utils.js +28 -0
  25. package/dist/core/layout-utils.js.map +1 -0
  26. package/dist/core/text-utils.d.ts +1 -1
  27. package/dist/core/text-utils.d.ts.map +1 -1
  28. package/dist/core/text-utils.js +5 -9
  29. package/dist/core/text-utils.js.map +1 -1
  30. package/dist/mcp/cli-options.d.ts +112 -0
  31. package/dist/mcp/cli-options.d.ts.map +1 -0
  32. package/dist/mcp/cli-options.js +158 -0
  33. package/dist/mcp/cli-options.js.map +1 -0
  34. package/dist/mcp/server.d.ts +2 -0
  35. package/dist/mcp/server.d.ts.map +1 -0
  36. package/dist/mcp/server.js +1149 -0
  37. package/dist/mcp/server.js.map +1 -0
  38. package/dist/services/doctor.d.ts.map +1 -1
  39. package/dist/services/doctor.js +2 -1
  40. package/dist/services/doctor.js.map +1 -1
  41. package/dist/templates/registry.d.ts.map +1 -1
  42. package/dist/templates/registry.js +49 -159
  43. package/dist/templates/registry.js.map +1 -1
  44. package/dist/utils/filename-caption.d.ts +9 -0
  45. package/dist/utils/filename-caption.d.ts.map +1 -0
  46. package/dist/utils/filename-caption.js +19 -0
  47. package/dist/utils/filename-caption.js.map +1 -0
  48. package/dist/version.d.ts +2 -0
  49. package/dist/version.d.ts.map +1 -0
  50. package/dist/version.js +5 -0
  51. package/dist/version.js.map +1 -0
  52. package/package.json +7 -4
  53. package/skill/SKILL.md +225 -0
  54. package/skill/references/fonts.md +55 -0
  55. package/skill/references/gradients.md +69 -0
  56. package/skill/references/templates.md +170 -0
  57. package/skill/references/troubleshooting.md +228 -0
@@ -0,0 +1,228 @@
1
+ # Troubleshooting Guide
2
+
3
+ Common issues and solutions when using appshot.
4
+
5
+ ---
6
+
7
+ ## Project Setup Issues
8
+
9
+ ### "Configuration not found"
10
+
11
+ **Cause:** No `.appshot/config.json` exists in the project.
12
+
13
+ **Solution:**
14
+ ```
15
+ appshot.init with force: true
16
+ ```
17
+
18
+ ### "Input directory not found"
19
+
20
+ **Cause:** Screenshot folder doesn't exist or is empty.
21
+
22
+ **Solution:**
23
+ 1. Create the directory: `screenshots/iphone/`
24
+ 2. Add PNG/JPG screenshots to the folder
25
+ 3. Run build again
26
+
27
+ ---
28
+
29
+ ## Caption Issues
30
+
31
+ ### Captions not appearing
32
+
33
+ **Causes:**
34
+ 1. No captions set for the screenshots
35
+ 2. Caption file is empty
36
+ 3. Wrong language specified
37
+
38
+ **Solutions:**
39
+ ```
40
+ # Check current captions
41
+ appshot.captions with device: "iphone", action: "list"
42
+
43
+ # Auto-generate from filenames
44
+ appshot.captions with device: "iphone", action: "auto"
45
+
46
+ # Set manually
47
+ appshot.captions with device: "iphone", action: "set", filename: "screen.png", caption: "My Caption"
48
+ ```
49
+
50
+ ### Caption text cut off
51
+
52
+ **Cause:** Caption too long for the available space.
53
+
54
+ **Solutions:**
55
+ 1. Use shorter text (2-3 words ideal)
56
+ 2. Adjust caption box settings:
57
+ ```
58
+ appshot.config with device: "iphone", captionPosition: "above"
59
+ ```
60
+
61
+ ### Wrong font displaying
62
+
63
+ **Cause:** Font not available on system.
64
+
65
+ **Solution:**
66
+ ```
67
+ # Check font availability
68
+ appshot.fonts with action: "validate", font: "SF Pro Display"
69
+
70
+ # List embedded fonts (always available)
71
+ appshot.fonts with action: "embedded"
72
+ ```
73
+
74
+ **Embedded fonts:** Inter, Poppins, Montserrat, DM Sans, Roboto, Open Sans, Lato, Work Sans, JetBrains Mono, Fira Code
75
+
76
+ ---
77
+
78
+ ## Frame Issues
79
+
80
+ ### "No matching frame found"
81
+
82
+ **Cause:** Screenshot dimensions don't match any known device.
83
+
84
+ **Solutions:**
85
+ 1. Use standard device resolutions
86
+ 2. Check screenshot dimensions match config
87
+
88
+ **Common iPhone resolutions:**
89
+ - 1290x2796 (iPhone 15 Pro Max, 16 Plus)
90
+ - 1179x2556 (iPhone 15 Pro, 16)
91
+ - 1206x2622 (iPhone 16 Pro)
92
+
93
+ ### Frame looks wrong / misaligned
94
+
95
+ **Cause:** Screenshot orientation doesn't match frame.
96
+
97
+ **Solution:** Ensure portrait screenshots are taller than wide, landscape wider than tall.
98
+
99
+ ---
100
+
101
+ ## Build Issues
102
+
103
+ ### Build produces blank/black images
104
+
105
+ **Causes:**
106
+ 1. Screenshot files are corrupted
107
+ 2. Sharp module issue
108
+
109
+ **Solutions:**
110
+ ```
111
+ # Run diagnostics
112
+ appshot.doctor
113
+ ```
114
+
115
+ ### "Failed to load screenshot"
116
+
117
+ **Cause:** File is not a valid image or is corrupted.
118
+
119
+ **Solution:**
120
+ 1. Verify the file opens in an image viewer
121
+ 2. Re-export from the source
122
+ 3. Ensure file extension matches actual format
123
+
124
+ ### Build is slow
125
+
126
+ **Solutions:**
127
+ ```
128
+ # Reduce concurrency on low-memory systems
129
+ appshot.build with concurrency: 2
130
+
131
+ # Build specific devices only
132
+ appshot.build with devices: ["iphone"]
133
+
134
+ # Use preview mode for testing
135
+ appshot.build with preview: true
136
+ ```
137
+
138
+ ---
139
+
140
+ ## Background Issues
141
+
142
+ ### Background image not appearing
143
+
144
+ **Causes:**
145
+ 1. Image path incorrect
146
+ 2. Mode set to gradient instead of image/auto
147
+
148
+ **Solutions:**
149
+ ```
150
+ # Set background explicitly
151
+ appshot.backgrounds with action: "set", image: "./bg.png", fit: "cover"
152
+
153
+ # Or use auto-detect (looks for background.png in device folders)
154
+ appshot.build with autoBackground: true
155
+ ```
156
+
157
+ ### Background looks stretched/cropped
158
+
159
+ **Solution:** Change fit mode:
160
+ ```
161
+ appshot.backgrounds with action: "set", image: "./bg.png", fit: "contain"
162
+ ```
163
+
164
+ Fit modes:
165
+ - `cover` - Fill entire area, may crop (default)
166
+ - `contain` - Show entire image, may letterbox
167
+ - `fill` - Stretch to fill (may distort)
168
+ - `scale-down` - Like contain but never upscale
169
+
170
+ ---
171
+
172
+ ## Validation Issues
173
+
174
+ ### "Resolution mismatch"
175
+
176
+ **Cause:** Screenshot doesn't match App Store requirements.
177
+
178
+ **Solution:**
179
+ ```
180
+ # Check required specs
181
+ appshot.specs with device: "iphone", required: true
182
+
183
+ # Use presets for correct sizing
184
+ appshot.build with presets: ["iphone-6-9", "ipad-13"]
185
+ ```
186
+
187
+ ### Missing required sizes
188
+
189
+ **Required for App Store:**
190
+ - iPhone 6.9": 1320x2868 or 1290x2796
191
+ - iPad 13": 2064x2752 or 2048x2732
192
+
193
+ ---
194
+
195
+ ## System Issues
196
+
197
+ ### Sharp module errors
198
+
199
+ **Solution:**
200
+ ```
201
+ # Run doctor to check system
202
+ appshot.doctor
203
+
204
+ # Reinstall if needed (in terminal)
205
+ npm rebuild sharp
206
+ ```
207
+
208
+ ### Permission denied errors
209
+
210
+ **Cause:** Cannot write to output directory.
211
+
212
+ **Solution:** Check file permissions on `final/` directory.
213
+
214
+ ---
215
+
216
+ ## Quick Diagnostics
217
+
218
+ Run the doctor command to check all systems:
219
+ ```
220
+ appshot.doctor
221
+ ```
222
+
223
+ This checks:
224
+ - Node.js version (requires 18+)
225
+ - Sharp module installation
226
+ - Font detection capability
227
+ - File system permissions
228
+ - Frame asset availability