studio-lumiere-cli 0.1.7 → 0.1.9

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,550 +1,61 @@
1
1
  # Studio Lumiere CLI
2
2
 
3
- Local SDK + CLI for AI-powered jewelry product photography. Generate editorial-quality images, videos, and compositions from reference jewelry photos.
4
-
5
- ```bash
6
- npx studio-lumiere-cli <command> [options]
7
- ```
3
+ Local SDK + CLI for AI-powered jewelry product photography. This package lives
4
+ inside the main repo and pulls its options, templates, and prompt logic from
5
+ the Studio Lumiere source of truth.
8
6
 
9
7
  ## Setup
10
8
 
11
- 1. Install dependencies
12
-
13
9
  ```
10
+ cd studio-cli
14
11
  npm install
15
12
  ```
16
13
 
17
- 2. Create `.env`
14
+ Create `.env` (or copy `studio-cli/.env.example`):
18
15
 
19
16
  ```
20
17
  GEMINI_API_KEY=your_key_here
21
18
  LUMIERE_OUTPUT_DIR=outputs
22
19
  ```
23
20
 
24
- ---
25
-
26
- ## Commands
27
-
28
- | Command | Description |
29
- |---------|-------------|
30
- | [`generate`](#generate) | Generate styled jewelry product images |
31
- | [`refine`](#refine) | Apply refinement instructions to an existing image |
32
- | [`upscale`](#upscale) | Upscale an image to higher resolution |
33
- | [`muse`](#muse) | Create a consistent character reference ("Muse") |
34
- | [`video`](#video) | Generate video from a text prompt |
35
- | [`tired-girl`](#tired-girl) | Generate "before" / casual aesthetic images |
36
- | [`annotate`](#annotate) | Overlay text on an image |
37
- | [`grid`](#grid) | Combine multiple images into a grid layout |
38
- | [`list`](#list) | List available templates, backgrounds, vibes, etc. |
39
-
40
- ---
41
-
42
- ## generate
43
-
44
- Generate styled jewelry product images using AI.
45
-
46
- ```bash
47
- lumiere generate --images <paths> --template <id> [options]
48
- ```
49
-
50
- ### Required
51
-
52
- | Flag | Description |
53
- |------|-------------|
54
- | `--images <paths>` | Comma-separated input image paths |
55
- | `--template <id>` | Template ID (see [Templates](#templates)) |
56
-
57
- ### Customization
58
-
59
- | Flag | Description |
60
- |------|-------------|
61
- | `--detail <id>` | Primary customization (template-specific) |
62
- | `--secondary-detail <id>` | Secondary customization |
63
- | `--tertiary-detail <id>` | Tertiary customization |
64
- | `--quaternary-detail <id>` | Quaternary customization |
65
- | `--quinary-detail <id>` | Quinary customization |
66
- | `--ethnicity <id>` | Model ethnicity |
67
- | `--skin-tone <id>` | Model skin tone |
68
- | `--hair-color <id>` | Model hair color |
69
- | `--background <id>` | Background color/texture |
70
- | `--background-type <id>` | Background type (studio, interior, exterior, texture) |
71
- | `--vibe <id>` | Photography mood/style |
72
- | `--photography-style <id>` | Overall photography style |
73
- | `--resolution <id>` | Output aspect ratio (default: `portrait`) |
74
- | `--occasion <id>` | Special occasion theme |
75
-
76
- ### Generation
77
-
78
- | Flag | Description |
79
- |------|-------------|
80
- | `--quantity <n>` | Number of images to generate (default: `1`) |
81
- | `--muse-id <id>` | Muse ID for consistent model appearance |
82
- | `--muse-images <paths>` | Comma-separated Muse reference image paths |
83
- | `--no-enhance` | Skip LLM prompt enhancement |
84
-
85
- ### Example
86
-
87
- ```bash
88
- lumiere generate \
89
- --images "ring.jpg" \
90
- --template hand_model \
91
- --detail nail_red \
92
- --background velvet_black \
93
- --vibe golden_hour \
94
- --quantity 4
95
- ```
96
-
97
- ---
98
-
99
- ## refine
100
-
101
- Apply refinement instructions to an existing generated image.
102
-
103
- ```bash
104
- lumiere refine --image <path> --instruction <text> [options]
105
- ```
106
-
107
- | Flag | Description |
108
- |------|-------------|
109
- | `--image <path>` | **(required)** Path to image to refine |
110
- | `--instruction <text>` | **(required)** Refinement instruction |
111
- | `--size <percent>` | Resize jewelry to given percentage (e.g. `80` = smaller, `120` = larger) |
112
-
113
- ```bash
114
- lumiere refine --image "output.png" --instruction "make the background warmer"
115
- lumiere refine --image "output.png" --instruction "adjust jewelry" --size 80
116
- ```
117
-
118
- ---
119
-
120
- ## upscale
121
-
122
- Upscale an image to higher resolution.
123
-
124
- ```bash
125
- lumiere upscale --image <path> [--scale <n>]
126
- ```
127
-
128
- | Flag | Description |
129
- |------|-------------|
130
- | `--image <path>` | **(required)** Path to image |
131
- | `--scale <n>` | Scale factor (default: `2`) |
132
-
133
- ---
134
-
135
- ## muse
136
-
137
- Create a Muse (consistent character reference) from a source image. Used with the `half_body_muse` template for identity-consistent generations.
138
-
139
- ```bash
140
- lumiere muse --name <name> --source <path> [--variations <n>]
141
- ```
142
-
143
- | Flag | Description |
144
- |------|-------------|
145
- | `--name <name>` | **(required)** Name for the Muse |
146
- | `--source <path>` | **(required)** Path to source image |
147
- | `--variations <n>` | Number of variations to generate (default: `3`) |
148
-
149
- ```bash
150
- lumiere muse --name "Sarah" --source "reference.jpg"
151
- lumiere generate --images "necklace.jpg" --template half_body_muse --muse-id sarah
152
- ```
153
-
154
- ---
155
-
156
- ## video
21
+ ## Development
157
22
 
158
- Generate a short video from a text prompt.
159
-
160
- ```bash
161
- lumiere video --prompt <text> [options]
162
23
  ```
163
-
164
- | Flag | Description |
165
- |------|-------------|
166
- | `--prompt <text>` | **(required)** Video description |
167
- | `--aspect <ratio>` | Aspect ratio (`1:1`, `3:4`, `9:16`, `16:9`) |
168
- | `--duration <seconds>` | Duration in seconds |
169
-
170
- Video-enabled templates: `hand_model`, `neck_model`, `ear_model`, `flatlay_creative`, `floating_minimal`, `half_body_muse`.
171
-
172
- ---
173
-
174
- ## tired-girl
175
-
176
- Generate "tired girl" / "before" aesthetic images showing a model in casual, un-styled looks (no jewelry).
177
-
178
- ```bash
179
- lumiere tired-girl [options]
24
+ npm run dev -- generate --images "ring.jpg" --template hand_model --quantity 2
180
25
  ```
181
26
 
182
- | Flag | Description |
183
- |------|-------------|
184
- | `--muse-id <id>` | Muse ID for identity reference |
185
- | `--image <path>` | Single reference image (if no Muse) |
186
- | `--styles <ids>` | Comma-separated style IDs |
187
- | `--quantity <n>` | Number of images (default: `1`) |
27
+ ## Sync From Studio
188
28
 
189
- ### Available styles
29
+ Use this to copy the latest Studio Lumiere prompt and option files into
30
+ `studio-cli/src/studio` before building or running locally:
190
31
 
191
- | ID | Description |
192
- |----|-------------|
193
- | `tired` | Slightly tired, soft under-eye shadows, relaxed expression |
194
- | `morning` | Freshly awake, morning light, sleepy energy |
195
- | `no_makeup` | Completely bare faced |
196
- | `crazy_hair` | Messy, unstyled wild hair |
197
- | `pyjama` | Cozy pajamas or loungewear |
198
-
199
- ```bash
200
- lumiere tired-girl --muse-id sarah --styles "tired,no_makeup" --quantity 2
201
32
  ```
202
-
203
- ---
204
-
205
- ## annotate
206
-
207
- Overlay text on an image with customizable styling.
208
-
209
- ```bash
210
- lumiere annotate --input <path> --output <path> --text <text> [options]
211
- ```
212
-
213
- ### Required
214
-
215
- | Flag | Description |
216
- |------|-------------|
217
- | `--input <path>` | Input image path |
218
- | `--output <path>` | Output image path |
219
- | `--text <text>` | Text to overlay |
220
-
221
- ### Text styling
222
-
223
- | Flag | Default | Description |
224
- |------|---------|-------------|
225
- | `--font <name>` | `Poppins` | Font family |
226
- | `--size <px>` | auto | Font size in pixels |
227
- | `--weight <n>` | `700` | Font weight |
228
- | `--color <hex>` | `#FFFFFF` | Text color |
229
- | `--stroke-color <value>` | `rgba(0,0,0,0.6)` | Text outline color |
230
- | `--stroke-width <px>` | `fontSize * 0.08` | Text outline width |
231
-
232
- ### Banner
233
-
234
- | Flag | Default | Description |
235
- |------|---------|-------------|
236
- | `--banner` | off | Enable semi-transparent banner behind text |
237
- | `--banner-color <value>` | `rgba(0,0,0,0.45)` | Banner color |
238
- | `--banner-padding <px>` | `fontSize * 0.6` | Banner padding |
239
- | `--banner-radius <px>` | `fontSize * 0.4` | Banner corner radius |
240
-
241
- ### Position
242
-
243
- | Flag | Default | Description |
244
- |------|---------|-------------|
245
- | `--position <pos>` | `bottom-center` | One of: `top-center`, `top-left`, `top-right`, `bottom-center`, `bottom-center-high`, `bottom-left`, `bottom-right`, `center` |
246
- | `--padding <px>` | auto | Padding from edges |
247
- | `--max-width <ratio>` | auto | Max text width as ratio of image width (0-1) |
248
-
249
- ```bash
250
- lumiere annotate \
251
- --input "image.jpg" \
252
- --output "branded.jpg" \
253
- --text "New Collection" \
254
- --position bottom-center \
255
- --banner \
256
- --size 48
257
- ```
258
-
259
- ---
260
-
261
- ## grid
262
-
263
- Combine multiple images into a grid layout.
264
-
265
- ```bash
266
- lumiere grid --inputs <paths> --output <path> [options]
33
+ npm run sync
267
34
  ```
268
35
 
269
- | Flag | Default | Description |
270
- |------|---------|-------------|
271
- | `--inputs <paths>` | | **(required)** Comma-separated image paths |
272
- | `--output <path>` | | **(required)** Output image path |
273
- | `--columns <n>` | `2` | Number of columns |
274
- | `--rows <n>` | `2` | Number of rows |
275
- | `--padding <px>` | `20` | Padding between tiles |
276
- | `--background <hex>` | `#000000` | Background color |
277
- | `--tile-width <px>` | auto | Fixed tile width |
278
- | `--tile-height <px>` | auto | Fixed tile height |
279
-
280
- ```bash
281
- lumiere grid \
282
- --inputs "img1.jpg,img2.jpg,img3.jpg,img4.jpg" \
283
- --output "grid.jpg" \
284
- --columns 2 --rows 2 \
285
- --padding 10 --background "#FFFFFF"
286
- ```
36
+ ## Commands
287
37
 
288
- ---
38
+ The CLI exposes:
39
+ `generate`, `refine`, `upscale`, `muse`, `video`, `tired-girl`, `annotate`,
40
+ `before-after`, `grid`, `collate`, `list`.
289
41
 
290
- ## list
42
+ For full flag documentation and examples, see:
43
+ `studio-cli/.agents/skills/studio-lumiere-cli/SKILL.md`.
291
44
 
292
- List available options for any category. Output is JSON.
45
+ ## Project Layout
293
46
 
294
- ```bash
295
- lumiere list <type>
296
47
  ```
297
-
298
- | Type | Description |
299
- |------|-------------|
300
- | `templates` | All templates with their customization options |
301
- | `ethnicities` | Model ethnicity options |
302
- | `skin-tones` | Skin tone options |
303
- | `hair-colors` | Hair color options |
304
- | `backgrounds` | Background color/texture options |
305
- | `background-types` | Background type options |
306
- | `vibes` | Photography mood options |
307
- | `photography-styles` | Overall photography style options |
308
- | `resolutions` | Aspect ratio options |
309
- | `occasions` | Special occasion themes |
310
-
311
- ---
312
-
313
- ## Templates
314
-
315
- ### `hand_model` -- Hand Model
316
-
317
- Close-up of a model's hand, wrist, and forearm. Perfect for rings and bracelets.
318
-
319
- | Customization | Options |
320
- |---------------|---------|
321
- | **Nail Polish** (`--detail`) | `nail_nude` Soft Nude, `nail_red` Classic Red, `nail_french` French Manicure, `nail_natural` Natural & Clean, `nail_dark` Noir / Dark |
322
-
323
- ---
324
-
325
- ### `neck_model` -- Neckline Portrait
326
-
327
- Waist-up portrait focusing on the neck and collarbone. Ideal for necklaces and pendants.
328
-
329
- | Customization | Options |
330
- |---------------|---------|
331
- | **Wardrobe** (`--detail`) | `wear_skin` Bare Skin, `wear_silk` White Silk Shirt, `wear_black` Black Turtleneck, `wear_gown` Evening Gown, `wear_kaftan` Modern Kaftan |
332
- | **Makeup** (`--tertiary-detail`) | `makeup_none` Bare, `makeup_minimal` Minimal, `makeup_soft` Soft Glam, `makeup_full` Full Glam, `makeup_editorial` Editorial |
333
-
334
- ---
335
-
336
- ### `ear_model` -- Ear Detail
337
-
338
- Intimate side profile shot. Best for earrings.
339
-
340
- | Customization | Options |
341
- |---------------|---------|
342
- | **Hairstyle** (`--detail`) | `hair_tucked` Tucked Behind Ear, `hair_updo` Elegant Updo, `hair_waves` Loose Waves, `hair_sleek` Sleek & Straight |
343
- | **Makeup** (`--tertiary-detail`) | `makeup_none` Bare, `makeup_minimal` Minimal, `makeup_soft` Soft Glam, `makeup_full` Full Glam, `makeup_editorial` Editorial |
344
-
345
- ---
346
-
347
- ### `flatlay_creative` -- Creative Flatlay
348
-
349
- Artistic still-life composition on a surface. No model. Great for any jewelry type.
350
-
351
- | Customization | Options |
352
- |---------------|---------|
353
- | **Surface** (`--detail`) | `surf_marble` White Marble, `surf_stone` Dark Slate, `surf_velvet` Beige Velvet, `surf_wood` Aged Wood, `surf_sand` Fine Sand, `surf_travertine` Travertine, `surf_obsidian` Black Obsidian, `surf_mirrored` Mirrored Glass, `surf_brushed_metal` Brushed Metal, `surf_frosted_acrylic` Frosted Acrylic, `surf_pedestal` Geometric Pedestal, `surf_riser` Stone Riser |
354
-
355
- ---
356
-
357
- ### `floating_minimal` -- Floating Minimalist
358
-
359
- Jewelry suspended in mid-air with dramatic lighting. No model.
360
-
361
- | Customization | Options |
362
- |---------------|---------|
363
- | **Lighting** (`--detail`) | `light_soft` Soft & Diffused, `light_hard` Hard Contrast, `light_warm` Golden Glow, `light_cool` Cool Steel |
364
-
365
- ---
366
-
367
- ### `half_body_muse` -- The Editorial Muse
368
-
369
- Dynamic waist-up fashion shot. The only template that supports Muse (consistent model identity).
370
-
371
- | Customization | Options |
372
- |---------------|---------|
373
- | **Outfit** (`--detail`) | `outfit_director_choice` Creative Director's Choice, `outfit_blazer` Power Suit (Blazer), `outfit_tailored_jumpsuit` Tailored Jumpsuit, `outfit_evening` Evening Glamour, `outfit_leather_jacket` Leather Jacket, `outfit_linen` Resort Linen, `outfit_knit` Cashmere Knit, `outfit_silk` Silk Shirt, `outfit_turtleneck` Turtleneck, `outfit_tailored_trench` Tailored Trench |
374
- | **Nail Polish** (`--secondary-detail`) | `nail_nude` Soft Nude, `nail_red` Classic Red, `nail_french` French Manicure, `nail_natural` Natural & Clean, `nail_dark` Noir / Dark |
375
- | **Makeup** (`--tertiary-detail`) | `makeup_none` Bare, `makeup_minimal` Minimal, `makeup_soft` Soft Glam, `makeup_full` Full Glam, `makeup_editorial` Editorial |
376
- | **Pose** (`--quaternary-detail`) | `pose_winking`, `pose_grimace`, `pose_teasing`, `pose_kiss`, `pose_laughing`, `pose_pout`, `pose_power_tilt`, `pose_hand_ear`, `pose_profile`, `pose_over_shoulder`, `pose_peace` |
377
- | **Accessories & Styling** (`--quinary-detail`) | `accessory_sunglasses`, `accessory_silk_scarf`, `accessory_silk_headband`, `accessory_sheer_gloves`, `accessory_statement_belt`, `accessory_silk_bandana`, `accessory_silk_tie`, `accessory_hair_clip`, `accessory_beret`, `accessory_wide_brim_hat`, `accessory_leather_gloves` |
378
-
379
-
380
- ---
381
-
382
- ### `romance_proposal` -- Romance & Proposal
383
-
384
- Emotional engagement ring moments with a couple.
385
-
386
- | Customization | Options |
387
- |---------------|---------|
388
- | **Moment** (`--detail`) | `moment_proposal` The Proposal, `moment_said_yes` Just Said Yes, `moment_hand_in_hand` Hand in Hand, `moment_dinner` Intimate Dinner, `moment_promise` The Promise |
389
- | **Setting** (`--secondary-detail`) | `setting_garden` Garden, `setting_restaurant` Candlelit Restaurant, `setting_beach` Beach at Sunset, `setting_home` Cozy at Home, `setting_rooftop` Rooftop City Views, `setting_winter` Winter Snow |
390
- | **Nail Polish** (`--tertiary-detail`) | `nail_nude` Soft Nude, `nail_red` Classic Red, `nail_french` French Manicure, `nail_natural` Natural & Clean, `nail_dark` Noir / Dark |
391
-
392
- ---
393
-
394
- ### `museum_exhibit` -- Museum Exhibit
395
-
396
- Jewelry displayed as a priceless museum artifact. No model.
397
-
398
- | Customization | Options |
399
- |---------------|---------|
400
- | **Museum Style** (`--detail`) | `museum_classical` Classical Gallery, `museum_modern` Modern Art Museum, `museum_baroque` Baroque Palace, `museum_art_deco` Art Deco Gallery |
401
- | **Display Type** (`--secondary-detail`) | `display_vitrine` Glass Vitrine, `display_pedestal` Velvet Pedestal, `display_stand` Open Display, `display_wall` Wall Mount, `display_alcove` Illuminated Alcove |
402
-
403
- ---
404
-
405
- ### `romantic_mood` -- Romantic Mood
406
-
407
- Jewelry styled as a romantic still life with props. No model.
408
-
409
- | Customization | Options |
410
- |---------------|---------|
411
- | **Props** (`--detail`) | `prop_rose_petals` Rose Petals, `prop_candles` Candlelight, `prop_love_letter` Love Letter, `prop_silk_lace` Silk & Lace, `prop_fresh_roses` Fresh Roses, `prop_gift_box` The Gift |
412
- | **Mood** (`--secondary-detail`) | `mood_candlelight` Warm Candlelight, `mood_morning` Soft Morning Light, `mood_moody` Moody & Dark, `mood_golden` Golden Hour Glow, `mood_blush` Blush Pink Haze |
413
-
414
- ---
415
-
416
- ## Global Options
417
-
418
- ### Ethnicities (`--ethnicity`)
419
-
420
- | ID | Name |
421
- |----|------|
422
- | `european` | European |
423
- | `moroccan` | Moroccan |
424
- | `middle_east` | Middle Eastern |
425
- | `african` | African |
426
- | `asian` | East Asian |
427
-
428
- ### Skin Tones (`--skin-tone`)
429
-
430
- | ID | Name |
431
- |----|------|
432
- | `fair` | Porcelain |
433
- | `light` | Light |
434
- | `medium` | Tan |
435
- | `deep` | Deep |
436
- | `dark` | Ebony |
437
-
438
- ### Hair Colors (`--hair-color`)
439
-
440
- | ID | Name |
441
- |----|------|
442
- | `dark` | Dark / Black |
443
- | `brunette` | Brunette |
444
- | `blonde` | Blonde |
445
- | `red` | Red / Auburn |
446
- | `grey` | Silver / Grey |
447
-
448
- ### Backgrounds (`--background`)
449
-
450
- | ID | Name |
451
- |----|------|
452
- | `silk_cream` | Cream Silk |
453
- | `velvet_black` | Midnight Velvet |
454
- | `marble_white` | Carrara Marble |
455
- | `emerald_velvet` | Emerald Velvet |
456
- | `studio_grey` | Studio Grey |
457
- | `warm_beige` | Warm Beige |
458
- | `burgundy_velvet` | Burgundy Velvet |
459
- | `champagne_gold` | Champagne Gold |
460
- | `navy_sapphire` | Navy Sapphire |
461
- | `blush_rose` | Blush Rose |
462
- | `ivory_pearl` | Ivory Pearl |
463
- | `slate_charcoal` | Slate Charcoal |
464
-
465
- ### Background Types (`--background-type`)
466
-
467
- | ID | Name |
468
- |----|------|
469
- | `studio` | Studio Flat |
470
- | `interior` | Luxury Interior |
471
- | `exterior` | Outdoors |
472
- | `texture` | Macro Texture |
473
-
474
- ### Vibes (`--vibe`)
475
-
476
- | ID | Name |
477
- |----|------|
478
- | `golden_hour` | Golden Hour -- warm natural sunlight |
479
- | `moody_chic` | Moody Chic -- dramatic shadows, high contrast |
480
- | `clean_minimal` | Clean Minimal -- bright, airy, minimalist |
481
- | `romantic_soft` | Romantic -- soft focus, pastel tones |
482
-
483
- ### Photography Styles (`--photography-style`)
484
-
485
- | ID | Name |
486
- |----|------|
487
- | `ethereal_dream` | Ethereal Dream |
488
- | `heritage_luxury` | High-Flash Raw |
489
- | `modern_edge` | Modern Edge |
490
- | `soft_natural` | Chromatic Gel |
491
- | `acid_lofi` | Acid Infrared |
492
- | `cyber_grit` | Cyber-Grit Noir |
493
- | `cinematic_editorial` | Cinematic Editorial |
494
-
495
- ### Resolutions (`--resolution`)
496
-
497
- | ID | Aspect Ratio | Best for |
498
- |----|-------------|----------|
499
- | `square` | 1:1 | Instagram Feed |
500
- | `portrait` | 3:4 | Instagram Feed (vertical) |
501
- | `story` | 9:16 | Instagram Stories / Reels |
502
- | `landscape` | 16:9 | Website / Ads |
503
-
504
- ### Occasions (`--occasion`)
505
-
506
- Occasions inject cultural/thematic elements (plus decor when available). They do not auto-configure background or vibe.
507
-
508
- | ID | Name |
509
- |----|------|
510
- | `moroccan_wedding` | Moroccan Wedding |
511
- | `eid_fitr` | Eid al-Fitr |
512
- | `eid_adha` | Eid al-Adha |
513
- | `henna_night` | Henna Night |
514
- | `ramadan` | Ramadan |
515
- | `valentines` | Valentine's Day |
516
- | `mothers_day` | Mother's Day |
517
- | `birthday` | Birthday |
518
- | `anniversary` | Anniversary |
519
- | `graduation` | Graduation |
520
- | `christmas` | Christmas |
521
- | `new_year` | New Year |
522
-
523
- ---
524
-
525
- ## SDK Usage
526
-
527
- ```ts
528
- import { generateImages } from "studio-lumiere-cli";
529
-
530
- const result = await generateImages(
531
- { apiKey: "your-key", outputDir: "outputs" },
532
- {
533
- inputImages: ["./ring.jpg"],
534
- quantity: 4,
535
- selections: {
536
- templateId: "hand_model",
537
- detailId: "nail_red",
538
- backgroundId: "velvet_black",
539
- vibeId: "golden_hour",
540
- resolutionId: "portrait",
541
- },
542
- }
543
- );
48
+ studio-cli/
49
+ src/
50
+ cli.ts
51
+ index.ts
52
+ clients/
53
+ config/
54
+ image/
55
+ pipelines/
56
+ prompt/
57
+ storage/
58
+ studio/
59
+ scripts/
60
+ sync-studio.mjs
544
61
  ```
545
-
546
- ## Notes
547
-
548
- - Templates, backgrounds, vibes, and all shared options are synced from the main Studio Lumiere web app at build time (`npm run sync`). The CLI always matches the web app.
549
- - The Muse flow generates variations and stores a local `muses.json` index under your output directory.
550
- - Video generation uses Veo via the Gemini SDK and returns an operation name plus the video file when available.
package/dist/cli.js CHANGED
@@ -1,9 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
  import "dotenv/config";
3
3
  import { Command } from "commander";
4
- import { generateImages, refineImage, upscaleImage, generateTiredGirl, createMuse, generateVideo, annotateImage, createImageGrid, TEMPLATES, ETHNICITIES, SKIN_TONES, HAIR_COLORS, BACKGROUNDS, BACKGROUND_TYPES, VIBES, PHOTOGRAPHY_STYLES, RESOLUTIONS, OCCASIONS } from "./index.js";
4
+ import { generateImages, refineImage, upscaleImage, generateTiredGirl, createMuse, generateVideo, annotateImage, createImageGrid, createBeforeAfter, TEMPLATES, ETHNICITIES, SKIN_TONES, HAIR_COLORS, BACKGROUNDS, BACKGROUND_TYPES, VIBES, PHOTOGRAPHY_STYLES, RESOLUTIONS, OCCASIONS } from "./index.js";
5
5
  const program = new Command();
6
6
  const parseList = (value) => value.split(",").map((v) => v.trim()).filter(Boolean);
7
+ const normalizeFraming = (value) => {
8
+ if (!value)
9
+ return undefined;
10
+ const normalized = value.trim().toLowerCase().replace(/[_\s]/g, "-");
11
+ if (normalized === "standard")
12
+ return "standard";
13
+ if (normalized === "closeup" || normalized === "close-up")
14
+ return "close-up";
15
+ if (normalized === "ultra" ||
16
+ normalized === "ultra-closeup" ||
17
+ normalized === "ultracloseup" ||
18
+ normalized === "ultra-close-up") {
19
+ return "ultra-close-up";
20
+ }
21
+ throw new Error(`Unknown framing: ${value}. Use standard|close-up|ultra-close-up.`);
22
+ };
23
+ const isFramingSupportedTemplate = (templateId) => templateId === "flatlay_creative" || templateId === "half_body_muse";
7
24
  const loadConfig = () => {
8
25
  const apiKey = process.env.GEMINI_API_KEY;
9
26
  if (!apiKey) {
@@ -58,12 +75,15 @@ program
58
75
  .option("--photography-style <id>")
59
76
  .option("--resolution <id>")
60
77
  .option("--occasion <id>")
78
+ .option("--framing <mode>", "standard|close-up|ultra-close-up")
79
+ .option("--upload-mode <mode>", "stacking|multi_angle|multi_item_single")
61
80
  .option("--quantity <n>", "Number of images", "1")
62
81
  .option("--muse-id <id>")
63
82
  .option("--muse-images <paths>", "Comma-separated muse image paths")
64
83
  .option("--no-enhance", "Skip prompt enhancement")
65
84
  .action(async (options) => {
66
85
  const config = loadConfig();
86
+ const framing = normalizeFraming(options.framing);
67
87
  const result = await generateImages(config, {
68
88
  inputImages: parseList(options.images),
69
89
  quantity: Number(options.quantity),
@@ -84,6 +104,8 @@ program
84
104
  resolutionId: options.resolution,
85
105
  occasionId: options.occasion
86
106
  },
107
+ framing,
108
+ uploadMode: options.uploadMode,
87
109
  museId: options.museId,
88
110
  museImagePaths: options.museImages ? parseList(options.museImages) : undefined,
89
111
  enhancePrompt: options.enhance
@@ -196,6 +218,30 @@ program
196
218
  });
197
219
  console.log(options.output);
198
220
  });
221
+ program
222
+ .command("before-after")
223
+ .argument("<layout>", "horizontal|vertical|diagonal|inset")
224
+ .argument("<order>", "before-first|after-first")
225
+ .requiredOption("--before <path>", "Before image path")
226
+ .requiredOption("--after <path>", "After image path")
227
+ .requiredOption("--output <path>", "Output image path")
228
+ .option("--feather <px>", "Blend width in pixels")
229
+ .option("--diagonal-direction <dir>", "Diagonal split direction: tl-br|tr-bl")
230
+ .option("--before-scale <percent>", "Scale before image size (100 = original, horizontal/vertical only)")
231
+ .option("--before-inset-scale <percent>", "Inset size (layout inset, percent of output min side)")
232
+ .option("--before-inset-position <pos>", "Inset position (layout inset): top-left|top-right|bottom-left|bottom-right")
233
+ .action(async (layout, order, options) => {
234
+ await createBeforeAfter(options.before, options.after, options.output, {
235
+ layout,
236
+ order,
237
+ feather: options.feather ? Number(options.feather) : undefined,
238
+ diagonalDirection: options.diagonalDirection,
239
+ beforeScale: options.beforeScale ? Number(options.beforeScale) : undefined,
240
+ beforeInsetScale: options.beforeInsetScale ? Number(options.beforeInsetScale) : undefined,
241
+ beforeInsetPosition: options.beforeInsetPosition
242
+ });
243
+ console.log(options.output);
244
+ });
199
245
  program
200
246
  .command("grid")
201
247
  .requiredOption("--inputs <paths>", "Comma-separated image paths")
@@ -217,5 +263,26 @@ program
217
263
  });
218
264
  console.log(options.output);
219
265
  });
266
+ program
267
+ .command("collate")
268
+ .requiredOption("--inputs <paths>", "Comma-separated image paths")
269
+ .requiredOption("--output <path>", "Output image path")
270
+ .option("--columns <n>", "Number of columns", "2")
271
+ .option("--rows <n>", "Number of rows", "2")
272
+ .option("--padding <px>", "Padding between tiles (default: 20)")
273
+ .option("--background <hex>", "Background color (default: #000000)")
274
+ .option("--tile-width <px>", "Fixed tile width")
275
+ .option("--tile-height <px>", "Fixed tile height")
276
+ .action(async (options) => {
277
+ await createImageGrid(parseList(options.inputs), options.output, {
278
+ columns: Number(options.columns),
279
+ rows: Number(options.rows),
280
+ padding: options.padding ? Number(options.padding) : undefined,
281
+ background: options.background,
282
+ tileWidth: options.tileWidth ? Number(options.tileWidth) : undefined,
283
+ tileHeight: options.tileHeight ? Number(options.tileHeight) : undefined
284
+ });
285
+ console.log(options.output);
286
+ });
220
287
  program.parseAsync();
221
288
  //# sourceMappingURL=cli.js.map