devrel-toolkit 0.1.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.
- package/README.md +63 -0
- package/dist/__tests__/cli.test.d.ts +2 -0
- package/dist/__tests__/cli.test.d.ts.map +1 -0
- package/dist/__tests__/cli.test.js +47 -0
- package/dist/__tests__/cli.test.js.map +1 -0
- package/dist/__tests__/components.test.d.ts +2 -0
- package/dist/__tests__/components.test.d.ts.map +1 -0
- package/dist/__tests__/components.test.js +73 -0
- package/dist/__tests__/components.test.js.map +1 -0
- package/dist/__tests__/d-id-client.test.d.ts +2 -0
- package/dist/__tests__/d-id-client.test.d.ts.map +1 -0
- package/dist/__tests__/d-id-client.test.js +116 -0
- package/dist/__tests__/d-id-client.test.js.map +1 -0
- package/dist/__tests__/render-integration.test.d.ts +2 -0
- package/dist/__tests__/render-integration.test.d.ts.map +1 -0
- package/dist/__tests__/render-integration.test.js +26 -0
- package/dist/__tests__/render-integration.test.js.map +1 -0
- package/dist/__tests__/schema.test.d.ts +2 -0
- package/dist/__tests__/schema.test.d.ts.map +1 -0
- package/dist/__tests__/schema.test.js +173 -0
- package/dist/__tests__/schema.test.js.map +1 -0
- package/dist/__tests__/timing.test.d.ts +2 -0
- package/dist/__tests__/timing.test.d.ts.map +1 -0
- package/dist/__tests__/timing.test.js +69 -0
- package/dist/__tests__/timing.test.js.map +1 -0
- package/dist/cli/d-id.d.ts +3 -0
- package/dist/cli/d-id.d.ts.map +1 -0
- package/dist/cli/d-id.js +53 -0
- package/dist/cli/d-id.js.map +1 -0
- package/dist/cli/doctor.d.ts +3 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +134 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +21 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/install-skill.d.ts +3 -0
- package/dist/cli/install-skill.d.ts.map +1 -0
- package/dist/cli/install-skill.js +50 -0
- package/dist/cli/install-skill.js.map +1 -0
- package/dist/cli/render.d.ts +4 -0
- package/dist/cli/render.d.ts.map +1 -0
- package/dist/cli/render.js +134 -0
- package/dist/cli/render.js.map +1 -0
- package/dist/cli/setup.d.ts +3 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +60 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/compositor/DemoVideo.d.ts +4 -0
- package/dist/compositor/DemoVideo.d.ts.map +1 -0
- package/dist/compositor/DemoVideo.js +64 -0
- package/dist/compositor/DemoVideo.js.map +1 -0
- package/dist/compositor/Root.d.ts +3 -0
- package/dist/compositor/Root.d.ts.map +1 -0
- package/dist/compositor/Root.js +30 -0
- package/dist/compositor/Root.js.map +1 -0
- package/dist/compositor/components/AvatarPiP.d.ts +10 -0
- package/dist/compositor/components/AvatarPiP.d.ts.map +1 -0
- package/dist/compositor/components/AvatarPiP.js +52 -0
- package/dist/compositor/components/AvatarPiP.js.map +1 -0
- package/dist/compositor/components/BrowserFrame.d.ts +18 -0
- package/dist/compositor/components/BrowserFrame.d.ts.map +1 -0
- package/dist/compositor/components/BrowserFrame.js +97 -0
- package/dist/compositor/components/BrowserFrame.js.map +1 -0
- package/dist/compositor/components/Cursor.d.ts +13 -0
- package/dist/compositor/components/Cursor.d.ts.map +1 -0
- package/dist/compositor/components/Cursor.js +65 -0
- package/dist/compositor/components/Cursor.js.map +1 -0
- package/dist/compositor/components/Highlight.d.ts +9 -0
- package/dist/compositor/components/Highlight.d.ts.map +1 -0
- package/dist/compositor/components/Highlight.js +83 -0
- package/dist/compositor/components/Highlight.js.map +1 -0
- package/dist/compositor/components/IntroOutro.d.ts +10 -0
- package/dist/compositor/components/IntroOutro.d.ts.map +1 -0
- package/dist/compositor/components/IntroOutro.js +48 -0
- package/dist/compositor/components/IntroOutro.js.map +1 -0
- package/dist/compositor/components/SceneTransition.d.ts +9 -0
- package/dist/compositor/components/SceneTransition.d.ts.map +1 -0
- package/dist/compositor/components/SceneTransition.js +35 -0
- package/dist/compositor/components/SceneTransition.js.map +1 -0
- package/dist/compositor/components/Subtitles.d.ts +9 -0
- package/dist/compositor/components/Subtitles.d.ts.map +1 -0
- package/dist/compositor/components/Subtitles.js +45 -0
- package/dist/compositor/components/Subtitles.js.map +1 -0
- package/dist/compositor/index.d.ts +2 -0
- package/dist/compositor/index.d.ts.map +1 -0
- package/dist/compositor/index.js +4 -0
- package/dist/compositor/index.js.map +1 -0
- package/dist/compositor/timing.d.ts +16 -0
- package/dist/compositor/timing.d.ts.map +1 -0
- package/dist/compositor/timing.js +39 -0
- package/dist/compositor/timing.js.map +1 -0
- package/dist/d-id/client.d.ts +50 -0
- package/dist/d-id/client.d.ts.map +1 -0
- package/dist/d-id/client.js +114 -0
- package/dist/d-id/client.js.map +1 -0
- package/dist/d-id/generate.d.ts +9 -0
- package/dist/d-id/generate.d.ts.map +1 -0
- package/dist/d-id/generate.js +81 -0
- package/dist/d-id/generate.js.map +1 -0
- package/dist/utils/config.d.ts +14 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +34 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/schema.d.ts +273 -0
- package/dist/utils/schema.d.ts.map +1 -0
- package/dist/utils/schema.js +98 -0
- package/dist/utils/schema.js.map +1 -0
- package/package.json +54 -0
- package/remotion.config.ts +4 -0
- package/skills/make-demo/SKILL.md +282 -0
- package/skills/make-demo/references/demo-script-schema.md +47 -0
- package/skills/make-demo/references/render-props-schema.md +49 -0
- package/skills/make-demo/references/toolkit-commands.md +23 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: make-demo
|
|
3
|
+
description: Create professional product demo videos with AI avatar presenter. Use when the user wants to record a product demo, create a video walkthrough, showcase app features, or generate a DevRel-style demo video. Analyzes your codebase, captures browser screenshots, generates D-ID avatar narration, and composites everything into a polished MP4. Triggers on: /make-demo, "make a demo video", "record a walkthrough", "create a product video", "showcase this app".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /make-demo — Product Demo Video Creator
|
|
7
|
+
|
|
8
|
+
You are creating a professional product demo video. Follow this workflow precisely.
|
|
9
|
+
|
|
10
|
+
## Parsing the Command
|
|
11
|
+
|
|
12
|
+
The user invokes this skill with:
|
|
13
|
+
```
|
|
14
|
+
/make-demo "<prompt>"
|
|
15
|
+
/make-demo --url <url> "<prompt>"
|
|
16
|
+
/make-demo --no-avatar "<prompt>"
|
|
17
|
+
/make-demo --preview "<prompt>"
|
|
18
|
+
/make-demo --script <path>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Parse the invocation:
|
|
22
|
+
- `<prompt>`: What the demo should show (required unless `--script` is used)
|
|
23
|
+
- `--url <url>`: Target URL (optional — default: detect local dev server)
|
|
24
|
+
- `--no-avatar`: Skip D-ID avatar generation, browser recording only
|
|
25
|
+
- `--preview`: Fast low-res preview (480p, 15fps, no avatar)
|
|
26
|
+
- `--script <path>`: Use a pre-written demo-script.json instead of planning
|
|
27
|
+
|
|
28
|
+
## Workflow
|
|
29
|
+
|
|
30
|
+
### Step 0: Verify Dependencies
|
|
31
|
+
|
|
32
|
+
Run the toolkit's setup check first:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx devrel-toolkit doctor
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If any checks fail, run:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx devrel-toolkit setup
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This installs browser-use CLI (via its official installer), FFmpeg, and validates your D-ID API key.
|
|
45
|
+
|
|
46
|
+
**IMPORTANT**: browser-use CLI requires Python 3.11+. It installs via:
|
|
47
|
+
```bash
|
|
48
|
+
curl -fsSL https://browser-use.com/cli/install.sh | bash
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Do NOT use `pip install browser-use` — that is NOT the CLI. The pip package is the Python SDK, not the command-line tool.
|
|
52
|
+
|
|
53
|
+
If browser-use is unavailable after setup, fall back to Playwright for browser automation.
|
|
54
|
+
|
|
55
|
+
### Step 1: Understand the App
|
|
56
|
+
|
|
57
|
+
1. If you're in a project directory, read the codebase to understand:
|
|
58
|
+
- What the app does, its pages/routes, key UI elements
|
|
59
|
+
- Tech stack (React, Next.js, etc.)
|
|
60
|
+
- How to start it if not running
|
|
61
|
+
2. Determine the target URL:
|
|
62
|
+
- If `--url` was provided, use that
|
|
63
|
+
- Otherwise check if a local dev server is running (try `curl -s http://localhost:3000` or similar)
|
|
64
|
+
- If not running, start it: `npm run dev` (or the appropriate command)
|
|
65
|
+
3. Wait for the app to be accessible before proceeding.
|
|
66
|
+
|
|
67
|
+
### Step 2: Plan the Demo
|
|
68
|
+
|
|
69
|
+
Based on the user's prompt and your codebase knowledge, plan the demo:
|
|
70
|
+
|
|
71
|
+
- Break into **3–8 logical scenes** (e.g., "Landing page overview", "Sign up flow", "Dashboard tour")
|
|
72
|
+
- Write **natural, conversational narration** for each scene (30–60 words per scene)
|
|
73
|
+
- Determine **navigation steps** for each scene (which pages to visit, what to click, what to type)
|
|
74
|
+
- Identify **elements to highlight** (buttons, forms, charts) and **zoom targets**
|
|
75
|
+
- Choose **transitions** between scenes (`fade` for most, `slide` for page changes, `cut` for quick switches)
|
|
76
|
+
|
|
77
|
+
Produce a `demo-script.json` file:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"title": "App Demo",
|
|
82
|
+
"description": "A walkthrough of the key features",
|
|
83
|
+
"url": "http://localhost:3000",
|
|
84
|
+
"resolution": { "width": 1920, "height": 1080 },
|
|
85
|
+
"fps": 30,
|
|
86
|
+
"scenes": [
|
|
87
|
+
{
|
|
88
|
+
"id": "scene-1-landing",
|
|
89
|
+
"title": "Landing Page",
|
|
90
|
+
"narration": "Welcome to our platform. Let me show you how easy it is to get started.",
|
|
91
|
+
"navigation": [
|
|
92
|
+
{ "action": "goto", "target": "http://localhost:3000" },
|
|
93
|
+
{ "action": "wait", "value": "2000" }
|
|
94
|
+
],
|
|
95
|
+
"highlights": [
|
|
96
|
+
{ "selector": ".cta-button", "style": "glow", "color": "#4A90D9" }
|
|
97
|
+
],
|
|
98
|
+
"zoom": { "selector": ".hero-section", "level": 1.5 },
|
|
99
|
+
"transition": "fade"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Step 3: Capture Browser Screenshots
|
|
106
|
+
|
|
107
|
+
Create a timestamped working directory to avoid conflicts between runs:
|
|
108
|
+
```bash
|
|
109
|
+
mkdir -p ./demo-work-$(date +%s)/screenshots
|
|
110
|
+
mkdir -p ./demo-work-$(date +%s)/avatars
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Always use `--headed` mode** so both you and the user can see what's happening:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
browser-use --headed open <url>
|
|
117
|
+
|
|
118
|
+
# For each scene, execute navigation steps:
|
|
119
|
+
browser-use state # See available elements
|
|
120
|
+
browser-use click <index> # Click elements
|
|
121
|
+
browser-use input <index> "text" # Fill forms
|
|
122
|
+
browser-use scroll down # Scroll
|
|
123
|
+
browser-use wait text "loaded" # Wait for content
|
|
124
|
+
|
|
125
|
+
# Take screenshot — use viewport for above-the-fold, --full for long pages
|
|
126
|
+
browser-use screenshot ./demo-work/screenshots/scene-<id>.png
|
|
127
|
+
browser-use screenshot --full ./demo-work/screenshots/scene-<id>.png # full page
|
|
128
|
+
|
|
129
|
+
# Get bounding boxes for highlights/zoom targets
|
|
130
|
+
browser-use get bbox <index> # Returns { x, y, width, height }
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Save all screenshots and record bounding box data for each highlight and zoom target.
|
|
134
|
+
|
|
135
|
+
**Important**: Use `browser-use state` after each navigation to see the current element indices. Element indices change between pages.
|
|
136
|
+
|
|
137
|
+
**Playwright fallback**: If browser-use is unavailable or fails, use Playwright:
|
|
138
|
+
```bash
|
|
139
|
+
npx playwright open <url>
|
|
140
|
+
# Use page.screenshot() and page.locator().boundingBox() for the same results
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Step 4: Generate Avatar Clips
|
|
144
|
+
|
|
145
|
+
Skip this step if `--no-avatar` or `--preview` was specified.
|
|
146
|
+
|
|
147
|
+
1. First, check available avatars:
|
|
148
|
+
```bash
|
|
149
|
+
npx devrel-toolkit d-id avatars
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
2. Prepare an avatar script JSON file (`./demo-work/avatar-script.json`):
|
|
153
|
+
```json
|
|
154
|
+
[
|
|
155
|
+
{ "id": "scene-1-landing", "narration": "Welcome to our platform...", "avatarId": "<chosen-avatar-id>" },
|
|
156
|
+
{ "id": "scene-2-signup", "narration": "Signing up is simple...", "avatarId": "<chosen-avatar-id>" }
|
|
157
|
+
]
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
3. Generate avatar clips:
|
|
161
|
+
```bash
|
|
162
|
+
npx devrel-toolkit d-id generate \
|
|
163
|
+
--script ./demo-work/avatar-script.json \
|
|
164
|
+
--output ./demo-work/avatars/ \
|
|
165
|
+
--avatar "<avatar-id>"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
4. This takes 1–5 minutes per scene. Wait for completion. The output includes a `manifest.json` with clip paths and durations.
|
|
169
|
+
|
|
170
|
+
### Step 5: Assemble Render Props
|
|
171
|
+
|
|
172
|
+
Combine screenshots, avatar clips, bounding boxes, and timing into `render-props.json`:
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"resolution": { "width": 1920, "height": 1080 },
|
|
177
|
+
"fps": 30,
|
|
178
|
+
"scenes": [
|
|
179
|
+
{
|
|
180
|
+
"id": "scene-1-landing",
|
|
181
|
+
"screenshotPath": "/absolute/path/to/demo-work/screenshots/scene-1-landing.png",
|
|
182
|
+
"avatarClipPath": "/absolute/path/to/demo-work/avatars/scene-1-landing.mp4",
|
|
183
|
+
"avatarDuration": 4.5,
|
|
184
|
+
"narration": "Welcome to our platform. Let me show you how easy it is to get started.",
|
|
185
|
+
"highlights": [
|
|
186
|
+
{
|
|
187
|
+
"bbox": { "x": 500, "y": 300, "width": 200, "height": 50 },
|
|
188
|
+
"style": "glow",
|
|
189
|
+
"color": "#4A90D9"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"zoom": {
|
|
193
|
+
"bbox": { "x": 200, "y": 100, "width": 800, "height": 400 },
|
|
194
|
+
"level": 1.5
|
|
195
|
+
},
|
|
196
|
+
"transition": "fade"
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"avatarPosition": "bottom-right",
|
|
200
|
+
"avatarSize": 280,
|
|
201
|
+
"showSubtitles": true
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Important**: All file paths must be **absolute paths**.
|
|
206
|
+
|
|
207
|
+
Get avatar durations from the `manifest.json` generated in Step 4. If no avatar, estimate duration from narration word count (~150 words per minute).
|
|
208
|
+
|
|
209
|
+
### Step 6: Render the Video
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Full quality render
|
|
213
|
+
npx devrel-toolkit render \
|
|
214
|
+
--props ./demo-work/render-props.json \
|
|
215
|
+
--output demo-output.mp4
|
|
216
|
+
|
|
217
|
+
# Or preview mode (fast, low-res)
|
|
218
|
+
npx devrel-toolkit preview \
|
|
219
|
+
--props ./demo-work/render-props.json \
|
|
220
|
+
--output preview-output.mp4
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Wait for the render to complete. This may take a few minutes.
|
|
224
|
+
|
|
225
|
+
### Step 7: Deliver
|
|
226
|
+
|
|
227
|
+
1. Report the output file path to the user
|
|
228
|
+
2. Mention the video resolution, duration, and scene count
|
|
229
|
+
3. Offer to iterate: "Want me to adjust any scenes, change the narration, or re-render?"
|
|
230
|
+
4. Clean up: `browser-use close`
|
|
231
|
+
|
|
232
|
+
## Narration Writing Guide
|
|
233
|
+
|
|
234
|
+
- **Conversational tone**: Write as if explaining to a colleague, not reading a manual
|
|
235
|
+
- **Short sentences**: 10–15 words per sentence, 30–60 words per scene
|
|
236
|
+
- **Active voice**: "Click the sign-up button" not "The sign-up button can be clicked"
|
|
237
|
+
- **No filler**: Skip "as you can see" and "now I'm going to"
|
|
238
|
+
- **Match the audience**: Technical demos can use jargon; product demos should be accessible
|
|
239
|
+
|
|
240
|
+
## Error Handling
|
|
241
|
+
|
|
242
|
+
**browser-use not found:**
|
|
243
|
+
- Run `npx devrel-toolkit setup` or install manually: `curl -fsSL https://browser-use.com/cli/install.sh | bash`
|
|
244
|
+
- Do NOT use `pip install browser-use` — that installs the Python SDK, not the CLI
|
|
245
|
+
- If browser-use cannot be installed, fall back to Playwright
|
|
246
|
+
|
|
247
|
+
**Browser navigation fails:**
|
|
248
|
+
- Retry the action once
|
|
249
|
+
- Try alternative selectors (by text, by role, by index)
|
|
250
|
+
- If still failing, skip the scene with a warning to the user
|
|
251
|
+
|
|
252
|
+
**D-ID generation fails:**
|
|
253
|
+
- Check error message: 401 → API key issue, 402 → credits exhausted
|
|
254
|
+
- Offer to render without avatar: `--no-avatar` mode
|
|
255
|
+
- If timeout: the D-ID API may be slow, suggest retrying
|
|
256
|
+
|
|
257
|
+
**Remotion render fails:**
|
|
258
|
+
- Verify all file paths in render-props.json exist
|
|
259
|
+
- Check that screenshot files are valid PNGs
|
|
260
|
+
- Try preview mode first to isolate issues
|
|
261
|
+
|
|
262
|
+
**Always clean up:**
|
|
263
|
+
```bash
|
|
264
|
+
browser-use close
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Debugging Compositions
|
|
268
|
+
|
|
269
|
+
For debugging video compositions before rendering, you can run Remotion Studio:
|
|
270
|
+
```bash
|
|
271
|
+
cd <devrel-toolkit-directory>
|
|
272
|
+
npx remotion studio
|
|
273
|
+
```
|
|
274
|
+
This opens a browser preview where you can scrub through the timeline, inspect individual scenes, and verify animations before committing to a full render.
|
|
275
|
+
|
|
276
|
+
## References
|
|
277
|
+
|
|
278
|
+
- **DemoScript schema** (Step 2 output): see `references/demo-script-schema.md`
|
|
279
|
+
- **RenderProps schema** (Step 5 output): see `references/render-props-schema.md`
|
|
280
|
+
- **Toolkit CLI commands**: see `references/toolkit-commands.md`
|
|
281
|
+
- **Browser-Use CLI**: use browser-use commands as documented in the browser-use skill. Run `browser-use state` to discover element indices.
|
|
282
|
+
- **Remotion best practices**: for advanced Remotion patterns, refer to the Remotion agent skills if installed (`npx skills add remotion-dev/skills`)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# DemoScript JSON Schema
|
|
2
|
+
|
|
3
|
+
This is the schema Claude Code produces after planning the demo (Step 2).
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"title": "string",
|
|
8
|
+
"description": "string",
|
|
9
|
+
"url": "string (app URL)",
|
|
10
|
+
"resolution": { "width": 1920, "height": 1080 },
|
|
11
|
+
"fps": 30,
|
|
12
|
+
"scenes": [
|
|
13
|
+
{
|
|
14
|
+
"id": "string (unique scene identifier)",
|
|
15
|
+
"title": "string",
|
|
16
|
+
"narration": "string (what the avatar says)",
|
|
17
|
+
"navigation": [
|
|
18
|
+
{
|
|
19
|
+
"action": "goto | click | scroll | type | wait | hover",
|
|
20
|
+
"target": "string (URL, selector, or description)",
|
|
21
|
+
"value": "string (for type/scroll actions)",
|
|
22
|
+
"waitAfter": "number (ms to wait after action)"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"highlights": [
|
|
26
|
+
{
|
|
27
|
+
"selector": "string (CSS selector or description)",
|
|
28
|
+
"style": "box | glow | arrow | underline",
|
|
29
|
+
"color": "string (optional, default: #4A90D9)"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"zoom": {
|
|
33
|
+
"selector": "string (element to zoom into)",
|
|
34
|
+
"level": "number (1.0 = no zoom, 2.0 = 2x)"
|
|
35
|
+
},
|
|
36
|
+
"transition": "fade | slide | cut"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Notes
|
|
43
|
+
- `id` should be descriptive: `scene-1-landing`, `scene-2-signup`
|
|
44
|
+
- `narration` should be 30-60 words per scene
|
|
45
|
+
- `navigation` steps execute sequentially to reach the scene's state
|
|
46
|
+
- `zoom` and individual `highlights` are optional
|
|
47
|
+
- `transition` controls how this scene appears (first scene uses `fade`)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# RenderProps JSON Schema
|
|
2
|
+
|
|
3
|
+
This is the schema consumed by `npx devrel-toolkit render` (Step 6). Assembled in Step 5 from screenshots, avatar clips, and bounding boxes.
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"resolution": { "width": 1920, "height": 1080 },
|
|
8
|
+
"fps": 30,
|
|
9
|
+
"scenes": [
|
|
10
|
+
{
|
|
11
|
+
"id": "string",
|
|
12
|
+
"screenshotPath": "string (absolute path to screenshot PNG)",
|
|
13
|
+
"avatarClipPath": "string (optional — absolute path to avatar MP4)",
|
|
14
|
+
"avatarDuration": "number (seconds — from manifest.json or estimated)",
|
|
15
|
+
"narration": "string (for subtitles)",
|
|
16
|
+
"url": "string (optional — displayed in browser chrome URL bar)",
|
|
17
|
+
"title": "string (optional — scene title for progress)",
|
|
18
|
+
"highlights": [
|
|
19
|
+
{
|
|
20
|
+
"bbox": { "x": 0, "y": 0, "width": 300, "height": 50 },
|
|
21
|
+
"style": "box | glow | arrow | underline",
|
|
22
|
+
"color": "string (optional)"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"zoom": {
|
|
26
|
+
"bbox": { "x": 0, "y": 0, "width": 800, "height": 400 },
|
|
27
|
+
"level": 1.5
|
|
28
|
+
},
|
|
29
|
+
"transition": "fade | slide | cut",
|
|
30
|
+
"cursorPath": [
|
|
31
|
+
{ "x": 100, "y": 200, "timestamp": 0 },
|
|
32
|
+
{ "x": 300, "y": 400, "timestamp": 1000 }
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"avatarPosition": "bottom-right | bottom-left | top-right | top-left",
|
|
37
|
+
"avatarSize": 280,
|
|
38
|
+
"showSubtitles": true,
|
|
39
|
+
"intro": { "title": "string", "subtitle": "string (optional)", "durationSeconds": 3 },
|
|
40
|
+
"outro": { "title": "string", "subtitle": "string (optional)", "durationSeconds": 3 },
|
|
41
|
+
"backgroundMusic": "string (optional — path to audio file)"
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Important
|
|
46
|
+
- All file paths (`screenshotPath`, `avatarClipPath`, `backgroundMusic`) must be **absolute paths**
|
|
47
|
+
- `avatarDuration`: get from `manifest.json` after D-ID generation. For no-avatar mode, estimate: `words / 2.5` (150 wpm)
|
|
48
|
+
- `bbox` values come from `browser-use get bbox <index>`
|
|
49
|
+
- `cursorPath` timestamps are in milliseconds from scene start
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# devrel-toolkit CLI Commands
|
|
2
|
+
|
|
3
|
+
| Command | Description |
|
|
4
|
+
|---------|-------------|
|
|
5
|
+
| `npx devrel-toolkit doctor` | Check all dependencies (FFmpeg, browser-use, D-ID key) |
|
|
6
|
+
| `npx devrel-toolkit setup` | Install missing dependencies |
|
|
7
|
+
| `npx devrel-toolkit d-id avatars` | List available D-ID avatars and sentiments |
|
|
8
|
+
| `npx devrel-toolkit d-id generate --script <path> --output <dir>` | Generate avatar clips from script |
|
|
9
|
+
| `npx devrel-toolkit d-id generate --script <path> --output <dir> --avatar <id>` | Generate with specific avatar |
|
|
10
|
+
| `npx devrel-toolkit render --props <path> --output <path>` | Full quality video render (1080p, 30fps) |
|
|
11
|
+
| `npx devrel-toolkit render --props <path> --output <path> --resolution 720` | Render at 720p |
|
|
12
|
+
| `npx devrel-toolkit preview --props <path> --output <path>` | Quick low-res preview (480p, 15fps) |
|
|
13
|
+
|
|
14
|
+
## Generate Command Output
|
|
15
|
+
|
|
16
|
+
The `d-id generate` command produces:
|
|
17
|
+
- Individual avatar MP4 clips in the output directory: `<scene_id>.mp4`
|
|
18
|
+
- A `manifest.json` with clip paths and durations:
|
|
19
|
+
```json
|
|
20
|
+
{ "scenes": [{ "id": "scene-1", "clipPath": "/path/to/scene-1.mp4", "duration": 4.5 }] }
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use the `duration` values from the manifest when assembling `render-props.json`.
|