@scenerok/cli 2.2.0 → 2.3.0

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 (31) hide show
  1. package/README.md +6 -6
  2. package/dist/commands/skills.d.ts.map +1 -1
  3. package/dist/commands/skills.js +31 -25
  4. package/dist/utils/skillsManifest.d.ts +13 -3
  5. package/dist/utils/skillsManifest.d.ts.map +1 -1
  6. package/dist/utils/skillsManifest.js +35 -12
  7. package/examples/system/rokmilk-chocolate-promo.vid +1 -1
  8. package/examples/system/voice-visual-promo.vid +1 -1
  9. package/package.json +3 -3
  10. package/skills/scenerok/SKILL.md +147 -0
  11. package/skills/{remote → scenerok/references}/ai-models.md +1 -2
  12. package/skills/{remote → scenerok/references}/animations-catalog.md +139 -2
  13. package/skills/{remote → scenerok/references}/animations-picker.md +12 -1
  14. package/skills/{remote → scenerok/references}/brand-setup.md +3 -1
  15. package/skills/{remote → scenerok/references}/catalog-index.json +163 -19
  16. package/skills/scenerok/references/editing-actions.md +518 -0
  17. package/skills/{remote → scenerok/references}/environments.md +23 -24
  18. package/skills/{remote → scenerok/references}/intent-router.md +5 -15
  19. package/skills/{remote → scenerok/references}/media-stdlib.md +2 -3
  20. package/skills/{remote → scenerok/references}/music.md +2 -21
  21. package/skills/{remote → scenerok/references}/sdk-guide.md +2 -2
  22. package/skills/{remote → scenerok/references}/shaders-filters.md +9 -6
  23. package/skills/{remote → scenerok/references}/text-styles.md +15 -35
  24. package/skills/{remote → scenerok/references}/transitions-catalog.md +2 -0
  25. package/skills/{remote → scenerok/references}/tts.md +4 -22
  26. package/skills/{remote → scenerok/references}/vidscript-guide.md +202 -55
  27. package/skills/scenerok/references/vidscript-sample.md +44 -0
  28. package/skills/{remote → scenerok/references}/vidscript-strict.md +41 -26
  29. package/skills/{remote → scenerok/references}/workflow.md +6 -7
  30. package/skills/remote/vidscript-sample.md +0 -28
  31. package/skills/shared/SKILL.md +0 -157
@@ -2,34 +2,15 @@
2
2
 
3
3
  `import eleven from "@elevenlabs/music"`
4
4
 
5
- ### VidScript
6
-
7
5
  ```vidscript
8
6
  import eleven from "@elevenlabs/music"
9
7
  let bed = eleven.music("Warm premium launch bed", duration: 15, instrumental: true)
10
8
  [0s .. 15s] = audio bed, volume: 0.35, fade_out: 2s
11
9
  ```
12
10
 
13
- ### TypeScript SDK
14
-
15
- ```ts
16
- import { timeline } from '@scenerok/sdk'
17
- import eleven from '@elevenlabs/music'
18
-
19
- export default async function main() {
20
- const t = timeline({ width: 1080, height: 1920, fps: 30 })
21
- const bed = await eleven.music('Warm premium launch bed', {
22
- duration: 15,
23
- force_instrumental: true,
24
- })
25
- t.push(bed.with({ volume: 0.35, fadeOut: 2 }))
26
- return t.toIR()
27
- }
28
- ```
29
-
30
- Use a binding (`let bed` / `const bed`) when you need volume or fades. Do not call `eleven.tts` — use `xai.tts` for voiceover.
11
+ Use `let bed = eleven.music(...)` then `audio bed, volume: ...` for fades. Do not call `eleven.tts`.
31
12
 
32
- ## Examples (VidScript)
13
+ ## Examples
33
14
 
34
15
  **Drone underscore**
35
16
 
@@ -121,7 +121,7 @@ scenerok render scene.ts --watch
121
121
 
122
122
  You can also **include** an SDK scene from VidScript:
123
123
 
124
- ```vidscript
124
+ ```vidscript fragment
125
125
  import intro from "./intro.ts"
126
126
  use intro at 0s .. 0s with {}
127
127
  output to "reel.mp4"
@@ -192,7 +192,7 @@ export default async function main() {
192
192
 
193
193
  Same functions are available in VidScript via `import media from "@scenerok/media"`.
194
194
 
195
- See `skills/remote/media-stdlib.md` and `ai-models.md` / `tts.md` / `music.md` for prompt guidance.
195
+ See `media-stdlib.md` and `ai-models.md` / `tts.md` / `music.md` for prompt guidance.
196
196
 
197
197
  ## Related
198
198
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Built-in filters
4
4
 
5
- Apply on a time block with the clip active:
5
+ A `filter` line grades everything on screen during its window. Add `target: clip` (or use `clip.Filter(…)`) to grade one clip; see `editing-actions.md` → Color and finishing for which filters can target a clip, plus LUTs and CDL.
6
6
 
7
7
  ```vidscript
8
8
  [0s .. 5s] = filter "vignette", intensity: 0.4
@@ -23,11 +23,12 @@ Apply on a time block with the clip active:
23
23
 
24
24
  Use filters as optional finishing tools — do not add by default.
25
25
 
26
- ## VFX filters (single-clip)
26
+ ## VFX filters
27
27
 
28
- Native VFX via `filter` keyword on one clip:
28
+ Native VFX through the same `filter` keyword. They work on the whole frame in their window:
29
29
 
30
30
  ```vidscript
31
+ input clip = "clip.mp4"
31
32
  [0s .. 5s] = video clip
32
33
  [0s .. 2s] = filter "liquid_glass", intensity: 0.6
33
34
  ```
@@ -52,7 +53,7 @@ import shader glow from "./shaders/glow.glsl"
52
53
 
53
54
  Also works with npm package paths under `node_modules`:
54
55
 
55
- ```vidscript
56
+ ```vidscript fragment
56
57
  import shader glow from "shader-pack/shaders/glow.glsl"
57
58
  ```
58
59
 
@@ -84,14 +85,16 @@ The compiler reads the file at compile time and embeds the GLSL into IR (`IRShad
84
85
 
85
86
  ## Scene transitions
86
87
 
87
- Scene transitions use `@scenerok/transitions` — see `transitions-catalog.md`. They blend **two** clips at window boundaries; filters operate on **one** clip.
88
+ Scene transitions use `@scenerok/transitions` — see `transitions-catalog.md`. They blend **two** clips at window boundaries; filters grade the picture.
88
89
 
89
90
  ```vidscript
90
91
  import tr from "@scenerok/transitions"
91
92
 
93
+ input clip_a = "clip-a.mp4"
94
+ input clip_b = "clip-b.mp4"
92
95
  [0s .. 5s] = video clip_a
93
96
  [5s .. 5.6s] = tr.dissolve()
94
97
  [5.6s .. 10s] = video clip_b
95
98
  ```
96
99
 
97
- Do not confuse `tr.dissolve()` (two-texture blend) with `filter "vignette"` (single-clip post).
100
+ Do not confuse `tr.dissolve()` (a blend between two clips) with `filter "vignette"` (a grade).
@@ -1,43 +1,23 @@
1
1
  # Text Styles and Motion Primitives
2
2
 
3
- `import motion from "@scenerok/basic-animations"` — use with `animate:` on VidScript `text` blocks.
4
-
5
- In **TypeScript SDK**, use the built-in motion helpers from `@scenerok/sdk` (`fadeIn`, `fadeOut`, `slideY`, `slideX`, `scale`, `popIn`) and place text with `area` / `t.grid` (see `sdk-guide.md`).
3
+ `import motion from "@scenerok/basic-animations"` — use with `animate:` on `text` blocks.
6
4
 
7
5
  ## Motion primitives
8
6
 
9
- | Primitive | Suits | Phase | SDK helper |
10
- | --- | --- | --- | --- |
11
- | `motion.fadeIn` | subtle entrance | entry | `fadeIn(s(0.4))` |
12
- | `motion.fadeOut` | ending / cut-to-black | exit | `fadeOut(s(0.4))` |
13
- | `motion.slideX` | horizontal reveal | entry | `slideX(...)` |
14
- | `motion.slideY` | vertical rise / fall | entry | `slideY(...)` |
15
- | `motion.popIn` | impact / hero reveal | entry | `popIn(...)` |
16
- | `motion.riseIn` | title build-up | entry | — (VidScript) |
17
- | `motion.swingIn` | playful entrance | entry | — (VidScript) |
18
- | `motion.glitchIn` | energetic entrance | entry | — (VidScript) |
19
- | `motion.float` | idle ambient drift | idle | — (VidScript) |
20
- | `motion.typewriter` | technical typing reveal | entry | — (VidScript) |
21
-
22
- ## Grid areas (both languages)
23
-
24
- Prefer named regions over hand-picked `x`/`y`:
25
-
26
- ```vidscript
27
- [0 .. 3] = text "BIG SALE", area: "title", animate: motion.popIn(0.8)
28
- ```
29
-
30
- ```ts
31
- import { timeline, text, s, popIn } from '@scenerok/sdk'
32
-
33
- const t = timeline({ width: 1080, height: 1920, fps: 30 })
34
- t.grid({ rows: '16% 1fr 18% 10%', areas: ['title', 'stage', 'lower-third', 'caption'] })
35
- t[0][s(3)] = text('BIG SALE', { size: 72, area: 'title' }).animate(popIn(s(0.8)))
36
- ```
37
-
38
- Built-in areas (no grid declaration): `title`, `stage`, `lower-third`, `caption`.
39
-
40
- ## Examples (VidScript)
7
+ | Primitive | Suits | Phase |
8
+ | --- | --- | --- |
9
+ | `motion.fadeIn` | subtle entrance | entry |
10
+ | `motion.fadeOut` | ending / cut-to-black | exit |
11
+ | `motion.slideX` | horizontal reveal | entry |
12
+ | `motion.slideY` | vertical rise / fall | entry |
13
+ | `motion.popIn` | impact / hero reveal | entry |
14
+ | `motion.riseIn` | title build-up | entry |
15
+ | `motion.swingIn` | playful entrance | entry |
16
+ | `motion.glitchIn` | energetic entrance | entry |
17
+ | `motion.float` | idle ambient drift | idle |
18
+ | `motion.typewriter` | technical typing reveal | entry |
19
+
20
+ ## Examples
41
21
 
42
22
  ### Bold hero headline
43
23
 
@@ -9,6 +9,8 @@ A transition window `[Ts .. Te]` binds the clip active at **Ts** (from) and **Te
9
9
  ```vidscript
10
10
  import tr from "@scenerok/transitions"
11
11
 
12
+ input clip_a = "clip-a.mp4"
13
+ input clip_b = "clip-b.mp4"
12
14
  [0s .. 5s] = video clip_a
13
15
  [5s .. 5.6s] = tr.dissolve()
14
16
  [5.6s .. 10s] = video clip_b
@@ -1,38 +1,20 @@
1
1
  # Text-to-Speech
2
2
 
3
- `import xai from "@scenerok/xai"` — voiceover via `xai.tts(...)`.
3
+ `import xai from "@scenerok/xai"` — voiceover via `audio xai.tts(...)`.
4
4
 
5
5
  Voice IDs: `eve` (upbeat), `ara` (warm), `rex` (business), `sal` (balanced), `leo` (authoritative).
6
- Catalog samples may use `Marin`, `Hudson` — check `xai.listVoices()` for current IDs.
7
-
8
- ### VidScript
9
-
10
6
  ```vidscript
11
7
  import xai from "@scenerok/xai"
12
8
  let vo = xai.tts("Welcome to SceneRok", voice: "eve")
13
9
  [0 .. vo.duration] = audio vo
14
10
  ```
15
11
 
16
- ### TypeScript SDK
17
-
18
- ```ts
19
- import { timeline, text, s } from '@scenerok/sdk'
20
- import xai from '@scenerok/xai'
21
-
22
- export default async function main() {
23
- const t = timeline({ width: 1080, height: 1920, fps: 30 })
24
- const vo = await xai.tts('Welcome to SceneRok', { voice: 'eve' })
25
- t.push(vo)
26
- t[0][vo.duration] = text('Welcome', { size: 64, area: 'title' })
27
- return t.toIR()
28
- }
29
- ```
30
-
31
- **Never guess a TTS window.** You cannot know the audio length while writing the script. VidScript: assign with `let` and use `vo.duration`, or `[-] = audio xai.tts(...)`. SDK: `await xai.tts(...)` then use `vo.duration` / `t.push(vo)`. Guessed ranges like `[0s .. 3s] = audio xai.tts("long sentence...")` clip or collide when the real audio runs longer.
12
+ **Never guess a TTS window.** You cannot know the audio length while writing the script. Either assign with `let` and use `vo.duration` in time expressions (measured from the generated file), or use `[-] = audio xai.tts(...)` blocks, which auto-size and never overlap each other. Guessed ranges like `[0s .. 3s] = audio xai.tts("long sentence...")` clip or collide when the real audio runs longer.
32
13
 
33
14
  Chain multiple lines with symbolic arithmetic:
34
15
 
35
16
  ```vidscript
17
+ import xai from "@scenerok/xai"
36
18
  let vo1 = xai.tts("First line", voice: "eve")
37
19
  let vo2 = xai.tts("Second line", voice: "eve")
38
20
  [0 .. vo1.duration] = audio vo1
@@ -40,7 +22,7 @@ let vo2 = xai.tts("Second line", voice: "eve")
40
22
  [0 .. vo1.duration] = text "First headline", area: "title" # visual spans the narration
41
23
  ```
42
24
 
43
- ## Examples (VidScript)
25
+ ## Examples
44
26
 
45
27
  Catalog samples below use fixed example windows; in real scripts prefer `vo.duration` or `[-]` blocks as shown above.
46
28