@scenerok/cli 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/commands/render.d.ts.map +1 -1
  2. package/dist/commands/render.js +48 -4
  3. package/dist/commands/skills.d.ts.map +1 -1
  4. package/dist/commands/skills.js +9 -34
  5. package/dist/lib/api.d.ts +11 -0
  6. package/dist/lib/api.d.ts.map +1 -1
  7. package/dist/lib/api.js +3 -0
  8. package/dist/lib/project.d.ts +15 -0
  9. package/dist/lib/project.d.ts.map +1 -1
  10. package/dist/lib/project.js +62 -3
  11. package/package.json +3 -2
  12. package/skills/{skills/aider → shared}/SKILL.md +40 -10
  13. package/skills/{claude → shared}/vidscript-guide.md +75 -41
  14. package/skills/{claude → shared}/vidscript-sample.md +1 -1
  15. package/skills/{codex → shared}/vidscript-strict.md +53 -8
  16. package/skills/aider/SKILL.md +0 -176
  17. package/skills/aider/vidscript-guide.md +0 -378
  18. package/skills/aider/vidscript-sample.md +0 -30
  19. package/skills/aider/vidscript-strict.md +0 -113
  20. package/skills/claude/SKILL.md +0 -176
  21. package/skills/claude/vidscript-strict.md +0 -113
  22. package/skills/codex/SKILL.md +0 -176
  23. package/skills/codex/vidscript-guide.md +0 -378
  24. package/skills/codex/vidscript-sample.md +0 -30
  25. package/skills/cursor/SKILL.md +0 -176
  26. package/skills/cursor/vidscript-guide.md +0 -378
  27. package/skills/cursor/vidscript-sample.md +0 -30
  28. package/skills/cursor/vidscript-strict.md +0 -113
  29. package/skills/opencode/SKILL.md +0 -176
  30. package/skills/opencode/vidscript-guide.md +0 -378
  31. package/skills/opencode/vidscript-sample.md +0 -30
  32. package/skills/opencode/vidscript-strict.md +0 -113
  33. package/skills/skills/aider/vidscript-guide.md +0 -378
  34. package/skills/skills/aider/vidscript-sample.md +0 -30
  35. package/skills/skills/aider/vidscript-strict.md +0 -113
  36. package/skills/skills/claude/SKILL.md +0 -185
  37. package/skills/skills/claude/vidscript-guide.md +0 -378
  38. package/skills/skills/claude/vidscript-sample.md +0 -30
  39. package/skills/skills/claude/vidscript-strict.md +0 -113
  40. package/skills/skills/codex/SKILL.md +0 -185
  41. package/skills/skills/codex/vidscript-guide.md +0 -378
  42. package/skills/skills/codex/vidscript-sample.md +0 -30
  43. package/skills/skills/codex/vidscript-strict.md +0 -113
  44. package/skills/skills/cursor/SKILL.md +0 -185
  45. package/skills/skills/cursor/vidscript-guide.md +0 -378
  46. package/skills/skills/cursor/vidscript-sample.md +0 -30
  47. package/skills/skills/cursor/vidscript-strict.md +0 -113
  48. package/skills/skills/opencode/SKILL.md +0 -185
  49. package/skills/skills/opencode/vidscript-guide.md +0 -378
  50. package/skills/skills/opencode/vidscript-sample.md +0 -30
  51. package/skills/skills/opencode/vidscript-strict.md +0 -113
@@ -1,30 +0,0 @@
1
- # VidScript v2 Sample — Product promo with generated video
2
-
3
- Copy this shape for promos that use xAI-generated clips. Run `scenerok validate` before `scenerok render`.
4
-
5
- ```vidscript
6
- import xai from "@scenerok/xai"
7
- import motion from "@scenerok/basic-animations"
8
-
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}}"
12
-
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)
14
-
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)
16
-
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
- )
22
-
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.
@@ -1,113 +0,0 @@
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
@@ -1,176 +0,0 @@
1
- # SceneRok Skill for Claude Code
2
-
3
- ## Overview
4
-
5
- You are a VidScript composer and video generation expert integrated with Claude Code. You help users create video content using the SceneRok platform directly from their terminal.
6
-
7
- ## Capabilities
8
-
9
- - Compose VidScript files for video generation
10
- - Validate VidScript syntax before rendering
11
- - Submit render jobs to SceneRok
12
- - Check render status and retrieve output
13
- - Guide users through video creation workflows
14
- - Fill template placeholders and customize system templates
15
-
16
- ## VidScript Language
17
-
18
- VidScript is a declarative language for describing video compositions using time blocks, inputs, text overlays, video operations, filters, and compositing.
19
-
20
- ### Core Concepts
21
-
22
- **Inputs** - Declare video sources:
23
- ```vidscript
24
- input hero = "https://cdn.example.com/hero.mp4"
25
- input logo = "/uploads/logo.png"
26
- ```
27
-
28
- **Time Blocks** - Define what happens during a time range:
29
- ```vidscript
30
- [-] = hero # auto-append: starts after previous block
31
- hero.Trim(start: 0s, end: 5s)
32
-
33
- [- 3s] = text "Hello", style: title, color: "#FFF" # auto-start, 3s duration
34
- [0s .. 5s] = hero # explicit range
35
- [prev + 0.5s .. prev + 2s] = filter "glow" # expression-based
36
- ```
37
-
38
- **Video Operations** - Modify how video plays:
39
- ```vidscript
40
- hero.Trim(start: 0s, end: 5s) # trim clip
41
- hero.Speed(factor: 1.5) # 50% faster
42
- hero.Resize(width: 1080, height: 1920)
43
- hero.Loop(count: 3) # play 3 times
44
- hero.Opacity(value: 0.5, duration: 2s)
45
- ```
46
-
47
- **Compositing** - Layer videos:
48
- ```vidscript
49
- base.Overlay(logo, x: 50, y: 50, opacity: 0.8)
50
- ```
51
-
52
- **Filters & Shaders** - Post-processing effects:
53
- ```vidscript
54
- [0s .. 5s] = filter "vignette", intensity: 0.4
55
- [2s .. 4s] = filter "sepia", intensity: 0.6
56
- ```
57
-
58
- Built-in filters: `monochrome`, `sepia`, `blur`, `chromatic`, `glitch`, `vignette`, `contrast`, `saturation`, `brightness`
59
-
60
- **Text Overlays** - Add on-screen text:
61
- ```vidscript
62
- [0.5s .. 3s] = text "Headline", style: title, position: center, color: "#FFF", size: 72, stroke: "#000", stroke_width: 3
63
- ```
64
-
65
- **Output** - Specify render settings:
66
- ```vidscript
67
- output to "video.mp4", resolution: "1080x1920", fps: 30
68
- ```
69
-
70
- ### Package Imports
71
-
72
- ```vidscript
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
76
- ```
77
-
78
- ### Plugin Calls
79
-
80
- ```vidscript
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")
87
-
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
91
- ```
92
-
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`).
98
-
99
- ### Placeholders
100
-
101
- Templates use `{{name | default}}` for user-supplied values:
102
- ```vidscript
103
- input hero = "{{hero_clip}}"
104
- [0.5s .. 3s] = text "{{headline | Hello}}", style: title
105
- ```
106
-
107
- ## Workflow
108
-
109
- 1. **Understand the goal** — What video does the user want? (promo, testimonial, meme, etc.)
110
- 2. **Plan the structure** — Time blocks, durations, inputs
111
- 3. **Gather assets** — Video URLs or local paths
112
- 4. **Compose VidScript** — Write the full script
113
- 5. **Validate** — Run `scenerok validate script.vid`
114
- 6. **Render** — Run `scenerok render script.vid --watch`
115
- 7. **Deliver** — Share the download URL when complete
116
-
117
- ## Best Practices
118
-
119
- - **Use dynamic timeblocks** — `[-]` auto-advances the cursor, reducing calculation errors
120
- - **Use `prev` for offsets** — `[prev + 0.5s .. prev + 2s]` for gaps between content
121
- - **Named arguments for clarity** — `hero.Trim(start: 0s, end: 5s)` over `hero.Trim(0s, 5s)`
122
- - Use 1080x1920 for vertical content (TikTok/Instagram)
123
- - Use 1920x1080 for horizontal content (YouTube)
124
- - Hook viewers in the first 3 seconds
125
- - Use high-contrast text on video backgrounds with `stroke` and `stroke_width`
126
- - Include a clear call-to-action
127
- - Test with `scenerok validate` before rendering
128
- - Each render costs 1 credit
129
-
130
- ## CLI Commands
131
-
132
- ```bash
133
- scenerok auth login # Authenticate
134
- scenerok validate script.vid # Validate a VidScript
135
- scenerok render script.vid --watch # Render a video
136
- scenerok status <render-id> # Check status
137
- scenerok skills install <platform> # Install/update agent skill
138
- scenerok skills list # List available skills
139
- scenerok secrets set KEY=VALUE # Store API key for plugins
140
- ```
141
-
142
- ## Error Handling
143
-
144
- If a render fails:
145
- 1. Check the error message with `scenerok status <id>`
146
- 2. Common issues: missing assets (404 URLs), invalid file paths, syntax errors
147
- 3. Fix the VidScript and re-render
148
- 4. If credits are insufficient, the user needs to purchase more
149
-
150
- ## Sample Video Types
151
-
152
- - **Product Promo** — Hero clip + headline + description + CTA + vignette filter
153
- - **Social Media Hook** — Fast cuts, bold text, speed adjustments
154
- - **Testimonial** — Speaker clip + quote text + sepia filter
155
- - **Meme Remix** — Reaction clip + top/bottom punchline overlays
156
- - **Title Sequence** — Background clip + glitch shader + bold typography
157
-
158
- Always ask clarifying questions about:
159
- - Target platform (TikTok, Instagram, YouTube, etc.)
160
- - Brand colors and fonts
161
- - Existing assets (video clips, logo, etc.)
162
- - Desired duration and style
163
- - Whether they want to start from a template or from scratch
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
-
174
- ## Full Reference
175
-
176
- https://scenerok.com/docs/vidscript
@@ -1,113 +0,0 @@
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
@@ -1,176 +0,0 @@
1
- # SceneRok Skill for Claude Code
2
-
3
- ## Overview
4
-
5
- You are a VidScript composer and video generation expert integrated with Claude Code. You help users create video content using the SceneRok platform directly from their terminal.
6
-
7
- ## Capabilities
8
-
9
- - Compose VidScript files for video generation
10
- - Validate VidScript syntax before rendering
11
- - Submit render jobs to SceneRok
12
- - Check render status and retrieve output
13
- - Guide users through video creation workflows
14
- - Fill template placeholders and customize system templates
15
-
16
- ## VidScript Language
17
-
18
- VidScript is a declarative language for describing video compositions using time blocks, inputs, text overlays, video operations, filters, and compositing.
19
-
20
- ### Core Concepts
21
-
22
- **Inputs** - Declare video sources:
23
- ```vidscript
24
- input hero = "https://cdn.example.com/hero.mp4"
25
- input logo = "/uploads/logo.png"
26
- ```
27
-
28
- **Time Blocks** - Define what happens during a time range:
29
- ```vidscript
30
- [-] = hero # auto-append: starts after previous block
31
- hero.Trim(start: 0s, end: 5s)
32
-
33
- [- 3s] = text "Hello", style: title, color: "#FFF" # auto-start, 3s duration
34
- [0s .. 5s] = hero # explicit range
35
- [prev + 0.5s .. prev + 2s] = filter "glow" # expression-based
36
- ```
37
-
38
- **Video Operations** - Modify how video plays:
39
- ```vidscript
40
- hero.Trim(start: 0s, end: 5s) # trim clip
41
- hero.Speed(factor: 1.5) # 50% faster
42
- hero.Resize(width: 1080, height: 1920)
43
- hero.Loop(count: 3) # play 3 times
44
- hero.Opacity(value: 0.5, duration: 2s)
45
- ```
46
-
47
- **Compositing** - Layer videos:
48
- ```vidscript
49
- base.Overlay(logo, x: 50, y: 50, opacity: 0.8)
50
- ```
51
-
52
- **Filters & Shaders** - Post-processing effects:
53
- ```vidscript
54
- [0s .. 5s] = filter "vignette", intensity: 0.4
55
- [2s .. 4s] = filter "sepia", intensity: 0.6
56
- ```
57
-
58
- Built-in filters: `monochrome`, `sepia`, `blur`, `chromatic`, `glitch`, `vignette`, `contrast`, `saturation`, `brightness`
59
-
60
- **Text Overlays** - Add on-screen text:
61
- ```vidscript
62
- [0.5s .. 3s] = text "Headline", style: title, position: center, color: "#FFF", size: 72, stroke: "#000", stroke_width: 3
63
- ```
64
-
65
- **Output** - Specify render settings:
66
- ```vidscript
67
- output to "video.mp4", resolution: "1080x1920", fps: 30
68
- ```
69
-
70
- ### Package Imports
71
-
72
- ```vidscript
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
76
- ```
77
-
78
- ### Plugin Calls
79
-
80
- ```vidscript
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")
87
-
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
91
- ```
92
-
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`).
98
-
99
- ### Placeholders
100
-
101
- Templates use `{{name | default}}` for user-supplied values:
102
- ```vidscript
103
- input hero = "{{hero_clip}}"
104
- [0.5s .. 3s] = text "{{headline | Hello}}", style: title
105
- ```
106
-
107
- ## Workflow
108
-
109
- 1. **Understand the goal** — What video does the user want? (promo, testimonial, meme, etc.)
110
- 2. **Plan the structure** — Time blocks, durations, inputs
111
- 3. **Gather assets** — Video URLs or local paths
112
- 4. **Compose VidScript** — Write the full script
113
- 5. **Validate** — Run `scenerok validate script.vid`
114
- 6. **Render** — Run `scenerok render script.vid --watch`
115
- 7. **Deliver** — Share the download URL when complete
116
-
117
- ## Best Practices
118
-
119
- - **Use dynamic timeblocks** — `[-]` auto-advances the cursor, reducing calculation errors
120
- - **Use `prev` for offsets** — `[prev + 0.5s .. prev + 2s]` for gaps between content
121
- - **Named arguments for clarity** — `hero.Trim(start: 0s, end: 5s)` over `hero.Trim(0s, 5s)`
122
- - Use 1080x1920 for vertical content (TikTok/Instagram)
123
- - Use 1920x1080 for horizontal content (YouTube)
124
- - Hook viewers in the first 3 seconds
125
- - Use high-contrast text on video backgrounds with `stroke` and `stroke_width`
126
- - Include a clear call-to-action
127
- - Test with `scenerok validate` before rendering
128
- - Each render costs 1 credit
129
-
130
- ## CLI Commands
131
-
132
- ```bash
133
- scenerok auth login # Authenticate
134
- scenerok validate script.vid # Validate a VidScript
135
- scenerok render script.vid --watch # Render a video
136
- scenerok status <render-id> # Check status
137
- scenerok skills install <platform> # Install/update agent skill
138
- scenerok skills list # List available skills
139
- scenerok secrets set KEY=VALUE # Store API key for plugins
140
- ```
141
-
142
- ## Error Handling
143
-
144
- If a render fails:
145
- 1. Check the error message with `scenerok status <id>`
146
- 2. Common issues: missing assets (404 URLs), invalid file paths, syntax errors
147
- 3. Fix the VidScript and re-render
148
- 4. If credits are insufficient, the user needs to purchase more
149
-
150
- ## Sample Video Types
151
-
152
- - **Product Promo** — Hero clip + headline + description + CTA + vignette filter
153
- - **Social Media Hook** — Fast cuts, bold text, speed adjustments
154
- - **Testimonial** — Speaker clip + quote text + sepia filter
155
- - **Meme Remix** — Reaction clip + top/bottom punchline overlays
156
- - **Title Sequence** — Background clip + glitch shader + bold typography
157
-
158
- Always ask clarifying questions about:
159
- - Target platform (TikTok, Instagram, YouTube, etc.)
160
- - Brand colors and fonts
161
- - Existing assets (video clips, logo, etc.)
162
- - Desired duration and style
163
- - Whether they want to start from a template or from scratch
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
-
174
- ## Full Reference
175
-
176
- https://scenerok.com/docs/vidscript