Quick Start
The fastest way to get started is with theinit command:
webreel.config.json file with a basic structure:
Understanding the Config Structure
Top-Level Fields
| Field | Type | Description |
|---|---|---|
$schema | string | JSON Schema URL for IDE autocompletion and validation |
outDir | string | Output directory for videos (default: videos/) |
baseUrl | string | Prepended to relative URLs in video configs |
viewport | object | Default viewport dimensions for all videos |
defaultDelay | number | Default delay (ms) after each step |
videos | object | Object mapping video names to their configurations |
Video Configuration
Each video in thevideos object has these key fields:
| Field | Required | Description |
|---|---|---|
url | Yes | The URL to record. Can be absolute (https://...), relative, or local file path (./web/index.html) |
viewport | No | Browser viewport dimensions as {"width": 1920, "height": 1080} |
zoom | No | CSS zoom level (e.g., 2 for 2x zoom, useful for higher quality output) |
waitFor | No | CSS selector to wait for before starting recording |
steps | Yes | Array of actions to perform during the recording |
Building Your First Recording
{
"$schema": "https://webreel.dev/schema/v1.json",
"videos": {
"hello-world": {
"url": "https://example.com",
"viewport": { "width": 1920, "height": 1080 },
"zoom": 2,
"waitFor": ".cta",
"steps": []
}
}
}
"steps": [
{ "action": "pause", "ms": 500 },
{ "action": "click", "selector": "a.cta", "delay": 1000 }
]
The Recording Workflow
Understanding how webreel processes your configuration helps you create better recordings:If you specified a
waitFor selector, webreel waits up to 30 seconds for that element to appear before starting.The cursor starts at a random position just outside the viewport edge (creating a natural entry motion).
Common Step Types
Pause
Wait for a specific duration:Click
Click an element by selector or text:Type
Type text into a focused input:Key Press
Press keyboard shortcuts:Tips for Getting Selectors
Using Browser DevTools
Using Browser DevTools
- Open your target page in Chrome
- Right-click the element you want to interact with
- Select “Inspect”
- In the Elements panel, right-click the highlighted element
- Choose Copy → Copy selector
Using Text Content
Using Text Content
Instead of selectors, you can target elements by their visible text:Webreel finds the smallest element containing that exact text. This is more resilient to markup changes.
Scoping with 'within'
Scoping with 'within'
When multiple elements match, narrow the search with This only searches within elements matching
within:.modal.Building Up Your Script Incrementally
The most effective way to create complex recordings is to build them step by step:{
"steps": [
{ "action": "pause", "ms": 500 },
{ "action": "click", "selector": "#menu-button" }
]
}
{
"steps": [
{ "action": "pause", "ms": 500 },
{ "action": "click", "selector": "#menu-button" },
{ "action": "click", "text": "Settings", "delay": 800 }
]
}
Preview Mode
Use preview mode to test your steps in a visible browser without recording:Watch Mode
During development, use watch mode to automatically re-record when your config changes:webreel.config.json and save, and webreel will immediately re-record your video.
Complete Example
Here’s a complete configuration from the hello-world example:Next Steps
Cursor and Overlays
Customize cursor appearance and keystroke HUD
Output Formats
Learn about MP4, GIF, and WebM output options
Advanced Actions
Master drag-and-drop, scrolling, and complex interactions
API Reference
Complete reference for all available actions