@scenerok/cli 1.0.4 → 1.0.6
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 +6 -3
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +17 -1
- package/dist/commands/project.d.ts.map +1 -1
- package/dist/commands/project.js +16 -2
- package/dist/commands/render.d.ts.map +1 -1
- package/dist/commands/render.js +14 -0
- 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 +38 -9
- package/dist/index.js +3 -1
- package/dist/lib/api.d.ts +14 -0
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +38 -4
- package/dist/lib/format-api-error.d.ts +2 -0
- package/dist/lib/format-api-error.d.ts.map +1 -0
- package/dist/lib/format-api-error.js +24 -0
- package/dist/lib/logger.d.ts +8 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +51 -0
- 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 +25 -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 +27 -22
- package/skills/aider/vidscript-guide.md +62 -39
- package/skills/aider/vidscript-sample.md +23 -14
- package/skills/aider/vidscript-strict.md +113 -0
- package/skills/claude/SKILL.md +27 -22
- package/skills/claude/vidscript-guide.md +59 -37
- package/skills/claude/vidscript-sample.md +23 -14
- package/skills/claude/vidscript-strict.md +113 -0
- package/skills/codex/SKILL.md +27 -22
- package/skills/codex/vidscript-guide.md +62 -39
- package/skills/codex/vidscript-sample.md +23 -14
- package/skills/codex/vidscript-strict.md +113 -0
- package/skills/cursor/SKILL.md +27 -22
- package/skills/cursor/vidscript-guide.md +62 -39
- package/skills/cursor/vidscript-sample.md +23 -14
- package/skills/cursor/vidscript-strict.md +113 -0
- package/skills/opencode/SKILL.md +27 -22
- package/skills/opencode/vidscript-guide.md +62 -39
- package/skills/opencode/vidscript-sample.md +23 -14
- package/skills/opencode/vidscript-strict.md +113 -0
- package/skills/skills/aider/SKILL.md +185 -0
- package/skills/skills/aider/vidscript-guide.md +378 -0
- package/skills/skills/aider/vidscript-sample.md +30 -0
- package/skills/skills/aider/vidscript-strict.md +113 -0
- package/skills/skills/claude/SKILL.md +185 -0
- package/skills/skills/claude/vidscript-guide.md +378 -0
- package/skills/skills/claude/vidscript-sample.md +30 -0
- package/skills/skills/claude/vidscript-strict.md +113 -0
- package/skills/skills/codex/SKILL.md +185 -0
- package/skills/skills/codex/vidscript-guide.md +378 -0
- package/skills/skills/codex/vidscript-sample.md +30 -0
- package/skills/skills/codex/vidscript-strict.md +113 -0
- package/skills/skills/cursor/SKILL.md +185 -0
- package/skills/skills/cursor/vidscript-guide.md +378 -0
- package/skills/skills/cursor/vidscript-sample.md +30 -0
- package/skills/skills/cursor/vidscript-strict.md +113 -0
- package/skills/skills/opencode/SKILL.md +185 -0
- package/skills/skills/opencode/vidscript-guide.md +378 -0
- package/skills/skills/opencode/vidscript-sample.md +30 -0
- package/skills/skills/opencode/vidscript-strict.md +113 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Glitch Title
|
|
2
|
+
# A stylized intro with glitch effects and bold typography.
|
|
3
|
+
# Great for gaming, tech, or edgy brand content.
|
|
4
|
+
|
|
5
|
+
input background = "{{background_clip}}"
|
|
6
|
+
|
|
7
|
+
[0s .. 5s] = background
|
|
8
|
+
background.Trim(start: 0s, end: 5s)
|
|
9
|
+
background.Opacity(value: 0.8, duration: 5s)
|
|
10
|
+
|
|
11
|
+
[0.5s .. 3s] = text "{{title}}", font: "Bebas Neue", position: center, color: "#00FF88", size: 72, stroke: "#000000", stroke_width: 4, x: "50%", y: "45%", align: center, letter_spacing: 4
|
|
12
|
+
|
|
13
|
+
[3.2s .. 4.5s] = text "{{subtitle}}", font: "Oswald", position: center, color: "#FF0055", size: 96, stroke: "#000000", stroke_width: 4, x: "50%", y: "60%", align: center, rotation: 2, shadow_color: "#00FF88", shadow_blur: 8
|
|
14
|
+
|
|
15
|
+
[0s .. 5s] = filter "glitch", intensity: 0.4
|
|
16
|
+
|
|
17
|
+
output to "glitch-title.mp4", resolution: "1080x1920", fps: 30
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Meme Remix
|
|
2
|
+
# Fast-cut format with top and bottom text overlays.
|
|
3
|
+
# Perfect for reaction clips, punchline edits, and viral-style content.
|
|
4
|
+
|
|
5
|
+
input clip = "{{reaction_clip}}"
|
|
6
|
+
|
|
7
|
+
[0s .. 4s] = clip
|
|
8
|
+
clip.Trim(start: 0s, end: 4s)
|
|
9
|
+
clip.Speed(factor: 1.2)
|
|
10
|
+
|
|
11
|
+
[0.1s .. 1.5s] = text "{{hook_text}}", style: title, position: top, color: "#FFFFFF", size: 56, stroke: "#000000", stroke_width: 3
|
|
12
|
+
|
|
13
|
+
[2.5s .. 3.8s] = text "{{punchline}}", style: title, position: bottom, color: "#EF4444", size: 64, stroke: "#000000", stroke_width: 4
|
|
14
|
+
|
|
15
|
+
output to "meme-remix.mp4", resolution: "1080x1920", fps: 30
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Minimal Text Reel v2
|
|
2
|
+
# A clean text-only reel demonstrating advanced typography:
|
|
3
|
+
# dynamic placement, rotation, Google Fonts, shadows, letter spacing.
|
|
4
|
+
|
|
5
|
+
[0s .. 2.5s] = text "{{headline}}", font: "Bebas Neue", size: 96, color: "#FFFFFF", x: "50%", y: "30%", align: center, letter_spacing: 8, shadow_color: "#FF0055", shadow_blur: 10, shadow_offset_x: 4, shadow_offset_y: 4
|
|
6
|
+
|
|
7
|
+
[2s .. 4s] = text "{{subtitle}}", font: "Inter", size: 48, color: "#00FF88", x: "50%", y: "55%", align: center, rotation: -3, opacity: 0.9
|
|
8
|
+
|
|
9
|
+
[3.5s .. 5.5s] = text "{{cta}}", font: "Space Grotesk", size: 44, color: "#6366F1", x: "50%", y: "75%", align: center, shadow_color: "#000000", shadow_blur: 16, shadow_offset_y: 6
|
|
10
|
+
|
|
11
|
+
output to "minimal-text-reel.mp4", resolution: "1080x1920", fps: 30
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Product Launch
|
|
2
|
+
# Showcase a product with bold headlines and a clear call-to-action.
|
|
3
|
+
# Uses a subtle vignette filter for cinematic depth.
|
|
4
|
+
|
|
5
|
+
input hero = "{{hero_clip}}"
|
|
6
|
+
|
|
7
|
+
[0s .. 6s] = hero
|
|
8
|
+
hero.Trim(start: 0s, end: 6s)
|
|
9
|
+
|
|
10
|
+
[0.3s .. 2.3s] = text "{{headline}}", style: title, position: top, color: "#FFFFFF", size: 64, stroke: "#000000", stroke_width: 3
|
|
11
|
+
|
|
12
|
+
[2.5s .. 4.5s] = text "{{description}}", style: caption, position: center, color: "#F3F4F6", size: 36, stroke: "#000000", stroke_width: 2
|
|
13
|
+
|
|
14
|
+
[4.5s .. 5.8s] = text "{{cta}}", style: title, position: bottom, color: "#F59E0B", size: 52, stroke: "#000000", stroke_width: 3
|
|
15
|
+
|
|
16
|
+
[0s .. 6s] = filter "vignette", intensity: 0.35
|
|
17
|
+
|
|
18
|
+
output to "product-launch.mp4", resolution: "1080x1920", fps: 30
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# RokMilk Chocolate Milkshake — 15s promo (correct VidScript v2 patterns)
|
|
2
|
+
# Requires: scenerok secrets set XAI_API_KEY=... (or configured on scenerok.com account)
|
|
3
|
+
|
|
4
|
+
import xai from "@scenerok/xai"
|
|
5
|
+
import motion from "@scenerok/basic-animations"
|
|
6
|
+
|
|
7
|
+
# Generated visuals — one clip per segment; prompts must use straight double quotes only
|
|
8
|
+
[-] = video xai.imagine("Cinematic slow-motion pour of rich creamy chocolate milk into a sleek modern 250ml carton on marble, warm studio lighting, shallow depth of field, 9:16 vertical", aspect_ratio: "9:16", duration: 5)
|
|
9
|
+
|
|
10
|
+
[-] = video xai.imagine("Elegant rotating product shot of premium chocolate milk carton labeled RokMilk, brown and gold palette, soft bokeh, advertising visual, 9:16 vertical", aspect_ratio: "9:16", duration: 5)
|
|
11
|
+
|
|
12
|
+
[-] = video xai.imagine("Silky chocolate milk swirl in glass with RokMilk carton blurred in background, golden light, appetizing food cinematography, 9:16 vertical", aspect_ratio: "9:16", duration: 5)
|
|
13
|
+
|
|
14
|
+
[0s .. 2.5s] = text "RokMilk", font: "Bebas Neue", size: 80, color: "#FFD700", x: "50%", y: "18%", align: center, stroke: "#3E1C00", stroke_width: 4, letter_spacing: 6, animate: motion.fadeIn(0.6s)
|
|
15
|
+
|
|
16
|
+
[2s .. 5s] = text "Chocolate Milkshake", font: "Outfit", size: 56, color: "#FFFFFF", x: "50%", y: "45%", align: center, stroke: "#3E1C00", stroke_width: 3, animate: motion.riseIn(0.8s)
|
|
17
|
+
|
|
18
|
+
[5s .. 8s] = text "250ml of Pure Indulgence", font: "Inter", size: 42, color: "#F3E5AB", x: "50%", y: "55%", align: center, stroke: "#3E1C00", stroke_width: 2, animate: motion.slideY(40, 0, 0.8s)
|
|
19
|
+
|
|
20
|
+
[11s .. 14s] = text "visit your nearest grocery store", font: "Bebas Neue", size: 48, color: "#FFD700", x: "50%", y: "82%", align: center, stroke: "#3E1C00", stroke_width: 4, letter_spacing: 3, animate: motion.fadeIn(1s)
|
|
21
|
+
|
|
22
|
+
[0s .. 15s] = filter "vignette", intensity: 0.3
|
|
23
|
+
[0s .. 15s] = filter "saturation", value: 1.12
|
|
24
|
+
|
|
25
|
+
output to "rokmilk-chocolate-promo.mp4", resolution: "1080x1920", fps: 30, background: "#1A0F05"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Testimonial Cut
|
|
2
|
+
# A quote-focused format with a subtle vintage feel.
|
|
3
|
+
# Great for customer stories, reviews, and social proof clips.
|
|
4
|
+
|
|
5
|
+
input speaker = "{{speaker_clip}}"
|
|
6
|
+
|
|
7
|
+
[0s .. 5s] = speaker
|
|
8
|
+
speaker.Trim(start: 0s, end: 5s)
|
|
9
|
+
|
|
10
|
+
[0.5s .. 3s] = text "{{quote}}", style: subtitle, position: center, color: "#FFFFFF", size: 42, stroke: "#000000", stroke_width: 2
|
|
11
|
+
|
|
12
|
+
[3.2s .. 4.8s] = text "{{attribution}}", style: caption, position: bottom, color: "#D1D5DB", size: 32, stroke: "#000000", stroke_width: 2
|
|
13
|
+
|
|
14
|
+
[0s .. 5s] = filter "sepia", intensity: 0.3
|
|
15
|
+
|
|
16
|
+
output to "testimonial.mp4", resolution: "1080x1920", fps: 30
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# UGC Testimonial with Voiceover - Reusable Template
|
|
2
|
+
# Uses xAI (via explicit import) for TTS voiceover + generated visuals
|
|
3
|
+
|
|
4
|
+
import xai from "@scenerok/xai"
|
|
5
|
+
|
|
6
|
+
# === INPUTS ===
|
|
7
|
+
input quote = "{{quote | This product completely changed how I work}}"
|
|
8
|
+
input customer_name = "{{customer_name | Sarah K.}}"
|
|
9
|
+
input product_name = "{{product_name | SceneRok}}"
|
|
10
|
+
|
|
11
|
+
# === VOICEOVER + VISUAL ===
|
|
12
|
+
[-] = audio xai.tts(
|
|
13
|
+
quote + ". " + customer_name + " from " + product_name,
|
|
14
|
+
voice: "eve",
|
|
15
|
+
speed: 1.05
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
[-] = video xai.imagine(
|
|
19
|
+
"Cinematic lifestyle shot representing: " + quote + ", premium modern aesthetic, 9:16 vertical",
|
|
20
|
+
aspect_ratio: "9:16",
|
|
21
|
+
resolution: "1k"
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
# === QUOTE TEXT (appears while voiceover plays) ===
|
|
25
|
+
[-] = text "\"" + quote + "\"", style: quote, position: center, color: "#FFFFFF", size: 52, align: center
|
|
26
|
+
|
|
27
|
+
# === ATTRIBUTION ===
|
|
28
|
+
[- 2s] = text "— " + customer_name, style: attribution, position: "center, 75%", color: "#CCCCCC", size: 32
|
|
29
|
+
|
|
30
|
+
# === BRANDING ===
|
|
31
|
+
[-] = text "Made with SceneRok", style: watermark, position: "85%, 92%", color: "#888888", size: 24, opacity: 0.6
|
|
32
|
+
|
|
33
|
+
output to "ugc-testimonial.mp4", resolution: "1080x1920", fps: 30
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Voice + Visual Promo
|
|
2
|
+
# Combines main footage with voiceover or music and layered titles.
|
|
3
|
+
|
|
4
|
+
input main = "{{main_video}}"
|
|
5
|
+
input voice = "{{voiceover_audio}}"
|
|
6
|
+
|
|
7
|
+
[0s .. 12s] = main
|
|
8
|
+
main.Trim(start: 0s, end: 12s)
|
|
9
|
+
|
|
10
|
+
[0s .. 12s] = audio voice, volume: 0.9
|
|
11
|
+
|
|
12
|
+
[0.5s .. 3s] = text "{{title}}", font: "Inter", size: 68, color: "{{brand_color}}", x: "50%", y: "22%", align: center, stroke: "#111827", stroke_width: 3
|
|
13
|
+
|
|
14
|
+
[3s .. 7s] = text "{{subtitle}}", font: "Inter", size: 34, color: "#F3F4F6", x: "50%", y: "50%", align: center, stroke: "#0F172A", stroke_width: 2
|
|
15
|
+
|
|
16
|
+
[7s .. 11s] = text "{{cta}}", font: "Inter", size: 56, color: "#FFFFFF", x: "50%", y: "78%", align: center, stroke: "#000000", stroke_width: 3
|
|
17
|
+
|
|
18
|
+
[0s .. 12s] = filter "vignette", intensity: 0.22
|
|
19
|
+
[0s .. 12s] = filter "saturation", value: 1.12
|
|
20
|
+
|
|
21
|
+
output to "voice-visual-promo.mp4", resolution: "1080x1920", fps: 30
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scenerok/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "SceneRok CLI - Create videos from your terminal and agent workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
12
|
"skills",
|
|
13
|
+
"examples",
|
|
13
14
|
"README.md"
|
|
14
15
|
],
|
|
15
16
|
"scripts": {
|
package/skills/aider/SKILL.md
CHANGED
|
@@ -67,37 +67,34 @@ Built-in filters: `monochrome`, `sepia`, `blur`, `chromatic`, `glitch`, `vignett
|
|
|
67
67
|
output to "video.mp4", resolution: "1080x1920", fps: 30
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
###
|
|
70
|
+
### Package Imports
|
|
71
71
|
|
|
72
72
|
```vidscript
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
clip.Trim(start: 0s, end: 3s)
|
|
77
|
-
[- 2s] = text headline, style: title # auto-start, 2s duration
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
```vidscript
|
|
82
|
-
import { intro } from "./timelines.vid"
|
|
83
|
-
import * as pack from "./effects.vid"
|
|
84
|
-
import eleven from "@elevenlabs/tts" # future scoped package # from npm registry
|
|
85
|
-
import music from "@elevenlabs/music" # generative music
|
|
86
|
-
use intro at [-] with { clip: main, headline: "Welcome" }
|
|
73
|
+
import xai from "@scenerok/xai" # xAI image/video/tts
|
|
74
|
+
import eleven from "@elevenlabs/music" # ElevenLabs generative music
|
|
75
|
+
import motion from "@scenerok/basic-animations" # text/video animation helpers
|
|
87
76
|
```
|
|
88
77
|
|
|
89
78
|
### Plugin Calls
|
|
90
79
|
|
|
91
80
|
```vidscript
|
|
92
|
-
import
|
|
81
|
+
import xai from "@scenerok/xai"
|
|
82
|
+
import eleven from "@elevenlabs/music"
|
|
83
|
+
import motion from "@scenerok/basic-animations"
|
|
84
|
+
|
|
85
|
+
[-] = video xai.imagine("Cinematic product shot", aspect_ratio: "9:16", duration: 5)
|
|
86
|
+
[-] = audio xai.tts("Welcome to SceneRok", voice: "eve")
|
|
93
87
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
[
|
|
97
|
-
[-] = audio xai.tts("Next line", voice: "eve")
|
|
88
|
+
# ElevenLabs music package functions require an import alias.
|
|
89
|
+
let bed = eleven.music("Warm premium launch bed", duration: 15, instrumental: true)
|
|
90
|
+
[0s .. 15s] = audio bed, volume: 0.35, fade_out: 2s
|
|
98
91
|
```
|
|
99
92
|
|
|
100
|
-
|
|
93
|
+
**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'`.
|
|
94
|
+
|
|
95
|
+
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.
|
|
96
|
+
|
|
97
|
+
Read `vidscript-strict.md` for anti-patterns and `examples/system/*.vid` for copy-paste templates (installed with `scenerok skills install`).
|
|
101
98
|
|
|
102
99
|
### Placeholders
|
|
103
100
|
|
|
@@ -165,7 +162,15 @@ Always ask clarifying questions about:
|
|
|
165
162
|
- Desired duration and style
|
|
166
163
|
- Whether they want to start from a template or from scratch
|
|
167
164
|
|
|
165
|
+
## Reference files (in this skill folder)
|
|
166
|
+
|
|
167
|
+
| File | Purpose |
|
|
168
|
+
|------|---------|
|
|
169
|
+
| `vidscript-guide.md` | Full grammar reference |
|
|
170
|
+
| `vidscript-strict.md` | **Read first** — rules that prevent common agent mistakes |
|
|
171
|
+
| `vidscript-sample.md` | Minimal promo with xAI import |
|
|
172
|
+
| `examples/system/*.vid` | Official SceneRok templates (text-only, product launch, xAI reels) |
|
|
173
|
+
|
|
168
174
|
## Full Reference
|
|
169
175
|
|
|
170
|
-
For exhaustive grammar documentation, visit:
|
|
171
176
|
https://scenerok.com/docs/vidscript
|
|
@@ -2,6 +2,24 @@
|
|
|
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 every package function** — use `import xai from "@scenerok/xai"`, `import eleven from "@elevenlabs/music"`, and `import motion from "@scenerok/basic-animations"` before calling `xai.*`, `eleven.*`, or `motion.*`.
|
|
8
|
+
2. **Validate early** — `scenerok validate file.vid` (errors show as `Line N:C — message`).
|
|
9
|
+
3. **Music package syntax** — `import eleven from "@elevenlabs/music"`, then call `eleven.music(...)`, `eleven.generateMusic(...)`, or `eleven.composeMusic(...)`.
|
|
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
|
+
5. **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).
|
|
12
|
+
|
|
13
|
+
### Common validation failures
|
|
14
|
+
|
|
15
|
+
| Symptom | Fix |
|
|
16
|
+
|---------|-----|
|
|
17
|
+
| `Unknown function 'xai.imagine'` | Add `import xai from "@scenerok/xai"` at top |
|
|
18
|
+
| `Unknown function 'fadeIn'` | Use `import motion from "@scenerok/basic-animations"` and call `motion.fadeIn(...)` |
|
|
19
|
+
| `Expected ... but "," found` | Do not put `, volume:` after a direct plugin call. Use `let bed = eleven.music(...)`, then `audio bed, volume: ...` |
|
|
20
|
+
| `Unknown function 'eleven.generateMusic'` | Add `import eleven from "@elevenlabs/music"` before calling `eleven.generateMusic(...)` |
|
|
21
|
+
| Parse error on imagine prompt | Remove nested `"` quotes inside the prompt string |
|
|
22
|
+
|
|
5
23
|
## Program Structure
|
|
6
24
|
|
|
7
25
|
A VidScript program is a sequence of statements separated by newlines.
|
|
@@ -50,28 +68,18 @@ let clipName = "hero"
|
|
|
50
68
|
|
|
51
69
|
Variables can hold strings, numbers, time literals, and object expressions. Variables are evaluated at compile time.
|
|
52
70
|
|
|
53
|
-
###
|
|
54
|
-
|
|
55
|
-
```vidscript
|
|
56
|
-
# Export a constant
|
|
57
|
-
export const BRAND_COLOR = "#FF5733"
|
|
58
|
-
|
|
59
|
-
# Export a timeline
|
|
60
|
-
export timeline intro(clip: string, title_text: string) {
|
|
61
|
-
[-] = clip
|
|
62
|
-
[- 2s] = text title_text, size: 72
|
|
63
|
-
}
|
|
71
|
+
### Package Imports
|
|
64
72
|
|
|
65
|
-
|
|
66
|
-
import { intro, BRAND_COLOR } from "./timelines.vid"
|
|
73
|
+
Only default package imports are supported for callable packages. Call functions through the imported alias.
|
|
67
74
|
|
|
68
|
-
|
|
69
|
-
import
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
use intro at 0s .. 5s with { clip: hero, title_text: "Hello" }
|
|
75
|
+
```vidscript
|
|
76
|
+
import xai from "@scenerok/xai"
|
|
77
|
+
import eleven from "@elevenlabs/music"
|
|
78
|
+
import motion from "@scenerok/basic-animations"
|
|
73
79
|
```
|
|
74
80
|
|
|
81
|
+
Named imports (`import { fn } ...`) and namespace imports (`import * as ...`) are not supported.
|
|
82
|
+
|
|
75
83
|
## Time Blocks
|
|
76
84
|
|
|
77
85
|
Time blocks are the core of VidScript. They define when instructions execute on the timeline.
|
|
@@ -221,17 +229,30 @@ Audio sources can be MP3 inputs, audio plugin results, or the embedded audio str
|
|
|
221
229
|
### Plugin Calls
|
|
222
230
|
|
|
223
231
|
```vidscript
|
|
224
|
-
import
|
|
225
|
-
import
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
[-] = video xai.imagine("Cinematic product shot", aspect_ratio: "9:16")
|
|
229
|
-
[-] = audio
|
|
230
|
-
|
|
231
|
-
|
|
232
|
+
import xai from "@scenerok/xai"
|
|
233
|
+
import eleven from "@elevenlabs/music"
|
|
234
|
+
import motion from "@scenerok/basic-animations"
|
|
235
|
+
|
|
236
|
+
[-] = video xai.imagine("Cinematic product shot", aspect_ratio: "9:16", duration: 5)
|
|
237
|
+
[-] = audio xai.tts("Welcome to SceneRok", voice: "eve")
|
|
238
|
+
|
|
239
|
+
# ElevenLabs music package functions require an import alias.
|
|
240
|
+
[0s .. 15s] = audio eleven.music("Warm premium launch bed", duration: 15, instrumental: true)
|
|
241
|
+
|
|
242
|
+
# If you need volume or fades, store the generated audio first.
|
|
243
|
+
let bed = eleven.music("Warm premium launch bed", duration: 15, instrumental: true)
|
|
244
|
+
[0s .. 15s] = audio bed, volume: 0.35, fade_out: 2s
|
|
232
245
|
```
|
|
233
246
|
|
|
234
|
-
|
|
247
|
+
`@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`.
|
|
248
|
+
|
|
249
|
+
**Invalid (will not validate):**
|
|
250
|
+
|
|
251
|
+
```vidscript
|
|
252
|
+
[-] = video xai.imagine("...") # missing xAI import
|
|
253
|
+
[0s .. 15s] = audio eleven.generateMusic("...") # missing `import eleven from "@elevenlabs/music"`
|
|
254
|
+
[0s .. 15s] = audio eleven.music("..."), volume: 0.5 # trailing params after direct plugin call
|
|
255
|
+
```
|
|
235
256
|
|
|
236
257
|
## Animations, Effects & Plugins (v2 Extensibility)
|
|
237
258
|
|
|
@@ -249,9 +270,11 @@ These accept either plugin function calls or plain object descriptors.
|
|
|
249
270
|
Attach animations to **any** text or video surface.
|
|
250
271
|
|
|
251
272
|
```vidscript
|
|
252
|
-
|
|
273
|
+
import motion from "@scenerok/basic-animations"
|
|
274
|
+
|
|
275
|
+
text "Hello", animate: motion.fadeIn(0.8s)
|
|
253
276
|
|
|
254
|
-
video hero, animate: [fadeIn(0.5s), slideY(-40, 0, 1.2s)]
|
|
277
|
+
video hero, animate: [motion.fadeIn(0.5s), motion.slideY(-40, 0, 1.2s)]
|
|
255
278
|
|
|
256
279
|
text "Title", animate: {
|
|
257
280
|
type: "fade",
|
|
@@ -279,16 +302,16 @@ video hero, effects: [{
|
|
|
279
302
|
|
|
280
303
|
| Function | Description |
|
|
281
304
|
|---------------------------|------------------------------|
|
|
282
|
-
| `fadeIn(duration?)` | Opacity 0 → 1 |
|
|
283
|
-
| `fadeOut(duration?)` | Opacity 1 → 0 |
|
|
284
|
-
| `slideX(from, to, dur?)` | Horizontal slide |
|
|
285
|
-
| `slideY(from, to, dur?)` | Vertical slide |
|
|
286
|
-
| `popIn(duration?)` | Scale + fade entrance |
|
|
287
|
-
| `riseIn(duration?, dist?)` | Upward fade entrance |
|
|
288
|
-
| `swingIn(duration?)` | Rotating slide/fade |
|
|
289
|
-
| `glitchIn(duration?)` | Jitter + flash entrance |
|
|
290
|
-
| `float(duration?, amp?)` | Gentle vertical bob |
|
|
291
|
-
| `typewriter(duration?)` | Character reveal |
|
|
305
|
+
| `motion.fadeIn(duration?)` | Opacity 0 → 1 |
|
|
306
|
+
| `motion.fadeOut(duration?)` | Opacity 1 → 0 |
|
|
307
|
+
| `motion.slideX(from, to, dur?)` | Horizontal slide |
|
|
308
|
+
| `motion.slideY(from, to, dur?)` | Vertical slide |
|
|
309
|
+
| `motion.popIn(duration?)` | Scale + fade entrance |
|
|
310
|
+
| `motion.riseIn(duration?, dist?)` | Upward fade entrance |
|
|
311
|
+
| `motion.swingIn(duration?)` | Rotating slide/fade |
|
|
312
|
+
| `motion.glitchIn(duration?)` | Jitter + flash entrance |
|
|
313
|
+
| `motion.float(duration?, amp?)` | Gentle vertical bob |
|
|
314
|
+
| `motion.typewriter(duration?)` | Character reveal |
|
|
292
315
|
|
|
293
316
|
More plugins (advanced text animations, pixel effects, 3D, etc.) are planned.
|
|
294
317
|
|
|
@@ -1,21 +1,30 @@
|
|
|
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
|
-
|
|
5
|
+
```vidscript
|
|
6
|
+
import xai from "@scenerok/xai"
|
|
7
|
+
import motion from "@scenerok/basic-animations"
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
input product_name = "{{product_name | RokMilk}}"
|
|
10
|
+
input hook_text = "{{hook_text | Chocolate Milkshake}}"
|
|
11
|
+
input cta_text = "{{cta_text | visit your nearest grocery store}}"
|
|
13
12
|
|
|
14
|
-
[
|
|
13
|
+
[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: motion.fadeIn(0.6s)
|
|
15
14
|
|
|
16
|
-
[
|
|
15
|
+
[2s .. 4.5s] = text hook_text, font: "Outfit", size: 52, color: "#FFFFFF", x: "50%", y: "45%", align: center, stroke: "#3E1C00", stroke_width: 3, animate: motion.riseIn(0.8s)
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
[-] = video xai.imagine(
|
|
18
|
+
"Premium lifestyle product shot of " + product_name + " chocolate milk in 250ml carton, cinematic lighting, 9:16 vertical",
|
|
19
|
+
aspect_ratio: "9:16",
|
|
20
|
+
duration: 6
|
|
21
|
+
)
|
|
20
22
|
|
|
21
|
-
|
|
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
|
+
|
|
25
|
+
[0s .. 12s] = filter "vignette", intensity: 0.3
|
|
26
|
+
|
|
27
|
+
output to "product-promo.mp4", resolution: "1080x1920", fps: 30
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For clips you already have (no xAI), start from `examples/system/product-launch.vid` instead.
|
|
@@ -0,0 +1,113 @@
|
|
|
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: Package imports are mandatory
|
|
6
|
+
|
|
7
|
+
```vidscript
|
|
8
|
+
import xai from "@scenerok/xai"
|
|
9
|
+
import eleven from "@elevenlabs/music"
|
|
10
|
+
import motion from "@scenerok/basic-animations"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Without the owning import, calls like `xai.imagine`, `xai.tts`, `eleven.music`, and `motion.fadeIn` fail validation.
|
|
14
|
+
|
|
15
|
+
**Never** call package functions without importing the package alias first.
|
|
16
|
+
|
|
17
|
+
## Rule 2: Use registered plugin surfaces
|
|
18
|
+
|
|
19
|
+
```vidscript
|
|
20
|
+
import xai from "@scenerok/xai"
|
|
21
|
+
import eleven from "@elevenlabs/music"
|
|
22
|
+
|
|
23
|
+
[-] = video xai.imagine("Prompt here", aspect_ratio: "9:16", duration: 5)
|
|
24
|
+
[-] = audio xai.tts("Voiceover line", voice: "eve")
|
|
25
|
+
[0s .. 15s] = audio eleven.music("Warm premium music bed", duration: 15, instrumental: true)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
For ElevenLabs music, import `@elevenlabs/music` and use `eleven.music(...)`, `eleven.generateMusic(...)`, or `eleven.composeMusic(...)`.
|
|
29
|
+
|
|
30
|
+
## Rule 3: Time ranges use `..`
|
|
31
|
+
|
|
32
|
+
```vidscript
|
|
33
|
+
[0s .. 5s] = text "Hello"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Not `[0s - 5s]`.
|
|
37
|
+
|
|
38
|
+
## Rule 4: Text params stay on one line
|
|
39
|
+
|
|
40
|
+
```vidscript
|
|
41
|
+
[0.5s .. 3s] = text "Headline", font: "Inter", size: 64, color: "#FFFFFF", x: "50%", y: "30%", align: center
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Rule 5: Quote safety in prompts
|
|
45
|
+
|
|
46
|
+
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).
|
|
47
|
+
|
|
48
|
+
## Rule 6: Audio syntax
|
|
49
|
+
|
|
50
|
+
```vidscript
|
|
51
|
+
import xai from "@scenerok/xai"
|
|
52
|
+
import eleven from "@elevenlabs/music"
|
|
53
|
+
|
|
54
|
+
[-] = audio xai.tts("Spoken line", voice: "eve", speed: 1.0)
|
|
55
|
+
|
|
56
|
+
# Direct music call, no trailing audio params.
|
|
57
|
+
[0s .. 15s] = audio eleven.music("Soft premium ad music", duration: 15, instrumental: true)
|
|
58
|
+
|
|
59
|
+
# Use a binding when you need volume or fades.
|
|
60
|
+
let bed = eleven.music("Soft premium ad music", duration: 15, instrumental: true)
|
|
61
|
+
[0s .. 15s] = audio bed, volume: 0.35, fade_out: 2s
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Invalid:** `audio eleven.music("...", duration: 15), volume: 0.35` — trailing `, volume` after a direct plugin call is a parse error.
|
|
65
|
+
|
|
66
|
+
**Invalid:** `eleven.generateMusic(...)` without `import eleven from "@elevenlabs/music"`.
|
|
67
|
+
|
|
68
|
+
## Rule 7: Filters
|
|
69
|
+
|
|
70
|
+
```vidscript
|
|
71
|
+
[0s .. 15s] = filter "vignette", intensity: 0.3
|
|
72
|
+
[0s .. 15s] = filter "saturation", value: 1.12
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`saturation` uses `value`, not `intensity`.
|
|
76
|
+
|
|
77
|
+
## Rule 8: Always end with output
|
|
78
|
+
|
|
79
|
+
```vidscript
|
|
80
|
+
output to "video.mp4", resolution: "1080x1920", fps: 30
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Do **not** use legacy `config { }` blocks — they are not part of VidScript v2.
|
|
84
|
+
|
|
85
|
+
## Animations (after import)
|
|
86
|
+
|
|
87
|
+
```vidscript
|
|
88
|
+
import motion from "@scenerok/basic-animations"
|
|
89
|
+
|
|
90
|
+
[0s .. 2s] = text "Launch", x: "50%", y: "50%", animate: motion.popIn(0.7s)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Available: `fadeIn`, `fadeOut`, `slideX`, `slideY`, `popIn`, `riseIn`, `swingIn`, `glitchIn`, `float`, `typewriter`.
|
|
94
|
+
|
|
95
|
+
## Validate before render
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
scenerok validate my-video.vid
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Each error line includes `Line N:C — message` when the server returns location info.
|
|
102
|
+
|
|
103
|
+
## Bundled examples
|
|
104
|
+
|
|
105
|
+
| File | Use case |
|
|
106
|
+
|------|----------|
|
|
107
|
+
| `minimal-text-reel.vid` | Text-only, no API keys |
|
|
108
|
+
| `product-launch.vid` | User video input + text + vignette |
|
|
109
|
+
| `ecom-product-launch.vid` | xAI product visuals + CTA |
|
|
110
|
+
| `3-tips-fitness.vid` | Multiple `[-]` blocks + xAI per segment |
|
|
111
|
+
| `rokmilk-chocolate-promo.vid` | 15s generated-video promo pattern |
|
|
112
|
+
|
|
113
|
+
Full grammar: https://scenerok.com/docs/vidscript
|
package/skills/claude/SKILL.md
CHANGED
|
@@ -67,37 +67,34 @@ Built-in filters: `monochrome`, `sepia`, `blur`, `chromatic`, `glitch`, `vignett
|
|
|
67
67
|
output to "video.mp4", resolution: "1080x1920", fps: 30
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
###
|
|
70
|
+
### Package Imports
|
|
71
71
|
|
|
72
72
|
```vidscript
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
clip.Trim(start: 0s, end: 3s)
|
|
77
|
-
[- 2s] = text headline, style: title # auto-start, 2s duration
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
```vidscript
|
|
82
|
-
import { intro } from "./timelines.vid"
|
|
83
|
-
import * as pack from "./effects.vid"
|
|
84
|
-
import eleven from "@elevenlabs/tts" # future scoped package # from npm registry
|
|
85
|
-
import music from "@elevenlabs/music" # generative music
|
|
86
|
-
use intro at [-] with { clip: main, headline: "Welcome" }
|
|
73
|
+
import xai from "@scenerok/xai" # xAI image/video/tts
|
|
74
|
+
import eleven from "@elevenlabs/music" # ElevenLabs generative music
|
|
75
|
+
import motion from "@scenerok/basic-animations" # text/video animation helpers
|
|
87
76
|
```
|
|
88
77
|
|
|
89
78
|
### Plugin Calls
|
|
90
79
|
|
|
91
80
|
```vidscript
|
|
92
|
-
import
|
|
81
|
+
import xai from "@scenerok/xai"
|
|
82
|
+
import eleven from "@elevenlabs/music"
|
|
83
|
+
import motion from "@scenerok/basic-animations"
|
|
84
|
+
|
|
85
|
+
[-] = video xai.imagine("Cinematic product shot", aspect_ratio: "9:16", duration: 5)
|
|
86
|
+
[-] = audio xai.tts("Welcome to SceneRok", voice: "eve")
|
|
93
87
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
[
|
|
97
|
-
[-] = audio xai.tts("Next line", voice: "eve")
|
|
88
|
+
# ElevenLabs music package functions require an import alias.
|
|
89
|
+
let bed = eleven.music("Warm premium launch bed", duration: 15, instrumental: true)
|
|
90
|
+
[0s .. 15s] = audio bed, volume: 0.35, fade_out: 2s
|
|
98
91
|
```
|
|
99
92
|
|
|
100
|
-
|
|
93
|
+
**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'`.
|
|
94
|
+
|
|
95
|
+
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.
|
|
96
|
+
|
|
97
|
+
Read `vidscript-strict.md` for anti-patterns and `examples/system/*.vid` for copy-paste templates (installed with `scenerok skills install`).
|
|
101
98
|
|
|
102
99
|
### Placeholders
|
|
103
100
|
|
|
@@ -165,7 +162,15 @@ Always ask clarifying questions about:
|
|
|
165
162
|
- Desired duration and style
|
|
166
163
|
- Whether they want to start from a template or from scratch
|
|
167
164
|
|
|
165
|
+
## Reference files (in this skill folder)
|
|
166
|
+
|
|
167
|
+
| File | Purpose |
|
|
168
|
+
|------|---------|
|
|
169
|
+
| `vidscript-guide.md` | Full grammar reference |
|
|
170
|
+
| `vidscript-strict.md` | **Read first** — rules that prevent common agent mistakes |
|
|
171
|
+
| `vidscript-sample.md` | Minimal promo with xAI import |
|
|
172
|
+
| `examples/system/*.vid` | Official SceneRok templates (text-only, product launch, xAI reels) |
|
|
173
|
+
|
|
168
174
|
## Full Reference
|
|
169
175
|
|
|
170
|
-
For exhaustive grammar documentation, visit:
|
|
171
176
|
https://scenerok.com/docs/vidscript
|