videowright 0.1.0 → 0.1.1
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 +78 -60
- package/dist/cli/index.js +4 -4
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,91 +1,109 @@
|
|
|
1
|
-
# Videowright
|
|
2
1
|
|
|
3
|
-
|
|
2
|
+
# Videowright
|
|
3
|
+
### Create a video with a prompt
|
|
4
4
|
|
|
5
|
-
Videowright
|
|
5
|
+
Videowright creates demo videos, explainer videos, and product walkthroughs from your coding agent. Just describe what you want and it generates your video (including audio). Iterate in chat until it's perfect.
|
|
6
|
+
|
|
7
|
+
## Demo - Sound on!
|
|
8
|
+
|
|
9
|
+
<video src="https://github.com/user-attachments/assets/ba106686-3ff5-4d57-8fbb-141ad40c8c86" width="600" controls></video>
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
- **Video from prompt** -- generate an animated video, simply from a prompt
|
|
14
|
+
- **AI voice-overs** -- generate narration from a script, then auto-sync video timing to the audio
|
|
15
|
+
- **Sound Effects and Music** -- source and mix many audio sources
|
|
16
|
+
- **Six built-in visual styles** -- or create your own from a brand guide or description
|
|
17
|
+
- **Pixel-perfect MP4 export** -- deterministic frame-by-frame rendering, no dropped frames
|
|
18
|
+
- **Hot-reloading dev server** -- iterate in chat, see changes instantly
|
|
19
|
+
- **Works in any major coding agent** -- Claude Code, Codex, opencode, etc
|
|
6
20
|
|
|
7
21
|
## Install
|
|
8
22
|
|
|
9
|
-
|
|
10
|
-
npm install videowright
|
|
11
|
-
```
|
|
23
|
+
Paste this into your coding agent (Claude Code, Codex, or opencode):
|
|
12
24
|
|
|
13
|
-
|
|
25
|
+
> Install Videowright using these instructions:
|
|
26
|
+
> https://github.com/scosman/videowright/raw/refs/heads/main/packages/lib/skill/install/INSTALL.md
|
|
14
27
|
|
|
15
|
-
|
|
28
|
+
The agent reads the install prompt and walks you through setup.
|
|
16
29
|
|
|
17
|
-
|
|
18
|
-
Read `node_modules/videowright/skill/SKILL.md` for the Videowright agent skill.
|
|
19
|
-
```
|
|
30
|
+
## How Does Videowright Work?
|
|
20
31
|
|
|
21
|
-
|
|
32
|
+
You describe the video you want. The agent writes video segments -- self-contained web-components that each render one beat of the video. You preview in the dev server (`npx videowright dev`), give feedback in chat, and the agent iterates. Videowright will generate an AI voiceover, and sync the video to match. When you're happy, export with `npx videowright render`.
|
|
22
33
|
|
|
23
|
-
|
|
34
|
+
## Styles
|
|
24
35
|
|
|
25
|
-
|
|
26
|
-
import { defineSegment } from 'videowright';
|
|
36
|
+
Pick one of six built-in styles, or create your own from a brand guide, reference URL, or short description.
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
<img width="953" height="549" alt="Built-in style packs" src="https://github.com/user-attachments/assets/3aaeecc2-7ca4-4c5a-8ed2-9adc4e226b2d" />
|
|
29
39
|
|
|
30
|
-
|
|
31
|
-
id: 'intro',
|
|
32
|
-
voiceover: 'Welcome to our product.',
|
|
40
|
+
### Style Demo
|
|
33
41
|
|
|
34
|
-
|
|
35
|
-
host = el;
|
|
36
|
-
el.innerHTML = '<h1 style="opacity:0">Hello</h1>';
|
|
37
|
-
},
|
|
42
|
+
Two demo videos: the same prompt, different styles.
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
[{ opacity: 0 }, { opacity: 1 }],
|
|
42
|
-
{ duration: 500, fill: 'forwards' }
|
|
43
|
-
);
|
|
44
|
-
await ctx.hold(600);
|
|
45
|
-
await ctx.waitForNext();
|
|
46
|
-
},
|
|
44
|
+
<table><tr>
|
|
45
|
+
<td width="45%">
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
host = null;
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
```
|
|
47
|
+
https://github.com/user-attachments/assets/1960c3e8-a3f2-4028-91ab-afbc79a53fca
|
|
53
48
|
|
|
54
|
-
|
|
49
|
+
</td>
|
|
50
|
+
<td width="45%">
|
|
51
|
+
|
|
52
|
+
https://github.com/user-attachments/assets/d2454377-9f02-4b1c-af9a-e59c9a0c8912
|
|
55
53
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
</td>
|
|
55
|
+
</tr></table>
|
|
56
|
+
|
|
57
|
+
## AI Voice-Overs
|
|
58
|
+
|
|
59
|
+
Videowright supports a full voiceover pipeline: write a narration script, generate audio with text-to-speech, get precise word-level timestamps via speech-to-text, then auto-align every video beat to your narration.
|
|
60
|
+
|
|
61
|
+
The workflow:
|
|
59
62
|
|
|
60
|
-
|
|
63
|
+
1. **Write the script.** Draft voiceover copy organized by segment in your video's PLAN.md (or ask videowright to). The `npx videowright script` command assembles all segments' voiceover text into a single markdown document for review or handoff.
|
|
64
|
+
2. **Generate audio.** Record your own audio, or use AI text-to-speech. ElevenLabs is supported out of the box.
|
|
65
|
+
3. **Get timestamps.** Run the audio through speech-to-text to get per-word timing data. This tells Videowright exactly when each line is spoken.
|
|
66
|
+
4. **Sync.** The agent computes a timing object that maps each segment's advances to the audio timestamps. Video beats land on the narration automatically.
|
|
61
67
|
|
|
62
|
-
|
|
63
|
-
|---|---|
|
|
64
|
-
| `defineSegment(spec)` | Author a segment with beat tracking and abort signal |
|
|
65
|
-
| `defineConfig(config)` | Type-safe `videowright.config.ts` |
|
|
66
|
-
| `script(timeline, segmentLoaders)` | Concatenate voiceover text into a Markdown document (async) |
|
|
67
|
-
| `Player` | The player runtime |
|
|
68
|
-
| `fade`, `slideLeft`, `slideRight`, `slideUp`, `slideDown`, `cut` | Built-in transitions |
|
|
68
|
+
When you change the audio -- re-record a line, change pacing, swap voices -- the agent re-syncs video timing to match. Segments don't need code changes; only the timing data updates.
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
## Audio Mixing, Sound Effects and Music
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
Videowright can mix audio tracks, fading in music, timing sound effects, remixing voice-overs, and more.
|
|
73
|
+
|
|
74
|
+
The agent can source sound effects and music. Both free downloads from Openverse, or AI generated sounds with ElevenLabs.
|
|
75
|
+
|
|
76
|
+
## Editing
|
|
77
|
+
|
|
78
|
+
Just chat with videowright about edits you want to make, and it does the rest. It can be stylistic, content, order or pacing.
|
|
73
79
|
|
|
74
80
|
## CLI
|
|
75
81
|
|
|
76
|
-
|
|
77
|
-
|---|---|
|
|
78
|
-
| `videowright dev [path]` | Open the player with hot reload |
|
|
79
|
-
| `videowright script [path]` | Print the concatenated voiceover script (`--write` to save) |
|
|
82
|
+
Three CLI commands:
|
|
80
83
|
|
|
81
|
-
|
|
84
|
+
- **`npx videowright dev`** -- Dev server with a homepage listing all videos in the project. Click a video to open the player with hot reload. Hide the HUD for a clean screen-recording surface.
|
|
85
|
+
- **`npx videowright render [slug]`** -- Deterministic frame-by-frame MP4 export via Playwright + ffmpeg. Pixel-perfect output.
|
|
86
|
+
- **`npx videowright script [path]`** -- Assemble all segments' voiceover text into a single markdown document for review or handoff.
|
|
82
87
|
|
|
83
|
-
|
|
88
|
+
## Multi-Video Projects
|
|
84
89
|
|
|
85
|
-
|
|
90
|
+
A videowright project can contain many videos. Build up your style over time, maintaning consistency in your brand. Reuse segments across videos (intros, outros, transitions, CTAs).
|
|
91
|
+
|
|
92
|
+
## Development
|
|
93
|
+
|
|
94
|
+
Run all checks (lint, typecheck, tests) locally:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
./checks.sh
|
|
98
|
+
```
|
|
86
99
|
|
|
87
|
-
|
|
100
|
+
Install the pre-commit hook (once per clone). This will replace any existing pre-commit hook:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
ln -sf ../../checks.sh .git/hooks/pre-commit
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## License
|
|
88
107
|
|
|
89
|
-
|
|
108
|
+
[MIT](LICENSE)
|
|
90
109
|
|
|
91
|
-
Full documentation, architecture, and a 7-segment demo: [github.com/scosman/video_forge](https://github.com/scosman/video_forge)
|
package/dist/cli/index.js
CHANGED
|
@@ -34,13 +34,13 @@ function readVersion() {
|
|
|
34
34
|
const HELP_TEXT = `Usage: videowright <command> [options]
|
|
35
35
|
|
|
36
36
|
Commands:
|
|
37
|
-
dev
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
dev Start the dev server with hot reload
|
|
38
|
+
render [video] Deterministic frame-by-frame MP4 export via Playwright + ffmpeg
|
|
39
|
+
script [path] Assemble voiceover script as Markdown
|
|
40
40
|
|
|
41
41
|
Options:
|
|
42
42
|
--port <n> Dev server port (default: 5173)
|
|
43
|
-
--write Write script to file instead of stdout
|
|
43
|
+
--write Write script to file instead of stdout (script only)
|
|
44
44
|
--width <n> Video width in pixels (render only, default: 1920)
|
|
45
45
|
--height <n> Video height in pixels (render only, default: 1080)
|
|
46
46
|
--fps <n> Frames per second (render only, default: 60)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videowright",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Build animated explainer videos with your coding agent",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"keywords": ["video", "animation", "explainer", "coding agent", "agentic coding"],
|
|
16
16
|
"bin": {
|
|
17
|
-
"videowright": "dist/cli/bin.js"
|
|
17
|
+
"videowright": "./dist/cli/bin.js"
|
|
18
18
|
},
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
"files": ["dist", "skill", "src/cli/entry"],
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "tsc -b",
|
|
32
|
+
"prepack": "cp ../../README.md ./README.md",
|
|
33
|
+
"postpack": "rm -f ./README.md",
|
|
32
34
|
"test": "vitest run",
|
|
33
35
|
"test:watch": "vitest",
|
|
34
36
|
"test:e2e": "npm run build && npx playwright test"
|