@scenerok/cli 1.0.8 → 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.
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +9 -34
- package/package.json +3 -2
- package/skills/{aider → shared}/SKILL.md +31 -10
- package/skills/{claude → shared}/vidscript-guide.md +32 -3
- package/skills/{claude → shared}/vidscript-sample.md +1 -1
- package/skills/{codex → shared}/vidscript-strict.md +53 -8
- package/skills/aider/vidscript-guide.md +0 -383
- package/skills/aider/vidscript-sample.md +0 -30
- package/skills/aider/vidscript-strict.md +0 -113
- package/skills/claude/SKILL.md +0 -194
- package/skills/claude/vidscript-strict.md +0 -113
- package/skills/codex/SKILL.md +0 -194
- package/skills/codex/vidscript-guide.md +0 -383
- package/skills/codex/vidscript-sample.md +0 -30
- package/skills/cursor/SKILL.md +0 -194
- package/skills/cursor/vidscript-guide.md +0 -383
- package/skills/cursor/vidscript-sample.md +0 -30
- package/skills/cursor/vidscript-strict.md +0 -113
- package/skills/opencode/SKILL.md +0 -194
- package/skills/opencode/vidscript-guide.md +0 -383
- package/skills/opencode/vidscript-sample.md +0 -30
- package/skills/opencode/vidscript-strict.md +0 -113
- package/skills/skills/aider/SKILL.md +0 -194
- package/skills/skills/aider/vidscript-guide.md +0 -383
- package/skills/skills/aider/vidscript-sample.md +0 -30
- package/skills/skills/aider/vidscript-strict.md +0 -113
- package/skills/skills/claude/SKILL.md +0 -194
- package/skills/skills/claude/vidscript-guide.md +0 -383
- package/skills/skills/claude/vidscript-sample.md +0 -30
- package/skills/skills/claude/vidscript-strict.md +0 -113
- package/skills/skills/codex/SKILL.md +0 -194
- package/skills/skills/codex/vidscript-guide.md +0 -383
- package/skills/skills/codex/vidscript-sample.md +0 -30
- package/skills/skills/codex/vidscript-strict.md +0 -113
- package/skills/skills/cursor/SKILL.md +0 -194
- package/skills/skills/cursor/vidscript-guide.md +0 -383
- package/skills/skills/cursor/vidscript-sample.md +0 -30
- package/skills/skills/cursor/vidscript-strict.md +0 -113
- package/skills/skills/opencode/SKILL.md +0 -194
- package/skills/skills/opencode/vidscript-guide.md +0 -383
- package/skills/skills/opencode/vidscript-sample.md +0 -30
- package/skills/skills/opencode/vidscript-strict.md +0 -113
|
@@ -1,194 +0,0 @@
|
|
|
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 Codex
|
|
11
|
-
|
|
12
|
-
## Overview
|
|
13
|
-
|
|
14
|
-
You are a VidScript composer and video generation expert integrated with Codex. 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
|
-
### Package Imports
|
|
80
|
-
|
|
81
|
-
```vidscript
|
|
82
|
-
import xai from "@scenerok/xai" # xAI image/video/tts
|
|
83
|
-
import eleven from "@elevenlabs/music" # ElevenLabs generative music
|
|
84
|
-
import motion from "@scenerok/basic-animations" # text/video animation helpers
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### Plugin Calls
|
|
88
|
-
|
|
89
|
-
```vidscript
|
|
90
|
-
import xai from "@scenerok/xai"
|
|
91
|
-
import eleven from "@elevenlabs/music"
|
|
92
|
-
import motion from "@scenerok/basic-animations"
|
|
93
|
-
|
|
94
|
-
[-] = video xai.imagine("Cinematic product shot", aspect_ratio: "9:16", duration: 5)
|
|
95
|
-
[-] = audio xai.tts("Welcome to SceneRok", voice: "eve")
|
|
96
|
-
|
|
97
|
-
# ElevenLabs music package functions require an import alias.
|
|
98
|
-
let bed = eleven.music("Warm premium launch bed", duration: 15, instrumental: true)
|
|
99
|
-
[0s .. 15s] = audio bed, volume: 0.35, fade_out: 2s
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
**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'`.
|
|
103
|
-
|
|
104
|
-
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.
|
|
105
|
-
|
|
106
|
-
Read `vidscript-strict.md` for anti-patterns and `examples/system/*.vid` for copy-paste templates (installed with `scenerok skills install`).
|
|
107
|
-
|
|
108
|
-
### Placeholders
|
|
109
|
-
|
|
110
|
-
Templates use `{{name | default}}` for user-supplied values:
|
|
111
|
-
```vidscript
|
|
112
|
-
input hero = "{{hero_clip}}"
|
|
113
|
-
[0.5s .. 3s] = text "{{headline | Hello}}", style: title
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## Workflow
|
|
117
|
-
|
|
118
|
-
1. **Understand the goal** — What video does the user want? (promo, testimonial, meme, etc.)
|
|
119
|
-
2. **Plan the structure** — Time blocks, durations, inputs
|
|
120
|
-
3. **Gather assets** — Video URLs or local paths
|
|
121
|
-
4. **Compose VidScript** — Write the full script
|
|
122
|
-
5. **Validate** — Run `scenerok validate script.vid`
|
|
123
|
-
6. **Render** — Run `scenerok render script.vid --watch`
|
|
124
|
-
7. **Deliver** — Share the download URL when complete
|
|
125
|
-
|
|
126
|
-
## Best Practices
|
|
127
|
-
|
|
128
|
-
- **Use dynamic timeblocks** — `[-]` auto-advances the cursor, reducing calculation errors
|
|
129
|
-
- **Use `prev` for offsets** — `[prev + 0.5s .. prev + 2s]` for gaps between content
|
|
130
|
-
- **Named arguments for clarity** — `hero.Trim(start: 0s, end: 5s)` over `hero.Trim(0s, 5s)`
|
|
131
|
-
- Use 1080x1920 for vertical content (TikTok/Instagram)
|
|
132
|
-
- Use 1920x1080 for horizontal content (YouTube)
|
|
133
|
-
- Hook viewers in the first 3 seconds
|
|
134
|
-
- Use high-contrast text on video backgrounds with `stroke` and `stroke_width`
|
|
135
|
-
- Include a clear call-to-action
|
|
136
|
-
- Test with `scenerok validate` before rendering
|
|
137
|
-
- Each render costs 1 credit
|
|
138
|
-
|
|
139
|
-
## CLI Commands
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
scenerok auth login # Authenticate
|
|
143
|
-
scenerok validate script.vid # Validate a VidScript
|
|
144
|
-
scenerok render script.vid --watch # Render a video
|
|
145
|
-
scenerok status <render-id> # Check status
|
|
146
|
-
scenerok skills install <platform> # Install/update agent skill
|
|
147
|
-
scenerok skills list # List available skills
|
|
148
|
-
scenerok secrets set KEY=VALUE # Store API key for plugins
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## Error Handling
|
|
152
|
-
|
|
153
|
-
If a render fails:
|
|
154
|
-
1. Check the error message with `scenerok status <id>`
|
|
155
|
-
2. Common issues: missing assets (404 URLs), invalid file paths, syntax errors
|
|
156
|
-
3. Fix the VidScript and re-render
|
|
157
|
-
4. If credits are insufficient, the user needs to purchase more
|
|
158
|
-
|
|
159
|
-
## Sample Video Types
|
|
160
|
-
|
|
161
|
-
- **Product Promo** — Hero clip + headline + description + CTA + vignette filter
|
|
162
|
-
- **Social Media Hook** — Fast cuts, bold text, speed adjustments
|
|
163
|
-
- **Testimonial** — Speaker clip + quote text + sepia filter
|
|
164
|
-
- **Meme Remix** — Reaction clip + top/bottom punchline overlays
|
|
165
|
-
- **Title Sequence** — Background clip + glitch shader + bold typography
|
|
166
|
-
|
|
167
|
-
Always ask clarifying questions about:
|
|
168
|
-
- Target platform (TikTok, Instagram, YouTube, etc.)
|
|
169
|
-
- Brand colors and fonts
|
|
170
|
-
- Existing assets (video clips, logo, etc.)
|
|
171
|
-
- Desired duration and style
|
|
172
|
-
- Whether they want to start from a template or from scratch
|
|
173
|
-
|
|
174
|
-
## Reference files (in this skill folder)
|
|
175
|
-
|
|
176
|
-
| File | Purpose |
|
|
177
|
-
|------|---------|
|
|
178
|
-
| `vidscript-guide.md` | Full grammar reference |
|
|
179
|
-
| `vidscript-strict.md` | **Read first** — rules that prevent common agent mistakes |
|
|
180
|
-
| `vidscript-sample.md` | Minimal promo with xAI import |
|
|
181
|
-
| `examples/system/*.vid` | Official SceneRok templates (text-only, product launch, xAI reels) |
|
|
182
|
-
|
|
183
|
-
## SceneRok codebase development
|
|
184
|
-
|
|
185
|
-
This skill covers **VidScript composition and rendering videos**. For engineering on the SceneRok platform (parser, render subsystem, API, billing, GPU workers), load the **`scenerok-development`** skill from `.agents/skills/scenerok-development/` in the SceneRok repository.
|
|
186
|
-
|
|
187
|
-
| Doc | Purpose |
|
|
188
|
-
|-----|---------|
|
|
189
|
-
| `plan-v1/35-render-subsystem-architecture.md` | Render registries, IR flow, extension points |
|
|
190
|
-
| `AGENTS.md` | Project context, env vars, dev commands |
|
|
191
|
-
|
|
192
|
-
## Full Reference
|
|
193
|
-
|
|
194
|
-
https://scenerok.com/docs/vidscript
|
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
# VidScript Language Reference (v2)
|
|
2
|
-
|
|
3
|
-
VidScript is a declarative DSL for composing short-form videos. Write a script, render an MP4.
|
|
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
|
-
|
|
23
|
-
## Program Structure
|
|
24
|
-
|
|
25
|
-
A VidScript program is a sequence of statements separated by newlines.
|
|
26
|
-
|
|
27
|
-
```vidscript
|
|
28
|
-
# Single-line comment
|
|
29
|
-
/* Multi-line
|
|
30
|
-
comment */
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Statements
|
|
34
|
-
|
|
35
|
-
### Input Declaration
|
|
36
|
-
|
|
37
|
-
```vidscript
|
|
38
|
-
input hero = "https://cdn.example.com/hero.mp4"
|
|
39
|
-
input logo = "./assets/logo.png"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Supports HTTP(S) URLs, `/uploads/` paths, and local paths.
|
|
43
|
-
|
|
44
|
-
### Output Declaration
|
|
45
|
-
|
|
46
|
-
```vidscript
|
|
47
|
-
output to "video.mp4", resolution: "1080x1920", fps: 30
|
|
48
|
-
output to "reel.mp4", resolution: "720x1280", format: "mp4", codec: "h264", bitrate: "5M", background: "#0D0D0D"
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
| Option | Type | Default | Description |
|
|
52
|
-
|--------|------|---------|-------------|
|
|
53
|
-
| `resolution` | string | `"1080x1920"` | Width×Height or single number |
|
|
54
|
-
| `fps` | number | `30` | Frames per second |
|
|
55
|
-
| `format` | string | `"mp4"` | Container format |
|
|
56
|
-
| `codec` | string | `"h264"` | Video codec |
|
|
57
|
-
| `bitrate` | string | `"5M"` | Encoding bitrate |
|
|
58
|
-
| `background` | string | `"#000000"` | Background color hex |
|
|
59
|
-
|
|
60
|
-
### Variable Assignment
|
|
61
|
-
|
|
62
|
-
```vidscript
|
|
63
|
-
let brandColor = "#6366F1"
|
|
64
|
-
let fadeTime = 0.5s
|
|
65
|
-
let titleSize = 72
|
|
66
|
-
let clipName = "hero"
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Variables can hold strings, numbers, time literals, and object expressions. Variables are evaluated at compile time.
|
|
70
|
-
|
|
71
|
-
### Package Imports
|
|
72
|
-
|
|
73
|
-
Only default package imports are supported for callable packages. Call functions through the imported alias.
|
|
74
|
-
|
|
75
|
-
```vidscript
|
|
76
|
-
import xai from "@scenerok/xai"
|
|
77
|
-
import eleven from "@elevenlabs/music"
|
|
78
|
-
import motion from "@scenerok/basic-animations"
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Named imports (`import { fn } ...`) and namespace imports (`import * as ...`) are not supported.
|
|
82
|
-
|
|
83
|
-
## Time Blocks
|
|
84
|
-
|
|
85
|
-
Time blocks are the core of VidScript. They define when instructions execute on the timeline.
|
|
86
|
-
|
|
87
|
-
### Dynamic Playhead (recommended)
|
|
88
|
-
|
|
89
|
-
```vidscript
|
|
90
|
-
[-] = hero # auto-append: starts after previous block
|
|
91
|
-
[- 3s] = text "Title", size: 72 # auto-start, last 3 seconds
|
|
92
|
-
[- 2.5s] = filter "glow", intensity: 0.8
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
The playhead cursor (`prev`) tracks where the timeline is. Each `[-]` block advances the cursor by the block's content duration. `[- duration]` advances by an explicit duration.
|
|
96
|
-
|
|
97
|
-
### Explicit Range
|
|
98
|
-
|
|
99
|
-
```vidscript
|
|
100
|
-
[0s .. 5s] = hero # absolute range
|
|
101
|
-
[0.5s .. 3s] = text "Hello" # explicit times
|
|
102
|
-
[prev + 1s .. prev + 4s] = filter "glow" # expression-based
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Use `..` (not `-`) as the range separator to avoid ambiguity with subtraction.
|
|
106
|
-
|
|
107
|
-
### Time Formats
|
|
108
|
-
|
|
109
|
-
```vidscript
|
|
110
|
-
5s # 5 seconds
|
|
111
|
-
300ms # 300 milliseconds
|
|
112
|
-
frame 90 # 90 frames at 30fps = 3 seconds
|
|
113
|
-
0:30 # 30 seconds
|
|
114
|
-
1:30:00 # 1 hour 30 minutes
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### The `prev` Keyword
|
|
118
|
-
|
|
119
|
-
`prev` refers to the current playhead position — the end time of the previous block.
|
|
120
|
-
|
|
121
|
-
```vidscript
|
|
122
|
-
[- 2s] = text "Hello" # plays from cursor to cursor+2s
|
|
123
|
-
[prev + 1s .. prev + 3s] = filter "glow" # 1s after text ends, for 2s
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## Instructions (inside time blocks)
|
|
127
|
-
|
|
128
|
-
Multiple instructions in the same time block go on separate lines:
|
|
129
|
-
|
|
130
|
-
```vidscript
|
|
131
|
-
[0s .. 5s] = hero
|
|
132
|
-
hero.Trim(start: 0s, end: 5s)
|
|
133
|
-
hero.Speed(factor: 1.5)
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Clip Reference
|
|
137
|
-
|
|
138
|
-
```vidscript
|
|
139
|
-
[-] = hero # just play the input clip
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Text Overlay
|
|
143
|
-
|
|
144
|
-
```vidscript
|
|
145
|
-
[- 3s] = text "Hello World", font: "Bebas Neue", x: "50%", y: "45%", align: center, color: "#FFFFFF", size: 72, stroke: "#000000", stroke_width: 3, letter_spacing: 4, shadow_color: "#FF0055", shadow_blur: 8
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
| Param | Type | Description |
|
|
149
|
-
|-------|------|-------------|
|
|
150
|
-
| `style` | string | `title` (64px), `subtitle` (54px), `caption` (36px), or `default` (48px) |
|
|
151
|
-
| `position` | string | `center`, `top`, `bottom`, `top-left`, `top-right`, `bottom-left`, `bottom-right` |
|
|
152
|
-
| `x` | number \| string | Horizontal position. Number = px from left. `"50%"` = percent of width. Overrides `position`. |
|
|
153
|
-
| `y` | number \| string | Vertical position. Number = px from top. `"50%"` = percent of height. Overrides `position`. |
|
|
154
|
-
| `color` | string | Hex color |
|
|
155
|
-
| `size` | number \| string | Font size in output canvas pixels. `size: 72` is shorthand for `size: "72px"`. |
|
|
156
|
-
| `font` | string | Font family. System fonts or Google Fonts: `"Inter"`, `"Bebas Neue"`, `"Space Grotesk"`, `"Outfit"`, etc. |
|
|
157
|
-
| `align` | string | `left`, `center`, `right`. Default: `center` |
|
|
158
|
-
| `line_height` | number | Line height multiplier for multi-line text. Default: 1.2 |
|
|
159
|
-
| `letter_spacing` | number | Extra letter spacing in pixels. Default: 0 |
|
|
160
|
-
| `rotation` | number | Rotation in degrees. Positive = clockwise. Default: 0 |
|
|
161
|
-
| `opacity` | number | Opacity 0–1. Default: 1 |
|
|
162
|
-
| `stroke` | string | Outline color |
|
|
163
|
-
| `stroke_width` | number | Outline thickness |
|
|
164
|
-
| `shadow_color` | string | Drop shadow color |
|
|
165
|
-
| `shadow_blur` | number | Shadow blur radius |
|
|
166
|
-
| `shadow_offset_x` | number | Shadow horizontal offset |
|
|
167
|
-
| `shadow_offset_y` | number | Shadow vertical offset |
|
|
168
|
-
| `animation` | string | Parsed but not yet rendered |
|
|
169
|
-
|
|
170
|
-
Params are optional and comma-separated. Params can be on the same line as the content.
|
|
171
|
-
|
|
172
|
-
### Video Methods
|
|
173
|
-
|
|
174
|
-
```vidscript
|
|
175
|
-
hero.Trim(start: 0s, end: 5s) # trim clip (positional: hero.Trim(0s, 5s))
|
|
176
|
-
hero.Resize(width: 720, height: 1280) # resize (positional: hero.Resize(720, 1280))
|
|
177
|
-
hero.Speed(factor: 1.5) # playback rate
|
|
178
|
-
hero.Loop(count: 3) # loop count
|
|
179
|
-
hero.Opacity(value: 0.5, duration: 2s) # opacity with duration
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Arguments can be positional or named using `:`.
|
|
183
|
-
|
|
184
|
-
### Compositing
|
|
185
|
-
|
|
186
|
-
```vidscript
|
|
187
|
-
hero.Overlay(logo, x: 50, y: 100, opacity: 0.8)
|
|
188
|
-
hero.Composite(overlay, x: 0, y: 0, opacity: 0.5, mode: "screen")
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
| Param | Type | Description |
|
|
192
|
-
|-------|------|-------------|
|
|
193
|
-
| `x` | number | Horizontal offset |
|
|
194
|
-
| `y` | number | Vertical offset |
|
|
195
|
-
| `opacity` | number | 0–1 transparency |
|
|
196
|
-
| `mode` | string | Blend mode for Composite |
|
|
197
|
-
|
|
198
|
-
### Filters
|
|
199
|
-
|
|
200
|
-
```vidscript
|
|
201
|
-
[- 2s] = filter "glow", intensity: 0.8
|
|
202
|
-
[0s .. 5s] = filter "vignette", intensity: 0.3
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
Built-in filters: `monochrome`, `sepia`, `blur`, `chromatic`, `glitch`, `vignette`, `contrast`, `saturation`, `brightness`.
|
|
206
|
-
|
|
207
|
-
### Shaders
|
|
208
|
-
|
|
209
|
-
```vidscript
|
|
210
|
-
import shader glow from "shader-pack/glow.glsl"
|
|
211
|
-
|
|
212
|
-
[0s .. 5s] = shader glow, intensity: 0.8
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
### Audio
|
|
216
|
-
|
|
217
|
-
```vidscript
|
|
218
|
-
audio music, volume: 0.5, fade_in: 1s, fade_out: 2s
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
Audio sources can be MP3 inputs, audio plugin results, or the embedded audio stream from an input video. Video clips are visually silent unless you explicitly add `audio clip`.
|
|
222
|
-
|
|
223
|
-
| Param | Type | Description |
|
|
224
|
-
|-------|------|-------------|
|
|
225
|
-
| `volume` | number | 0–1 |
|
|
226
|
-
| `fade_in` | number | Fade-in duration (seconds) |
|
|
227
|
-
| `fade_out` | number | Fade-out duration (seconds) |
|
|
228
|
-
|
|
229
|
-
### Plugin Calls
|
|
230
|
-
|
|
231
|
-
```vidscript
|
|
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
|
|
245
|
-
```
|
|
246
|
-
|
|
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
|
-
```
|
|
256
|
-
|
|
257
|
-
## Animations, Effects & Rendering (v2)
|
|
258
|
-
|
|
259
|
-
VidScript v2 uses a **minimal-grammar, plugin-first** architecture. The compiler lowers VidScript into `IRTimeline` — the single contract shared by browser preview and final render.
|
|
260
|
-
|
|
261
|
-
User-facing extension uses two parameters on any text or video surface:
|
|
262
|
-
|
|
263
|
-
- `animate:` — motion over time (plugin calls or object descriptors)
|
|
264
|
-
- `effects:` — post-processing filters with optional animated params
|
|
265
|
-
|
|
266
|
-
### animate: parameter
|
|
267
|
-
|
|
268
|
-
```vidscript
|
|
269
|
-
import motion from "@scenerok/basic-animations"
|
|
270
|
-
|
|
271
|
-
[0s .. 3s] = text "Hello", x: "50%", y: "50%", animate: motion.fadeIn(0.8s)
|
|
272
|
-
|
|
273
|
-
[-] = video hero, animate: [motion.fadeIn(0.5s), motion.slideY(-40, 0, 1.2s)]
|
|
274
|
-
|
|
275
|
-
[0s .. 2s] = text "Title", animate: {
|
|
276
|
-
type: "fade",
|
|
277
|
-
from: { opacity: 0 },
|
|
278
|
-
to: { opacity: 1 },
|
|
279
|
-
start: 0,
|
|
280
|
-
end: 1.5,
|
|
281
|
-
easing: "easeOutQuad"
|
|
282
|
-
}
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
Compiler lowers `animate:` into `IRMotionTrack[]` (property-path keyframes). Legacy `IRAnimation` descriptors are adapted at runtime for backward compatibility.
|
|
286
|
-
|
|
287
|
-
### effects: parameter
|
|
288
|
-
|
|
289
|
-
```vidscript
|
|
290
|
-
[0s .. 5s] = filter "vignette", intensity: 0.4
|
|
291
|
-
|
|
292
|
-
[0s .. 5s] = filter "glitch", intensity: 0.5, animate: motion.fadeIn(1s)
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
Built-in filters: `monochrome`, `sepia`, `blur`, `chromatic`, `glitch`, `vignette`, `contrast`, `saturation`, `brightness`.
|
|
296
|
-
|
|
297
|
-
### Animation functions (`@scenerok/basic-animations`)
|
|
298
|
-
|
|
299
|
-
| Function | Description |
|
|
300
|
-
|----------|-------------|
|
|
301
|
-
| `motion.fadeIn(duration?)` | Opacity 0 → 1 |
|
|
302
|
-
| `motion.fadeOut(duration?)` | Opacity 1 → 0 |
|
|
303
|
-
| `motion.slideX(from, to, dur?)` | Horizontal slide |
|
|
304
|
-
| `motion.slideY(from, to, dur?)` | Vertical slide |
|
|
305
|
-
| `motion.popIn(duration?)` | Scale + fade entrance |
|
|
306
|
-
| `motion.riseIn(duration?, dist?)` | Upward fade entrance |
|
|
307
|
-
| `motion.swingIn(duration?)` | Rotating slide/fade |
|
|
308
|
-
| `motion.glitchIn(duration?)` | Jitter + flash entrance |
|
|
309
|
-
| `motion.float(duration?, amp?)` | Gentle vertical bob |
|
|
310
|
-
| `motion.typewriter(duration?)` | Character reveal |
|
|
311
|
-
|
|
312
|
-
### Render architecture (contributors)
|
|
313
|
-
|
|
314
|
-
Implemented registry-based rendering. See `plan-v1/35-render-subsystem-architecture.md`.
|
|
315
|
-
|
|
316
|
-
| Registry | Path | Add via |
|
|
317
|
-
|----------|------|---------|
|
|
318
|
-
| Motion | `src/lib/motion/registry.ts` | `registerEasing`, `registerMotionBehavior` |
|
|
319
|
-
| Surface | `src/render/surfaces/registry.ts` | `registerSurfaceRenderer` |
|
|
320
|
-
| Effect | `src/render/effects/registry.ts` | `registerEffect` or `src/shaders/library.ts` |
|
|
321
|
-
| Engine | `src/render/engine/index.ts` | `createRenderEngine` backends |
|
|
322
|
-
|
|
323
|
-
For SceneRok platform engineering, load the **`scenerok-development`** skill (`.agents/skills/scenerok-development/`).
|
|
324
|
-
|
|
325
|
-
## Expressions
|
|
326
|
-
|
|
327
|
-
Used in time specs, `let` values, and function arguments:
|
|
328
|
-
|
|
329
|
-
```vidscript
|
|
330
|
-
let x = 5s # Time literals
|
|
331
|
-
let y = x * 2 # Arithmetic
|
|
332
|
-
let prompt = "Scene: " + title_text # String concatenation
|
|
333
|
-
let z = prev + 0.5s # Playhead reference
|
|
334
|
-
let a = { primary: "#FF5733" } # Objects
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
Operators: `+`, `-`, `*`, `/` with standard precedence.
|
|
338
|
-
|
|
339
|
-
## Template Placeholders
|
|
340
|
-
|
|
341
|
-
```vidscript
|
|
342
|
-
[- 3s] = text "{{headline | Default Text}}", color: "{{color | #FFFFFF}}"
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
Placeholders are filled before parsing via `fillPlaceholders()`.
|
|
346
|
-
|
|
347
|
-
## CLI Commands
|
|
348
|
-
|
|
349
|
-
```bash
|
|
350
|
-
# Authenticate
|
|
351
|
-
scenerok auth login
|
|
352
|
-
|
|
353
|
-
# Validate a script
|
|
354
|
-
scenerok validate my-video.vid
|
|
355
|
-
|
|
356
|
-
# Render a video
|
|
357
|
-
scenerok project upload my-video.vid --assets ./assets --render --watch --download ./renders
|
|
358
|
-
scenerok project render <project-id> --watch --download ./renders
|
|
359
|
-
scenerok render my-video.vid --project-id <project-id> --watch
|
|
360
|
-
scenerok cache pull
|
|
361
|
-
|
|
362
|
-
# Check render status
|
|
363
|
-
scenerok status <render-id>
|
|
364
|
-
|
|
365
|
-
# Install agent skills
|
|
366
|
-
scenerok skills install <platform>
|
|
367
|
-
|
|
368
|
-
# Set API secrets for plugins
|
|
369
|
-
scenerok secrets set ELEVENLABS_API_KEY=your-key
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
## Best Practices
|
|
373
|
-
|
|
374
|
-
1. **Use dynamic timeblocks** — `[-]` auto-advances the cursor, reducing calculation errors
|
|
375
|
-
2. **Use `prev` for offsets** — `[prev + 0.5s .. prev + 2s]` for gaps after previous content
|
|
376
|
-
3. **1080×1920 for vertical** (TikTok, Reels, Shorts), **1920×1080 for horizontal** (YouTube)
|
|
377
|
-
4. **Hook viewers in the first 3 seconds** — place the most compelling content early
|
|
378
|
-
5. **High-contrast text** — use `stroke` and `stroke_width` on text overlays over video
|
|
379
|
-
6. **Test with `scenerok validate` first** — catch syntax errors before spending render credits
|
|
380
|
-
7. **Keep text content short** — text disappears when the time block ends
|
|
381
|
-
8. **One instruction per line** — each instruction inside a timeblock goes on its own line
|
|
382
|
-
9. **Text-only auto blocks** — `[-] = text ...` lasts 2 seconds by default; use `[- 3s]` for custom timing
|
|
383
|
-
10. **Named arguments are clearer** — `hero.Trim(start: 0s, end: 5s)` over `hero.Trim(0s, 5s)`
|
|
@@ -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.
|