@scenerok/cli 1.0.12 → 1.0.13
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
|
@@ -37,7 +37,7 @@ input logo = "/uploads/logo.png"
|
|
|
37
37
|
|
|
38
38
|
**Time Blocks** - Define what happens during a time range:
|
|
39
39
|
```vidscript
|
|
40
|
-
[-] = hero # auto-append: starts
|
|
40
|
+
[-] = hero # auto-append: starts at visual cursor
|
|
41
41
|
hero.Trim(start: 0s, end: 5s)
|
|
42
42
|
|
|
43
43
|
[- 3s] = text "Hello", style: title, color: "#FFF" # auto-start, 3s duration
|
|
@@ -45,6 +45,8 @@ hero.Trim(start: 0s, end: 5s)
|
|
|
45
45
|
[prev + 0.5s .. prev + 2s] = filter "glow" # expression-based
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
`[-]` timing is channel-aware. Visual blocks (`video`, `text`, filters, visual plugin calls, bare visual inputs) advance a visual playhead. Audio blocks (`audio`, `xai.tts`, `eleven.music`) advance an audio playhead. A 15s music bed or multiple TTS blocks do not delay the next `[-] = video ...` block; that video starts from the visual playhead. Mixed blocks advance both playheads, and `prev` follows the relevant channel for the block being compiled.
|
|
49
|
+
|
|
48
50
|
**Video Operations** - Modify how video plays:
|
|
49
51
|
```vidscript
|
|
50
52
|
hero.Trim(start: 0s, end: 5s) # trim clip
|
|
@@ -171,8 +173,8 @@ When the user provides a product, company, landing page, app store listing, or e
|
|
|
171
173
|
|
|
172
174
|
## Best Practices
|
|
173
175
|
|
|
174
|
-
- **Use dynamic timeblocks** — `[-]` auto-advances the cursor, reducing calculation errors
|
|
175
|
-
- **Use `prev` for offsets** — `[prev + 0.5s .. prev + 2s]` for gaps between content
|
|
176
|
+
- **Use dynamic timeblocks** — `[-]` auto-advances the relevant audio or visual cursor, reducing calculation errors
|
|
177
|
+
- **Use `prev` for offsets** — `[prev + 0.5s .. prev + 2s]` for gaps between content in the same channel
|
|
176
178
|
- **Named arguments for clarity** — `hero.Trim(start: 0s, end: 5s)` over `hero.Trim(0s, 5s)`
|
|
177
179
|
- **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
|
|
178
180
|
- **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
|
|
@@ -14,7 +14,8 @@ VidScript is a declarative DSL for composing short-form videos. Write a script,
|
|
|
14
14
|
8. **Use the full media plugin toolkit** — choose still generation, text-to-video, image-to-video, reference-to-video, video extension, TTS, and music deliberately. Do not default to only `xai.imagine`.
|
|
15
15
|
9. **Include audio when useful** — use `xai.tts` / `xai.textToSpeech` for narration and `eleven.music` / `eleven.generateMusic` / `eleven.composeMusic` for music beds.
|
|
16
16
|
10. **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.
|
|
17
|
-
11. **
|
|
17
|
+
11. **Channel-aware `[-]` timing** — audio and visual auto blocks have separate playheads. A music bed or TTS sequence does not delay the next `[-] = video ...` block.
|
|
18
|
+
12. **Strict rules** — see `vidscript-strict.md` for invalid patterns (bare `xai.imagine`, bare `cf.video(...)`, bare `eleven.music(...)` without import, trailing params after direct plugin calls, nested quotes in prompts).
|
|
18
19
|
|
|
19
20
|
### Common validation failures
|
|
20
21
|
|
|
@@ -128,12 +129,26 @@ Time blocks are the core of VidScript. They define when instructions execute on
|
|
|
128
129
|
### Dynamic Playhead (recommended)
|
|
129
130
|
|
|
130
131
|
```vidscript
|
|
131
|
-
[-] = hero # auto-append: starts
|
|
132
|
+
[-] = hero # auto-append: starts at visual cursor
|
|
132
133
|
[- 3s] = text "Title", size: 72 # auto-start, last 3 seconds
|
|
133
134
|
[- 2.5s] = filter "glow", intensity: 0.8
|
|
134
135
|
```
|
|
135
136
|
|
|
136
|
-
|
|
137
|
+
VidScript keeps separate auto-playhead cursors for visual and audio content. Visual blocks (`video`, `text`, filters, shaders, visual plugin calls, and bare visual inputs) advance the visual cursor. Audio blocks (`audio`, `xai.tts`, `eleven.music`, and other audio plugin calls) advance the audio cursor. `[- duration]` advances the relevant cursor by the explicit duration.
|
|
138
|
+
|
|
139
|
+
This means a long audio bed or voiceover sequence does not push a following auto video block to the end of the audio:
|
|
140
|
+
|
|
141
|
+
```vidscript
|
|
142
|
+
import xai from "@scenerok/xai"
|
|
143
|
+
import eleven from "@elevenlabs/music"
|
|
144
|
+
|
|
145
|
+
input product = "https://cdn.example.com/product.png"
|
|
146
|
+
let bed = eleven.music("Warm music bed", duration: 15, instrumental: true)
|
|
147
|
+
[0s .. 15s] = audio bed, volume: 0.35
|
|
148
|
+
[-] = video xai.imageToVideo(product, "Slow premium camera move", aspect_ratio: "9:16", duration: 6)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
The generated video above starts at the current visual cursor, usually `0s`, even though the audio cursor already reaches `15s`. Mixed blocks containing both audio and visual instructions advance both cursors. The `prev` keyword resolves against the cursor for the block being compiled; for mixed timing it uses the current combined timeline position.
|
|
137
152
|
|
|
138
153
|
### Explicit Range
|
|
139
154
|
|
|
@@ -157,7 +172,7 @@ frame 90 # 90 frames at 30fps = 3 seconds
|
|
|
157
172
|
|
|
158
173
|
### The `prev` Keyword
|
|
159
174
|
|
|
160
|
-
`prev` refers to the current playhead position
|
|
175
|
+
`prev` refers to the current channel-aware playhead position for the block being compiled. In a visual block it follows the visual cursor; in an audio block it follows the audio cursor.
|
|
161
176
|
|
|
162
177
|
```vidscript
|
|
163
178
|
[- 2s] = text "Hello" # plays from cursor to cursor+2s
|
|
@@ -450,8 +465,8 @@ scenerok secrets set ELEVENLABS_API_KEY=your-key
|
|
|
450
465
|
|
|
451
466
|
## Best Practices
|
|
452
467
|
|
|
453
|
-
1. **Use dynamic timeblocks** — `[-]` auto-advances the cursor, reducing calculation errors
|
|
454
|
-
2. **Use `prev` for offsets** — `[prev + 0.5s .. prev + 2s]` for gaps after previous content
|
|
468
|
+
1. **Use dynamic timeblocks** — `[-]` auto-advances the relevant audio or visual cursor, reducing calculation errors
|
|
469
|
+
2. **Use `prev` for offsets** — `[prev + 0.5s .. prev + 2s]` for gaps after previous content in the same channel
|
|
455
470
|
3. **1080×1920 for vertical** (TikTok, Reels, Shorts), **1920×1080 for horizontal** (YouTube)
|
|
456
471
|
4. **Hook viewers in the first 3 seconds** — place the most compelling content early
|
|
457
472
|
5. **High-contrast text** — use `stroke` and `stroke_width` on text overlays over video
|
|
@@ -107,6 +107,24 @@ xAI TTS voices are only `eve`, `ara`, `rex`, `sal`, and `leo`.
|
|
|
107
107
|
|
|
108
108
|
For ElevenLabs music, import `@elevenlabs/music` and use `eleven.music(...)`, `eleven.generateMusic(...)`, or `eleven.composeMusic(...)`. Do not call `eleven.tts(...)`; ElevenLabs TTS is not registered in VidScript today. Ads, promos, tutorials, and reels should normally include either `xai.tts` voiceover, an ElevenLabs music bed, or both unless the user asks for silent output.
|
|
109
109
|
|
|
110
|
+
## Rule 4.5: `[-]` uses separate audio and visual playheads
|
|
111
|
+
|
|
112
|
+
Use `[-]` freely for generated visual sequences even when audio is already scheduled. VidScript advances audio and visual auto blocks independently:
|
|
113
|
+
|
|
114
|
+
```vidscript
|
|
115
|
+
import xai from "@scenerok/xai"
|
|
116
|
+
import eleven from "@elevenlabs/music"
|
|
117
|
+
|
|
118
|
+
input family_image = "https://cdn.example.com/family.png"
|
|
119
|
+
let bed = eleven.music("Warm family music", duration: 15, instrumental: true)
|
|
120
|
+
[0s .. 15s] = audio bed, volume: 0.35, fade_out: 2s
|
|
121
|
+
[-] = video xai.imageToVideo(family_image, "Warm family moment, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 15)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The video starts at the visual playhead, usually `0s`; it is not pushed to `15s` by the audio bed. Audio blocks such as `[-] = audio xai.tts(...)` advance only the audio playhead. Visual blocks such as `[-] = video ...` and `[-] = text ...` advance only the visual playhead. A block containing both audio and visual instructions advances both.
|
|
125
|
+
|
|
126
|
+
Use explicit ranges when you need exact synchronization, overlaps, or cuts. Do not avoid `[-]` solely because the script contains music or voiceover.
|
|
127
|
+
|
|
110
128
|
## Rule 5: Time ranges use `..`
|
|
111
129
|
|
|
112
130
|
```vidscript
|