@scenerok/cli 1.0.10 → 1.0.11
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/package.json
CHANGED
package/skills/shared/SKILL.md
CHANGED
|
@@ -93,6 +93,8 @@ import eleven from "@elevenlabs/music"
|
|
|
93
93
|
import motion from "@scenerok/basic-animations"
|
|
94
94
|
|
|
95
95
|
[-] = video xai.imagine("Cinematic product shot, premium lighting, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 5)
|
|
96
|
+
[-] = video xai.imageToVideo("https://cdn.example.com/product.png", "Slow premium camera move around the product, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 6)
|
|
97
|
+
[-] = video xai.referenceToVideo(["https://cdn.example.com/product.png", "https://cdn.example.com/person.png"], "Lifestyle ad shot featuring the referenced product and person, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 8)
|
|
96
98
|
[-] = audio xai.tts("Welcome to SceneRok", voice: "eve")
|
|
97
99
|
|
|
98
100
|
# ElevenLabs music package functions require an import alias.
|
|
@@ -102,6 +104,10 @@ let bed = eleven.music("Warm premium launch bed", duration: 15, instrumental: tr
|
|
|
102
104
|
|
|
103
105
|
**Always** import the package that owns the function: `xai.*` from `@scenerok/xai`, `eleven.*` from `@elevenlabs/music`, and `motion.*` from `@scenerok/basic-animations`. Calls without import fail validation with `Unknown function 'xai.imagine'`.
|
|
104
106
|
|
|
107
|
+
Use the full xAI visual toolkit, not only `xai.imagine()`: use `xai.imageToVideo(image, prompt, ...)` when you have one strong product/screenshot/logo image to animate, and `xai.referenceToVideo([images...], prompt, ...)` when extracted objects, screenshots, product photos, people, packaging, or brand elements should guide the generated scene. Reference-to-video requires a prompt, accepts up to 7 reference images, and should stay at 10 seconds or less.
|
|
108
|
+
|
|
109
|
+
xAI TTS voice IDs: `eve` for demos/announcements/upbeat content, `ara` for warm conversational narration, `rex` for business/tutorial delivery, `sal` for balanced general narration, and `leo` for authoritative instructional narration.
|
|
110
|
+
|
|
105
111
|
For ElevenLabs music, import `@elevenlabs/music` and call `eleven.music(...)`, `eleven.generateMusic(...)`, or `eleven.composeMusic(...)`. Use `let bed = eleven.music(...)` followed by `audio bed, volume: ...` when you need volume or fades.
|
|
106
112
|
|
|
107
113
|
Read `vidscript-strict.md` for anti-patterns and `examples/system/*.vid` for copy-paste templates (installed with `scenerok skills install`).
|
|
@@ -120,7 +126,7 @@ input hero = "{{hero_clip}}"
|
|
|
120
126
|
2. **Plan the structure** — Time blocks, durations, inputs
|
|
121
127
|
3. **Gather assets** — Video URLs, local paths, generated clips, and selective website screenshots/images; when the user provides a URL, browser screenshots are optional source material, not a requirement to build the whole video from screenshots
|
|
122
128
|
4. **Probe asset type and dimensions** — Inspect every local or downloaded asset before placing it. Use `file` to identify image vs video, `ffprobe` for video/audio, `sips -g pixelWidth -g pixelHeight file` on macOS images, or `identify file` when ImageMagick is available.
|
|
123
|
-
5. **
|
|
129
|
+
5. **Use images directly when useful** — VidScript `input` supports both videos and images. You can place a still image input with `video image_input`; the renderer detects the asset type and treats it as a static visual clip for the block duration.
|
|
124
130
|
6. **Compose VidScript** — Write the full script using measured dimensions, aspect-ratio-preserving scale, centered/safe-area placement, and entry/exit animation beats for each visual asset
|
|
125
131
|
7. **Validate** — Run `scenerok validate script.vid`
|
|
126
132
|
8. **Render** — Run `scenerok render script.vid --watch`
|
|
@@ -135,11 +141,11 @@ When the user provides a product, company, landing page, app store listing, or e
|
|
|
135
141
|
3. Crop or frame screenshots to the specific visual evidence needed. Do not use screenshots as the only visual style by default, and do not build a whole video as a sequence of unreadable full-page captures.
|
|
136
142
|
4. Detect and save usable product images, app screenshots, brand marks, and logos from the page when available. Prefer direct image assets when they are accessible and clearly match the product; use browser screenshots as supporting assets when they communicate something visible at video size.
|
|
137
143
|
5. Probe saved asset type and dimensions before composing. Record file type, width, height, aspect ratio, and duration if video; never guess dimensions from filenames or screenshots.
|
|
138
|
-
6.
|
|
139
|
-
7. Use captured assets
|
|
144
|
+
6. Use saved still images directly as timeline inputs when the real asset should appear on screen, or feed the strongest stills into `xai.imageToVideo` / `xai.referenceToVideo` when motion would make the output stronger. Keep screenshots focused and readable.
|
|
145
|
+
7. Use captured assets as grounded proof points alongside other visual material. A good ad can combine product/logo/app screenshots, generated video clips, motion backgrounds, text primitives, and music.
|
|
140
146
|
8. Scale assets from their measured aspect ratio to fit the output frame and safe areas. For 1080x1920 ads, keep primary visuals inside roughly 80-88% of frame width and reserve enough top/bottom room for text.
|
|
141
|
-
9. Animate visual assets intentionally: use entry animations such as `motion.popIn`, `motion.riseIn`, or `motion.slideY`; use short exit fade/slide segments when a clean transition is needed.
|
|
142
|
-
10. Generative visuals
|
|
147
|
+
9. Animate visual assets intentionally: use entry animations such as `motion.popIn`, `motion.riseIn`, or `motion.slideY`; use short exit fade/slide segments when a clean transition is needed.
|
|
148
|
+
10. Generative visuals are encouraged when useful. Choose among `xai.imagine` for text-to-video, `xai.imageToVideo` to animate one extracted image/screenshot/product photo, and `xai.referenceToVideo` to guide a generated scene with up to 7 extracted visual references.
|
|
143
149
|
11. For every generated visual prompt, explicitly require a clean scene with no text, no words, no letters, no captions, no logos, no watermarks, and no readable UI copy. AI video generation often corrupts text; all final titles, offers, captions, CTAs, prices, and labels must be created with VidScript `text` primitives.
|
|
144
150
|
12. Do not invent product claims. Extract copy, pricing, feature names, social proof, and CTA language from the site or ask the user.
|
|
145
151
|
|
|
@@ -151,7 +157,7 @@ When the user provides a product, company, landing page, app store listing, or e
|
|
|
151
157
|
- **Use website assets judiciously for URL-based ads** — browser screenshots, product images, app screenshots, and logos can ground the ad, but they are optional ingredients, not the whole recipe
|
|
152
158
|
- **Avoid full-page screenshot backgrounds** — use above-fold, cropped, or focused screenshots that remain legible at video size; never rely on long website screenshots where the text becomes unreadable
|
|
153
159
|
- **Probe before placing** — get exact dimensions for every real asset, calculate scale from aspect ratio, and set `width`, `height`, `x`, and `y` explicitly
|
|
154
|
-
- **Match asset type to placement** — use real
|
|
160
|
+
- **Match asset type to placement** — use real videos for motion footage and image inputs for still product shots, screenshots, logos, and brand marks. The `video` primitive can place either media type.
|
|
155
161
|
- **Animate assets, not only text** — give product screenshots/logos/cards a clear entrance and a clean exit; split static visuals into main and fade-out segments if needed
|
|
156
162
|
- **Keep generated media text-free** — prompts for AI-generated images/videos must explicitly say no text, no words, no letters, no captions, no logos, no watermarks, and no readable UI copy; add all final copy with VidScript `text` primitives
|
|
157
163
|
- Use 1080x1920 for vertical content (TikTok/Instagram)
|
|
@@ -159,6 +165,7 @@ When the user provides a product, company, landing page, app store listing, or e
|
|
|
159
165
|
- Hook viewers in the first 3 seconds
|
|
160
166
|
- Use high-contrast text on video backgrounds with `stroke` and `stroke_width`
|
|
161
167
|
- Include a clear call-to-action
|
|
168
|
+
- Treat filters as optional finishing tools. Use `vignette`, `saturation`, `contrast`, etc. only when they improve the composition; do not add them by default.
|
|
162
169
|
- Test with `scenerok validate` before rendering
|
|
163
170
|
- Each render costs 1 credit
|
|
164
171
|
|
|
@@ -184,9 +191,9 @@ If a render fails:
|
|
|
184
191
|
|
|
185
192
|
## Sample Video Types
|
|
186
193
|
|
|
187
|
-
- **Product Promo** — Hero clip + headline + description + CTA
|
|
194
|
+
- **Product Promo** — Hero clip or generated visual + headline + description + CTA
|
|
188
195
|
- **Social Media Hook** — Fast cuts, bold text, speed adjustments
|
|
189
|
-
- **Testimonial** — Speaker clip + quote text +
|
|
196
|
+
- **Testimonial** — Speaker clip + quote text + optional styling/filter pass
|
|
190
197
|
- **Meme Remix** — Reaction clip + top/bottom punchline overlays
|
|
191
198
|
- **Title Sequence** — Background clip + glitch shader + bold typography
|
|
192
199
|
|
|
@@ -10,8 +10,8 @@ VidScript is a declarative DSL for composing short-form videos. Write a script,
|
|
|
10
10
|
4. **Copy working examples** — see `examples/system/` in this skill folder (e.g. `minimal-text-reel.vid`, `ecom-product-launch.vid`, `rokmilk-chocolate-promo.vid`).
|
|
11
11
|
5. **Use URL assets selectively** — if the user gives a website or product URL and browser screenshot tools are available, you can capture above-fold screenshots, product images, app screenshots, and logos for VidScript `input` assets. Do not treat screenshots as mandatory or as the only visual source.
|
|
12
12
|
6. **Probe asset type and dimensions** — before placing real assets, identify image vs video with `file`; inspect width, height, and duration with `ffprobe`, `sips`, or `identify`; then scale from the measured aspect ratio and set explicit `width`, `height`, `x`, and `y`.
|
|
13
|
-
7. **Use still images
|
|
14
|
-
8. **
|
|
13
|
+
7. **Use still images directly** — `input` supports videos and images. Place still screenshots, logos, and product photos with `video image_input`; the renderer treats images as static clips for the block duration.
|
|
14
|
+
8. **Use the full xAI visual toolkit** — choose `xai.imagine` for text-to-video, `xai.imageToVideo` for animating one extracted image/screenshot/product photo, and `xai.referenceToVideo` for guiding a scene with up to 7 extracted references.
|
|
15
15
|
9. **Generated media has no text** — prompts for AI-generated images/videos must explicitly ask for no text, no words, no letters, no captions, no logos, no watermarks, and no readable UI copy. Use VidScript `text` primitives for all final copy.
|
|
16
16
|
10. **Strict rules** — see `vidscript-strict.md` for invalid patterns (bare `xai.imagine`, bare `eleven.music(...)` without import, trailing params after direct plugin calls, nested quotes in prompts).
|
|
17
17
|
|
|
@@ -59,20 +59,14 @@ sips -g pixelWidth -g pixelHeight asset.png
|
|
|
59
59
|
identify asset.webp
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
Use real videos as
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
ffmpeg -y -loop 1 -t 4.5 -i screenshot.png -vf "scale=ceil(iw/2)*2:ceil(ih/2)*2,format=yuv420p" -r 30 screenshot-plate.mp4
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Then declare the plate:
|
|
62
|
+
Use real videos as motion footage and still images as static clips. The `video` primitive accepts both; the renderer detects image vs video:
|
|
69
63
|
|
|
70
64
|
```vidscript
|
|
71
|
-
input screenshot = "assets/
|
|
65
|
+
input screenshot = "assets/screenshots/homepage.png"
|
|
72
66
|
[0s .. 4.5s] = video screenshot, width: 1080, height: 1920, x: 0, y: 0, animate: motion.fadeIn(0.35s)
|
|
73
67
|
```
|
|
74
68
|
|
|
75
|
-
|
|
69
|
+
For URL-based ads, still assets can also drive generated motion: use `xai.imageToVideo(screenshot, "...")` for one strong source image, or `xai.referenceToVideo([product, logo, person], "...")` to guide a new scene with extracted references.
|
|
76
70
|
|
|
77
71
|
Use the measured width and height to preserve aspect ratio. For a 1080x1920 vertical ad, a common centered fit is:
|
|
78
72
|
|
|
@@ -278,6 +272,8 @@ import eleven from "@elevenlabs/music"
|
|
|
278
272
|
import motion from "@scenerok/basic-animations"
|
|
279
273
|
|
|
280
274
|
[-] = video xai.imagine("Cinematic product shot, premium lighting, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 5)
|
|
275
|
+
[-] = video xai.imageToVideo("https://cdn.example.com/product.png", "Slow premium camera move around the product, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 6)
|
|
276
|
+
[-] = video xai.referenceToVideo(["https://cdn.example.com/product.png", "https://cdn.example.com/person.png"], "Lifestyle ad shot featuring the referenced product and person, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 8)
|
|
281
277
|
[-] = audio xai.tts("Welcome to SceneRok", voice: "eve")
|
|
282
278
|
|
|
283
279
|
# ElevenLabs music package functions require an import alias.
|
|
@@ -290,6 +286,16 @@ let bed = eleven.music("Warm premium launch bed", duration: 15, instrumental: tr
|
|
|
290
286
|
|
|
291
287
|
`@scenerok/xai` requires an explicit default import. ElevenLabs music validates as `eleven.music(...)`, `eleven.generateMusic(...)`, or `eleven.composeMusic(...)` after `import eleven from "@elevenlabs/music"`. Plugin calls run at compile time; direct media plugin instructions cannot have trailing audio params, so use a `let` binding when you need `volume`, `fade_in`, or `fade_out`.
|
|
292
288
|
|
|
289
|
+
xAI visual functions:
|
|
290
|
+
|
|
291
|
+
| Function | Use when |
|
|
292
|
+
|----------|----------|
|
|
293
|
+
| `xai.imagine(prompt, ...)` | You need text-to-video from a clean prompt. |
|
|
294
|
+
| `xai.imageToVideo(image, prompt, ...)` | You have one source image, screenshot, logo, product photo, data URI, or file id to animate. |
|
|
295
|
+
| `xai.referenceToVideo([images...], prompt, ...)` | You have 1-7 reference images that should influence the generated scene without becoming the first frame. Requires a prompt; keep duration <= 10s. |
|
|
296
|
+
|
|
297
|
+
xAI TTS voices: `eve` for upbeat demos/announcements, `ara` for warm conversational narration, `rex` for business/tutorial content, `sal` for balanced general delivery, and `leo` for authoritative instruction.
|
|
298
|
+
|
|
293
299
|
**Invalid (will not validate):**
|
|
294
300
|
|
|
295
301
|
```vidscript
|
|
@@ -340,7 +346,7 @@ Compiler lowers `animate:` into `IRMotionTrack[]` (property-path keyframes). Leg
|
|
|
340
346
|
[0s .. 5s] = filter "glitch", intensity: 0.5, animate: motion.fadeIn(1s)
|
|
341
347
|
```
|
|
342
348
|
|
|
343
|
-
Built-in filters: `monochrome`, `sepia`, `blur`, `chromatic`, `glitch`, `vignette`, `contrast`, `saturation`, `brightness`.
|
|
349
|
+
Built-in filters: `monochrome`, `sepia`, `blur`, `chromatic`, `glitch`, `vignette`, `contrast`, `saturation`, `brightness`. Filters are optional finishing tools; use them only when they improve the composition.
|
|
344
350
|
|
|
345
351
|
### Animation functions (`@scenerok/basic-animations`)
|
|
346
352
|
|
|
@@ -22,8 +22,6 @@ input cta_text = "{{cta_text | visit your nearest grocery store}}"
|
|
|
22
22
|
|
|
23
23
|
[8s .. 11s] = text cta_text, font: "Bebas Neue", size: 48, color: "#FFD700", x: "50%", y: "80%", align: center, stroke: "#3E1C00", stroke_width: 4, animate: motion.fadeIn(0.8s)
|
|
24
24
|
|
|
25
|
-
[0s .. 12s] = filter "vignette", intensity: 0.3
|
|
26
|
-
|
|
27
25
|
output to "product-promo.mp4", resolution: "1080x1920", fps: 30
|
|
28
26
|
```
|
|
29
27
|
|
|
@@ -20,7 +20,7 @@ When the user gives a product, company, ecommerce, landing page, or app URL and
|
|
|
20
20
|
|
|
21
21
|
Do not use full-page or very long website screenshots as video backgrounds; their text is usually illegible at output size. Crop or frame screenshots to the specific visual proof point, and use them sparingly.
|
|
22
22
|
|
|
23
|
-
Website screenshots are optional source material, not a requirement to build the whole video from screenshots. You may combine them with `xai.imagine` or other generative video plugins for lifestyle scenes, motion backgrounds, transitions, or product context. Do not invent claims; use website copy or ask the user.
|
|
23
|
+
Website screenshots are optional source material, not a requirement to build the whole video from screenshots. You may combine them with `xai.imagine`, `xai.imageToVideo`, `xai.referenceToVideo`, or other generative video plugins for lifestyle scenes, motion backgrounds, transitions, or product context. Do not invent claims; use website copy or ask the user.
|
|
24
24
|
|
|
25
25
|
## Rule 2.5: Probe real asset type and dimensions before placement
|
|
26
26
|
|
|
@@ -33,18 +33,10 @@ sips -g pixelWidth -g pixelHeight asset.png
|
|
|
33
33
|
identify asset.webp
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
Use real video files for
|
|
37
|
-
|
|
38
|
-
For screenshots, logos, and other stills, convert the still to an H.264 MP4 plate first:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
ffmpeg -y -loop 1 -t 4 -i screenshot.png -vf "scale=ceil(iw/2)*2:ceil(ih/2)*2,format=yuv420p" -r 30 screenshot-plate.mp4
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Then use the plate:
|
|
36
|
+
Use real video files for motion footage and still image inputs for screenshots, logos, product photos, and brand marks. The `video` primitive accepts both videos and images; image inputs render as static clips for the block duration.
|
|
45
37
|
|
|
46
38
|
```vidscript
|
|
47
|
-
input screenshot = "assets/
|
|
39
|
+
input screenshot = "assets/screenshots/homepage.png"
|
|
48
40
|
[0s .. 4s] = video screenshot, width: 1080, height: 1920, x: 0, y: 0, animate: motion.fadeIn(0.35s)
|
|
49
41
|
```
|
|
50
42
|
|
|
@@ -84,10 +76,16 @@ import xai from "@scenerok/xai"
|
|
|
84
76
|
import eleven from "@elevenlabs/music"
|
|
85
77
|
|
|
86
78
|
[-] = video xai.imagine("Prompt here, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 5)
|
|
79
|
+
[-] = video xai.imageToVideo("https://cdn.example.com/product.png", "Slow camera move around the product, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 6)
|
|
80
|
+
[-] = video xai.referenceToVideo(["https://cdn.example.com/product.png", "https://cdn.example.com/person.png"], "Lifestyle scene using the referenced product and person, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 8)
|
|
87
81
|
[-] = audio xai.tts("Voiceover line", voice: "eve")
|
|
88
82
|
[0s .. 15s] = audio eleven.music("Warm premium music bed", duration: 15, instrumental: true)
|
|
89
83
|
```
|
|
90
84
|
|
|
85
|
+
Use `xai.imageToVideo` for one extracted screenshot/product/logo image. Use `xai.referenceToVideo` for 1-7 reference images when extracted objects should guide the generated shot; it requires a prompt and duration must be <= 10s.
|
|
86
|
+
|
|
87
|
+
xAI TTS voices are only `eve`, `ara`, `rex`, `sal`, and `leo`.
|
|
88
|
+
|
|
91
89
|
For ElevenLabs music, import `@elevenlabs/music` and use `eleven.music(...)`, `eleven.generateMusic(...)`, or `eleven.composeMusic(...)`.
|
|
92
90
|
|
|
93
91
|
## Rule 5: Time ranges use `..`
|
|
@@ -135,7 +133,7 @@ let bed = eleven.music("Soft premium ad music", duration: 15, instrumental: true
|
|
|
135
133
|
[0s .. 15s] = filter "saturation", value: 1.12
|
|
136
134
|
```
|
|
137
135
|
|
|
138
|
-
`saturation` uses `value`, not `intensity`.
|
|
136
|
+
Filters are optional finishing tools, not required ingredients. Use them only when they improve the visual result. `saturation` uses `value`, not `intensity`.
|
|
139
137
|
|
|
140
138
|
## Rule 10: Always end with output
|
|
141
139
|
|