@scenerok/cli 1.0.4 → 1.0.5
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/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +42 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +26 -4
- package/dist/lib/api.d.ts +2 -0
- package/dist/lib/api.d.ts.map +1 -1
- package/examples/system/3-tips-fitness.vid +45 -0
- package/examples/system/ecom-product-launch.vid +31 -0
- package/examples/system/glitch-title.vid +17 -0
- package/examples/system/meme-remix.vid +15 -0
- package/examples/system/minimal-text-reel.vid +11 -0
- package/examples/system/product-launch.vid +18 -0
- package/examples/system/rokmilk-chocolate-promo.vid +24 -0
- package/examples/system/testimonial-cut.vid +16 -0
- package/examples/system/ugc-testimonial-voiceover.vid +33 -0
- package/examples/system/voice-visual-promo.vid +21 -0
- package/package.json +2 -1
- package/skills/aider/SKILL.md +18 -8
- package/skills/aider/vidscript-guide.md +29 -9
- package/skills/aider/vidscript-sample.md +22 -14
- package/skills/aider/vidscript-strict.md +95 -0
- package/skills/claude/SKILL.md +18 -8
- package/skills/claude/vidscript-guide.md +26 -7
- package/skills/claude/vidscript-sample.md +22 -14
- package/skills/claude/vidscript-strict.md +95 -0
- package/skills/codex/SKILL.md +18 -8
- package/skills/codex/vidscript-guide.md +29 -9
- package/skills/codex/vidscript-sample.md +22 -14
- package/skills/codex/vidscript-strict.md +95 -0
- package/skills/cursor/SKILL.md +18 -8
- package/skills/cursor/vidscript-guide.md +29 -9
- package/skills/cursor/vidscript-sample.md +22 -14
- package/skills/cursor/vidscript-strict.md +95 -0
- package/skills/opencode/SKILL.md +18 -8
- package/skills/opencode/vidscript-guide.md +29 -9
- package/skills/opencode/vidscript-sample.md +22 -14
- package/skills/opencode/vidscript-strict.md +95 -0
- package/skills/skills/aider/SKILL.md +190 -0
- package/skills/skills/aider/vidscript-guide.md +375 -0
- package/skills/skills/aider/vidscript-sample.md +29 -0
- package/skills/skills/aider/vidscript-strict.md +95 -0
- package/skills/skills/claude/SKILL.md +190 -0
- package/skills/skills/claude/vidscript-guide.md +375 -0
- package/skills/skills/claude/vidscript-sample.md +29 -0
- package/skills/skills/claude/vidscript-strict.md +95 -0
- package/skills/skills/codex/SKILL.md +190 -0
- package/skills/skills/codex/vidscript-guide.md +375 -0
- package/skills/skills/codex/vidscript-sample.md +29 -0
- package/skills/skills/codex/vidscript-strict.md +95 -0
- package/skills/skills/cursor/SKILL.md +190 -0
- package/skills/skills/cursor/vidscript-guide.md +375 -0
- package/skills/skills/cursor/vidscript-sample.md +29 -0
- package/skills/skills/cursor/vidscript-strict.md +95 -0
- package/skills/skills/opencode/SKILL.md +190 -0
- package/skills/skills/opencode/vidscript-guide.md +375 -0
- package/skills/skills/opencode/vidscript-sample.md +29 -0
- package/skills/skills/opencode/vidscript-strict.md +95 -0
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
VidScript is a declarative DSL for composing short-form videos. Write a script, render an MP4.
|
|
4
4
|
|
|
5
|
+
## Agent quick start (read before composing)
|
|
6
|
+
|
|
7
|
+
1. **Import plugins** — `import xai from "@scenerok/xai"` before `xai.imagine`, `xai.tts`, or `animate: fadeIn(...)`.
|
|
8
|
+
2. **Validate early** — `scenerok validate file.vid` (errors show as `Line N:C — message`).
|
|
9
|
+
3. **Copy working examples** — see `examples/system/` in this skill folder (e.g. `minimal-text-reel.vid`, `ecom-product-launch.vid`, `rokmilk-chocolate-promo.vid`).
|
|
10
|
+
4. **Strict rules** — see `vidscript-strict.md` for invalid patterns (bare `xai.imagine`, `audio music(...), volume:`, nested quotes in prompts).
|
|
11
|
+
|
|
12
|
+
### Common validation failures
|
|
13
|
+
|
|
14
|
+
| Symptom | Fix |
|
|
15
|
+
|---------|-----|
|
|
16
|
+
| `Unknown function 'xai.imagine'` | Add `import xai from "@scenerok/xai"` at top |
|
|
17
|
+
| `Unknown function 'fadeIn'` | Same import (animation helpers are plugin-backed) |
|
|
18
|
+
| `Expected ... but "," found` | Do not put `, volume:` after a plugin call on the same line |
|
|
19
|
+
| Parse error on imagine prompt | Remove nested `"` quotes inside the prompt string |
|
|
20
|
+
|
|
5
21
|
## Program Structure
|
|
6
22
|
|
|
7
23
|
A VidScript program is a sequence of statements separated by newlines.
|
|
@@ -221,17 +237,21 @@ Audio sources can be MP3 inputs, audio plugin results, or the embedded audio str
|
|
|
221
237
|
### Plugin Calls
|
|
222
238
|
|
|
223
239
|
```vidscript
|
|
224
|
-
import
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
[-] = audio tts("Welcome to SceneRok", voice: "
|
|
228
|
-
[-] = video xai.imagine("Cinematic product shot", aspect_ratio: "9:16")
|
|
229
|
-
[-] = audio music("upbeat launch soundtrack", duration: 12, instrumental: true)
|
|
230
|
-
[-] = audio xai.tts("Next line", voice: "eve")
|
|
231
|
-
[-] = tts("Next line")
|
|
240
|
+
import xai from "@scenerok/xai"
|
|
241
|
+
|
|
242
|
+
[-] = video xai.imagine("Cinematic product shot", aspect_ratio: "9:16", duration: 5)
|
|
243
|
+
[-] = audio xai.tts("Welcome to SceneRok", voice: "eve")
|
|
232
244
|
```
|
|
233
245
|
|
|
234
|
-
Plugins
|
|
246
|
+
Plugins require an explicit default import. The server registers `@scenerok/xai` when API keys are configured. Plugin calls run at compile time and must appear **inside time blocks**, not in `let` assignments.
|
|
247
|
+
|
|
248
|
+
**Invalid (will not validate):**
|
|
249
|
+
|
|
250
|
+
```vidscript
|
|
251
|
+
[-] = video xai.imagine("...") # missing import
|
|
252
|
+
[-] = audio music("..."), volume: 0.5 # trailing params after plugin call
|
|
253
|
+
let clip = xai.imagine("...") # plugin assigned to variable
|
|
254
|
+
```
|
|
235
255
|
|
|
236
256
|
## Animations, Effects & Plugins (v2 Extensibility)
|
|
237
257
|
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
# VidScript v2 Sample — Product
|
|
2
|
-
# A 6-second vertical video for TikTok / Instagram Reels
|
|
3
|
-
# Demonstrates dynamic timeblocks, video shorthand, named args, expressions, and filters
|
|
1
|
+
# VidScript v2 Sample — Product promo with generated video
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
Copy this shape for promos that use xAI-generated clips. Run `scenerok validate` before `scenerok render`.
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
hero.Trim(start: 0s, end: 6s)
|
|
5
|
+
```vidscript
|
|
6
|
+
import xai from "@scenerok/xai"
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
input product_name = "{{product_name | RokMilk}}"
|
|
9
|
+
input hook_text = "{{hook_text | Chocolate Milkshake}}"
|
|
10
|
+
input cta_text = "{{cta_text | visit your nearest grocery store}}"
|
|
13
11
|
|
|
14
|
-
[
|
|
12
|
+
[0s .. 2.5s] = text product_name, font: "Bebas Neue", size: 80, color: "#FFD700", x: "50%", y: "20%", align: center, stroke: "#3E1C00", stroke_width: 4, animate: fadeIn(0.6s)
|
|
15
13
|
|
|
16
|
-
[
|
|
14
|
+
[2s .. 4.5s] = text hook_text, font: "Outfit", size: 52, color: "#FFFFFF", x: "50%", y: "45%", align: center, stroke: "#3E1C00", stroke_width: 3, animate: riseIn(0.8s)
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
[-] = video xai.imagine(
|
|
17
|
+
"Premium lifestyle product shot of " + product_name + " chocolate milk in 250ml carton, cinematic lighting, 9:16 vertical",
|
|
18
|
+
aspect_ratio: "9:16",
|
|
19
|
+
duration: 6
|
|
20
|
+
)
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
[8s .. 11s] = text cta_text, font: "Bebas Neue", size: 48, color: "#FFD700", x: "50%", y: "80%", align: center, stroke: "#3E1C00", stroke_width: 4, animate: fadeIn(0.8s)
|
|
23
|
+
|
|
24
|
+
[0s .. 12s] = filter "vignette", intensity: 0.3
|
|
25
|
+
|
|
26
|
+
output to "product-promo.mp4", resolution: "1080x1920", fps: 30
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
For clips you already have (no xAI), start from `examples/system/product-launch.vid` instead.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# VidScript v2 — Strict Agent Reference
|
|
2
|
+
|
|
3
|
+
Follow these rules exactly. When in doubt, copy a file from `examples/system/` (installed with `scenerok skills install`).
|
|
4
|
+
|
|
5
|
+
## Rule 1: Plugin imports are mandatory
|
|
6
|
+
|
|
7
|
+
```vidscript
|
|
8
|
+
import xai from "@scenerok/xai"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Without this line, `xai.imagine`, `xai.tts`, and animation helpers like `fadeIn` fail validation.
|
|
12
|
+
|
|
13
|
+
**Never** call `video xai.imagine(...)` or `animate: fadeIn(...)` without the import above.
|
|
14
|
+
|
|
15
|
+
## Rule 2: Put plugin calls directly in time blocks
|
|
16
|
+
|
|
17
|
+
```vidscript
|
|
18
|
+
[-] = video xai.imagine("Prompt here", aspect_ratio: "9:16", duration: 5)
|
|
19
|
+
[-] = audio xai.tts("Voiceover line", voice: "eve")
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Never** assign plugins to variables: `let clip = xai.imagine(...)` is invalid.
|
|
23
|
+
|
|
24
|
+
## Rule 3: Time ranges use `..`
|
|
25
|
+
|
|
26
|
+
```vidscript
|
|
27
|
+
[0s .. 5s] = text "Hello"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Not `[0s - 5s]`.
|
|
31
|
+
|
|
32
|
+
## Rule 4: Text params stay on one line
|
|
33
|
+
|
|
34
|
+
```vidscript
|
|
35
|
+
[0.5s .. 3s] = text "Headline", font: "Inter", size: 64, color: "#FFFFFF", x: "50%", y: "30%", align: center
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Rule 5: Quote safety in prompts
|
|
39
|
+
|
|
40
|
+
Use only straight `"` inside `xai.imagine("...")`. Do not nest quotes inside the prompt string (e.g. avoid `"RokMilk"` inside the prompt — say `labeled RokMilk` without extra quotes).
|
|
41
|
+
|
|
42
|
+
## Rule 6: Audio syntax
|
|
43
|
+
|
|
44
|
+
```vidscript
|
|
45
|
+
[-] = audio xai.tts("Spoken line", voice: "eve", speed: 1.0)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Invalid:** `audio music("...", duration: 15), volume: 0.35` — trailing `, volume` after a plugin call is a parse error.
|
|
49
|
+
|
|
50
|
+
Music/generative audio plugins require their own `import` when available; do not invent bare `music(...)` calls.
|
|
51
|
+
|
|
52
|
+
## Rule 7: Filters
|
|
53
|
+
|
|
54
|
+
```vidscript
|
|
55
|
+
[0s .. 15s] = filter "vignette", intensity: 0.3
|
|
56
|
+
[0s .. 15s] = filter "saturation", value: 1.12
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`saturation` uses `value`, not `intensity`.
|
|
60
|
+
|
|
61
|
+
## Rule 8: Always end with output
|
|
62
|
+
|
|
63
|
+
```vidscript
|
|
64
|
+
output to "video.mp4", resolution: "1080x1920", fps: 30
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Do **not** use legacy `config { }` blocks — they are not part of VidScript v2.
|
|
68
|
+
|
|
69
|
+
## Animations (after import)
|
|
70
|
+
|
|
71
|
+
```vidscript
|
|
72
|
+
[0s .. 2s] = text "Launch", x: "50%", y: "50%", animate: popIn(0.7s)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Available: `fadeIn`, `fadeOut`, `slideX`, `slideY`, `popIn`, `riseIn`, `swingIn`, `glitchIn`, `float`, `typewriter`.
|
|
76
|
+
|
|
77
|
+
## Validate before render
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
scenerok validate my-video.vid
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Each error line includes `Line N:C — message` when the server returns location info.
|
|
84
|
+
|
|
85
|
+
## Bundled examples
|
|
86
|
+
|
|
87
|
+
| File | Use case |
|
|
88
|
+
|------|----------|
|
|
89
|
+
| `minimal-text-reel.vid` | Text-only, no API keys |
|
|
90
|
+
| `product-launch.vid` | User video input + text + vignette |
|
|
91
|
+
| `ecom-product-launch.vid` | xAI product visuals + CTA |
|
|
92
|
+
| `3-tips-fitness.vid` | Multiple `[-]` blocks + xAI per segment |
|
|
93
|
+
| `rokmilk-chocolate-promo.vid` | 15s generated-video promo pattern |
|
|
94
|
+
|
|
95
|
+
Full grammar: https://scenerok.com/docs/vidscript
|
package/skills/opencode/SKILL.md
CHANGED
|
@@ -86,18 +86,20 @@ import music from "@elevenlabs/music" # generative music
|
|
|
86
86
|
use intro at [-] with { clip: main, headline: "Welcome" }
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
### Plugin Calls
|
|
89
|
+
### Plugin Calls (required import)
|
|
90
90
|
|
|
91
91
|
```vidscript
|
|
92
|
-
import
|
|
92
|
+
import xai from "@scenerok/xai"
|
|
93
93
|
|
|
94
|
-
[-] =
|
|
95
|
-
[-] =
|
|
96
|
-
[-] = audio music("upbeat launch soundtrack", duration: 12, instrumental: true)
|
|
97
|
-
[-] = audio xai.tts("Next line", voice: "eve")
|
|
94
|
+
[-] = video xai.imagine("Cinematic product shot", aspect_ratio: "9:16", duration: 5)
|
|
95
|
+
[-] = audio xai.tts("Welcome to SceneRok", voice: "eve")
|
|
98
96
|
```
|
|
99
97
|
|
|
100
|
-
|
|
98
|
+
**Always** add `import xai from "@scenerok/xai"` before any `xai.imagine` / `xai.tts` call or `animate: fadeIn(...)` helper. Calls without import fail validation with `Unknown function 'xai.imagine'`.
|
|
99
|
+
|
|
100
|
+
Put plugin calls **directly** in time blocks — never `let clip = xai.imagine(...)`.
|
|
101
|
+
|
|
102
|
+
Read `vidscript-strict.md` for anti-patterns and `examples/system/*.vid` for copy-paste templates (installed with `scenerok skills install`).
|
|
101
103
|
|
|
102
104
|
### Placeholders
|
|
103
105
|
|
|
@@ -165,7 +167,15 @@ Always ask clarifying questions about:
|
|
|
165
167
|
- Desired duration and style
|
|
166
168
|
- Whether they want to start from a template or from scratch
|
|
167
169
|
|
|
170
|
+
## Reference files (in this skill folder)
|
|
171
|
+
|
|
172
|
+
| File | Purpose |
|
|
173
|
+
|------|---------|
|
|
174
|
+
| `vidscript-guide.md` | Full grammar reference |
|
|
175
|
+
| `vidscript-strict.md` | **Read first** — rules that prevent common agent mistakes |
|
|
176
|
+
| `vidscript-sample.md` | Minimal promo with xAI import |
|
|
177
|
+
| `examples/system/*.vid` | Official SceneRok templates (text-only, product launch, xAI reels) |
|
|
178
|
+
|
|
168
179
|
## Full Reference
|
|
169
180
|
|
|
170
|
-
For exhaustive grammar documentation, visit:
|
|
171
181
|
https://scenerok.com/docs/vidscript
|
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
VidScript is a declarative DSL for composing short-form videos. Write a script, render an MP4.
|
|
4
4
|
|
|
5
|
+
## Agent quick start (read before composing)
|
|
6
|
+
|
|
7
|
+
1. **Import plugins** — `import xai from "@scenerok/xai"` before `xai.imagine`, `xai.tts`, or `animate: fadeIn(...)`.
|
|
8
|
+
2. **Validate early** — `scenerok validate file.vid` (errors show as `Line N:C — message`).
|
|
9
|
+
3. **Copy working examples** — see `examples/system/` in this skill folder (e.g. `minimal-text-reel.vid`, `ecom-product-launch.vid`, `rokmilk-chocolate-promo.vid`).
|
|
10
|
+
4. **Strict rules** — see `vidscript-strict.md` for invalid patterns (bare `xai.imagine`, `audio music(...), volume:`, nested quotes in prompts).
|
|
11
|
+
|
|
12
|
+
### Common validation failures
|
|
13
|
+
|
|
14
|
+
| Symptom | Fix |
|
|
15
|
+
|---------|-----|
|
|
16
|
+
| `Unknown function 'xai.imagine'` | Add `import xai from "@scenerok/xai"` at top |
|
|
17
|
+
| `Unknown function 'fadeIn'` | Same import (animation helpers are plugin-backed) |
|
|
18
|
+
| `Expected ... but "," found` | Do not put `, volume:` after a plugin call on the same line |
|
|
19
|
+
| Parse error on imagine prompt | Remove nested `"` quotes inside the prompt string |
|
|
20
|
+
|
|
5
21
|
## Program Structure
|
|
6
22
|
|
|
7
23
|
A VidScript program is a sequence of statements separated by newlines.
|
|
@@ -221,17 +237,21 @@ Audio sources can be MP3 inputs, audio plugin results, or the embedded audio str
|
|
|
221
237
|
### Plugin Calls
|
|
222
238
|
|
|
223
239
|
```vidscript
|
|
224
|
-
import
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
[-] = audio tts("Welcome to SceneRok", voice: "
|
|
228
|
-
[-] = video xai.imagine("Cinematic product shot", aspect_ratio: "9:16")
|
|
229
|
-
[-] = audio music("upbeat launch soundtrack", duration: 12, instrumental: true)
|
|
230
|
-
[-] = audio xai.tts("Next line", voice: "eve")
|
|
231
|
-
[-] = tts("Next line")
|
|
240
|
+
import xai from "@scenerok/xai"
|
|
241
|
+
|
|
242
|
+
[-] = video xai.imagine("Cinematic product shot", aspect_ratio: "9:16", duration: 5)
|
|
243
|
+
[-] = audio xai.tts("Welcome to SceneRok", voice: "eve")
|
|
232
244
|
```
|
|
233
245
|
|
|
234
|
-
Plugins
|
|
246
|
+
Plugins require an explicit default import. The server registers `@scenerok/xai` when API keys are configured. Plugin calls run at compile time and must appear **inside time blocks**, not in `let` assignments.
|
|
247
|
+
|
|
248
|
+
**Invalid (will not validate):**
|
|
249
|
+
|
|
250
|
+
```vidscript
|
|
251
|
+
[-] = video xai.imagine("...") # missing import
|
|
252
|
+
[-] = audio music("..."), volume: 0.5 # trailing params after plugin call
|
|
253
|
+
let clip = xai.imagine("...") # plugin assigned to variable
|
|
254
|
+
```
|
|
235
255
|
|
|
236
256
|
## Animations, Effects & Plugins (v2 Extensibility)
|
|
237
257
|
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
# VidScript v2 Sample — Product
|
|
2
|
-
# A 6-second vertical video for TikTok / Instagram Reels
|
|
3
|
-
# Demonstrates dynamic timeblocks, video shorthand, named args, expressions, and filters
|
|
1
|
+
# VidScript v2 Sample — Product promo with generated video
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
Copy this shape for promos that use xAI-generated clips. Run `scenerok validate` before `scenerok render`.
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
hero.Trim(start: 0s, end: 6s)
|
|
5
|
+
```vidscript
|
|
6
|
+
import xai from "@scenerok/xai"
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
input product_name = "{{product_name | RokMilk}}"
|
|
9
|
+
input hook_text = "{{hook_text | Chocolate Milkshake}}"
|
|
10
|
+
input cta_text = "{{cta_text | visit your nearest grocery store}}"
|
|
13
11
|
|
|
14
|
-
[
|
|
12
|
+
[0s .. 2.5s] = text product_name, font: "Bebas Neue", size: 80, color: "#FFD700", x: "50%", y: "20%", align: center, stroke: "#3E1C00", stroke_width: 4, animate: fadeIn(0.6s)
|
|
15
13
|
|
|
16
|
-
[
|
|
14
|
+
[2s .. 4.5s] = text hook_text, font: "Outfit", size: 52, color: "#FFFFFF", x: "50%", y: "45%", align: center, stroke: "#3E1C00", stroke_width: 3, animate: riseIn(0.8s)
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
[-] = video xai.imagine(
|
|
17
|
+
"Premium lifestyle product shot of " + product_name + " chocolate milk in 250ml carton, cinematic lighting, 9:16 vertical",
|
|
18
|
+
aspect_ratio: "9:16",
|
|
19
|
+
duration: 6
|
|
20
|
+
)
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
[8s .. 11s] = text cta_text, font: "Bebas Neue", size: 48, color: "#FFD700", x: "50%", y: "80%", align: center, stroke: "#3E1C00", stroke_width: 4, animate: fadeIn(0.8s)
|
|
23
|
+
|
|
24
|
+
[0s .. 12s] = filter "vignette", intensity: 0.3
|
|
25
|
+
|
|
26
|
+
output to "product-promo.mp4", resolution: "1080x1920", fps: 30
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
For clips you already have (no xAI), start from `examples/system/product-launch.vid` instead.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# VidScript v2 — Strict Agent Reference
|
|
2
|
+
|
|
3
|
+
Follow these rules exactly. When in doubt, copy a file from `examples/system/` (installed with `scenerok skills install`).
|
|
4
|
+
|
|
5
|
+
## Rule 1: Plugin imports are mandatory
|
|
6
|
+
|
|
7
|
+
```vidscript
|
|
8
|
+
import xai from "@scenerok/xai"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Without this line, `xai.imagine`, `xai.tts`, and animation helpers like `fadeIn` fail validation.
|
|
12
|
+
|
|
13
|
+
**Never** call `video xai.imagine(...)` or `animate: fadeIn(...)` without the import above.
|
|
14
|
+
|
|
15
|
+
## Rule 2: Put plugin calls directly in time blocks
|
|
16
|
+
|
|
17
|
+
```vidscript
|
|
18
|
+
[-] = video xai.imagine("Prompt here", aspect_ratio: "9:16", duration: 5)
|
|
19
|
+
[-] = audio xai.tts("Voiceover line", voice: "eve")
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Never** assign plugins to variables: `let clip = xai.imagine(...)` is invalid.
|
|
23
|
+
|
|
24
|
+
## Rule 3: Time ranges use `..`
|
|
25
|
+
|
|
26
|
+
```vidscript
|
|
27
|
+
[0s .. 5s] = text "Hello"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Not `[0s - 5s]`.
|
|
31
|
+
|
|
32
|
+
## Rule 4: Text params stay on one line
|
|
33
|
+
|
|
34
|
+
```vidscript
|
|
35
|
+
[0.5s .. 3s] = text "Headline", font: "Inter", size: 64, color: "#FFFFFF", x: "50%", y: "30%", align: center
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Rule 5: Quote safety in prompts
|
|
39
|
+
|
|
40
|
+
Use only straight `"` inside `xai.imagine("...")`. Do not nest quotes inside the prompt string (e.g. avoid `"RokMilk"` inside the prompt — say `labeled RokMilk` without extra quotes).
|
|
41
|
+
|
|
42
|
+
## Rule 6: Audio syntax
|
|
43
|
+
|
|
44
|
+
```vidscript
|
|
45
|
+
[-] = audio xai.tts("Spoken line", voice: "eve", speed: 1.0)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Invalid:** `audio music("...", duration: 15), volume: 0.35` — trailing `, volume` after a plugin call is a parse error.
|
|
49
|
+
|
|
50
|
+
Music/generative audio plugins require their own `import` when available; do not invent bare `music(...)` calls.
|
|
51
|
+
|
|
52
|
+
## Rule 7: Filters
|
|
53
|
+
|
|
54
|
+
```vidscript
|
|
55
|
+
[0s .. 15s] = filter "vignette", intensity: 0.3
|
|
56
|
+
[0s .. 15s] = filter "saturation", value: 1.12
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`saturation` uses `value`, not `intensity`.
|
|
60
|
+
|
|
61
|
+
## Rule 8: Always end with output
|
|
62
|
+
|
|
63
|
+
```vidscript
|
|
64
|
+
output to "video.mp4", resolution: "1080x1920", fps: 30
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Do **not** use legacy `config { }` blocks — they are not part of VidScript v2.
|
|
68
|
+
|
|
69
|
+
## Animations (after import)
|
|
70
|
+
|
|
71
|
+
```vidscript
|
|
72
|
+
[0s .. 2s] = text "Launch", x: "50%", y: "50%", animate: popIn(0.7s)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Available: `fadeIn`, `fadeOut`, `slideX`, `slideY`, `popIn`, `riseIn`, `swingIn`, `glitchIn`, `float`, `typewriter`.
|
|
76
|
+
|
|
77
|
+
## Validate before render
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
scenerok validate my-video.vid
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Each error line includes `Line N:C — message` when the server returns location info.
|
|
84
|
+
|
|
85
|
+
## Bundled examples
|
|
86
|
+
|
|
87
|
+
| File | Use case |
|
|
88
|
+
|------|----------|
|
|
89
|
+
| `minimal-text-reel.vid` | Text-only, no API keys |
|
|
90
|
+
| `product-launch.vid` | User video input + text + vignette |
|
|
91
|
+
| `ecom-product-launch.vid` | xAI product visuals + CTA |
|
|
92
|
+
| `3-tips-fitness.vid` | Multiple `[-]` blocks + xAI per segment |
|
|
93
|
+
| `rokmilk-chocolate-promo.vid` | 15s generated-video promo pattern |
|
|
94
|
+
|
|
95
|
+
Full grammar: https://scenerok.com/docs/vidscript
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scenerok
|
|
3
|
+
description: >-
|
|
4
|
+
Compose VidScript v2 scripts and render videos with the SceneRok CLI
|
|
5
|
+
(scenerok validate, render, status). Use when the user asks to create
|
|
6
|
+
promos, reels, social videos, product launches, or mentions VidScript,
|
|
7
|
+
SceneRok, scenerok CLI, or terminal/agent video generation.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# SceneRok Skill for Aider
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
You are a VidScript composer and video generation expert integrated with Aider. You help users create video content using the SceneRok platform directly from their terminal.
|
|
15
|
+
|
|
16
|
+
## Capabilities
|
|
17
|
+
|
|
18
|
+
- Compose VidScript files for video generation
|
|
19
|
+
- Validate VidScript syntax before rendering
|
|
20
|
+
- Submit render jobs to SceneRok
|
|
21
|
+
- Check render status and retrieve output
|
|
22
|
+
- Guide users through video creation workflows
|
|
23
|
+
- Fill template placeholders and customize system templates
|
|
24
|
+
|
|
25
|
+
## VidScript Language
|
|
26
|
+
|
|
27
|
+
VidScript is a declarative language for describing video compositions using time blocks, inputs, text overlays, video operations, filters, and compositing.
|
|
28
|
+
|
|
29
|
+
### Core Concepts
|
|
30
|
+
|
|
31
|
+
**Inputs** - Declare video sources:
|
|
32
|
+
```vidscript
|
|
33
|
+
input hero = "https://cdn.example.com/hero.mp4"
|
|
34
|
+
input logo = "/uploads/logo.png"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Time Blocks** - Define what happens during a time range:
|
|
38
|
+
```vidscript
|
|
39
|
+
[-] = hero # auto-append: starts after previous block
|
|
40
|
+
hero.Trim(start: 0s, end: 5s)
|
|
41
|
+
|
|
42
|
+
[- 3s] = text "Hello", style: title, color: "#FFF" # auto-start, 3s duration
|
|
43
|
+
[0s .. 5s] = hero # explicit range
|
|
44
|
+
[prev + 0.5s .. prev + 2s] = filter "glow" # expression-based
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Video Operations** - Modify how video plays:
|
|
48
|
+
```vidscript
|
|
49
|
+
hero.Trim(start: 0s, end: 5s) # trim clip
|
|
50
|
+
hero.Speed(factor: 1.5) # 50% faster
|
|
51
|
+
hero.Resize(width: 1080, height: 1920)
|
|
52
|
+
hero.Loop(count: 3) # play 3 times
|
|
53
|
+
hero.Opacity(value: 0.5, duration: 2s)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Compositing** - Layer videos:
|
|
57
|
+
```vidscript
|
|
58
|
+
base.Overlay(logo, x: 50, y: 50, opacity: 0.8)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Filters & Shaders** - Post-processing effects:
|
|
62
|
+
```vidscript
|
|
63
|
+
[0s .. 5s] = filter "vignette", intensity: 0.4
|
|
64
|
+
[2s .. 4s] = filter "sepia", intensity: 0.6
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Built-in filters: `monochrome`, `sepia`, `blur`, `chromatic`, `glitch`, `vignette`, `contrast`, `saturation`, `brightness`
|
|
68
|
+
|
|
69
|
+
**Text Overlays** - Add on-screen text:
|
|
70
|
+
```vidscript
|
|
71
|
+
[0.5s .. 3s] = text "Headline", style: title, position: center, color: "#FFF", size: 72, stroke: "#000", stroke_width: 3
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Output** - Specify render settings:
|
|
75
|
+
```vidscript
|
|
76
|
+
output to "video.mp4", resolution: "1080x1920", fps: 30
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Module System
|
|
80
|
+
|
|
81
|
+
```vidscript
|
|
82
|
+
export const BRAND_COLOR = "#FF5733"
|
|
83
|
+
export timeline intro(clip: string, headline: string) {
|
|
84
|
+
[-] = clip # auto-append
|
|
85
|
+
clip.Trim(start: 0s, end: 3s)
|
|
86
|
+
[- 2s] = text headline, style: title # auto-start, 2s duration
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```vidscript
|
|
91
|
+
import { intro } from "./timelines.vid"
|
|
92
|
+
import * as pack from "./effects.vid"
|
|
93
|
+
import eleven from "@elevenlabs/tts" # future scoped package # from npm registry
|
|
94
|
+
import music from "@elevenlabs/music" # generative music
|
|
95
|
+
use intro at [-] with { clip: main, headline: "Welcome" }
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Plugin Calls (required import)
|
|
99
|
+
|
|
100
|
+
```vidscript
|
|
101
|
+
import xai from "@scenerok/xai"
|
|
102
|
+
|
|
103
|
+
[-] = video xai.imagine("Cinematic product shot", aspect_ratio: "9:16", duration: 5)
|
|
104
|
+
[-] = audio xai.tts("Welcome to SceneRok", voice: "eve")
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Always** add `import xai from "@scenerok/xai"` before any `xai.imagine` / `xai.tts` call or `animate: fadeIn(...)` helper. Calls without import fail validation with `Unknown function 'xai.imagine'`.
|
|
108
|
+
|
|
109
|
+
Put plugin calls **directly** in time blocks — never `let clip = xai.imagine(...)`.
|
|
110
|
+
|
|
111
|
+
Read `vidscript-strict.md` for anti-patterns and `examples/system/*.vid` for copy-paste templates (installed with `scenerok skills install`).
|
|
112
|
+
|
|
113
|
+
### Placeholders
|
|
114
|
+
|
|
115
|
+
Templates use `{{name | default}}` for user-supplied values:
|
|
116
|
+
```vidscript
|
|
117
|
+
input hero = "{{hero_clip}}"
|
|
118
|
+
[0.5s .. 3s] = text "{{headline | Hello}}", style: title
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Workflow
|
|
122
|
+
|
|
123
|
+
1. **Understand the goal** — What video does the user want? (promo, testimonial, meme, etc.)
|
|
124
|
+
2. **Plan the structure** — Time blocks, durations, inputs
|
|
125
|
+
3. **Gather assets** — Video URLs or local paths
|
|
126
|
+
4. **Compose VidScript** — Write the full script
|
|
127
|
+
5. **Validate** — Run `scenerok validate script.vid`
|
|
128
|
+
6. **Render** — Run `scenerok render script.vid --watch`
|
|
129
|
+
7. **Deliver** — Share the download URL when complete
|
|
130
|
+
|
|
131
|
+
## Best Practices
|
|
132
|
+
|
|
133
|
+
- **Use dynamic timeblocks** — `[-]` auto-advances the cursor, reducing calculation errors
|
|
134
|
+
- **Use `prev` for offsets** — `[prev + 0.5s .. prev + 2s]` for gaps between content
|
|
135
|
+
- **Named arguments for clarity** — `hero.Trim(start: 0s, end: 5s)` over `hero.Trim(0s, 5s)`
|
|
136
|
+
- Use 1080x1920 for vertical content (TikTok/Instagram)
|
|
137
|
+
- Use 1920x1080 for horizontal content (YouTube)
|
|
138
|
+
- Hook viewers in the first 3 seconds
|
|
139
|
+
- Use high-contrast text on video backgrounds with `stroke` and `stroke_width`
|
|
140
|
+
- Include a clear call-to-action
|
|
141
|
+
- Test with `scenerok validate` before rendering
|
|
142
|
+
- Each render costs 1 credit
|
|
143
|
+
|
|
144
|
+
## CLI Commands
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
scenerok auth login # Authenticate
|
|
148
|
+
scenerok validate script.vid # Validate a VidScript
|
|
149
|
+
scenerok render script.vid --watch # Render a video
|
|
150
|
+
scenerok status <render-id> # Check status
|
|
151
|
+
scenerok skills install <platform> # Install/update agent skill
|
|
152
|
+
scenerok skills list # List available skills
|
|
153
|
+
scenerok secrets set KEY=VALUE # Store API key for plugins
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Error Handling
|
|
157
|
+
|
|
158
|
+
If a render fails:
|
|
159
|
+
1. Check the error message with `scenerok status <id>`
|
|
160
|
+
2. Common issues: missing assets (404 URLs), invalid file paths, syntax errors
|
|
161
|
+
3. Fix the VidScript and re-render
|
|
162
|
+
4. If credits are insufficient, the user needs to purchase more
|
|
163
|
+
|
|
164
|
+
## Sample Video Types
|
|
165
|
+
|
|
166
|
+
- **Product Promo** — Hero clip + headline + description + CTA + vignette filter
|
|
167
|
+
- **Social Media Hook** — Fast cuts, bold text, speed adjustments
|
|
168
|
+
- **Testimonial** — Speaker clip + quote text + sepia filter
|
|
169
|
+
- **Meme Remix** — Reaction clip + top/bottom punchline overlays
|
|
170
|
+
- **Title Sequence** — Background clip + glitch shader + bold typography
|
|
171
|
+
|
|
172
|
+
Always ask clarifying questions about:
|
|
173
|
+
- Target platform (TikTok, Instagram, YouTube, etc.)
|
|
174
|
+
- Brand colors and fonts
|
|
175
|
+
- Existing assets (video clips, logo, etc.)
|
|
176
|
+
- Desired duration and style
|
|
177
|
+
- Whether they want to start from a template or from scratch
|
|
178
|
+
|
|
179
|
+
## Reference files (in this skill folder)
|
|
180
|
+
|
|
181
|
+
| File | Purpose |
|
|
182
|
+
|------|---------|
|
|
183
|
+
| `vidscript-guide.md` | Full grammar reference |
|
|
184
|
+
| `vidscript-strict.md` | **Read first** — rules that prevent common agent mistakes |
|
|
185
|
+
| `vidscript-sample.md` | Minimal promo with xAI import |
|
|
186
|
+
| `examples/system/*.vid` | Official SceneRok templates (text-only, product launch, xAI reels) |
|
|
187
|
+
|
|
188
|
+
## Full Reference
|
|
189
|
+
|
|
190
|
+
https://scenerok.com/docs/vidscript
|