Repository navigation
v0.4.0
Closes the gaps in 0.3.1: places where the tool let a broken demo pass, promised more than it did, or behaved differently in two places. Renders of the same script are the same in more places, and a script that worked with 0.3.1 may need the changes listed first.
Changes that can affect existing scripts
- Paths in a script are relative to the script's folder, including
demo.render(path)and therecordingsDiroption, which were relative to the working directory. Paths on the command line are still relative to the working directory. A script run from its own folder is unaffected; otherwise its output moves next to it. - The page's date is pinned to Tuesday, September 23, 2025, 9:41 AM UTC by default, matching the menu bar, instead of the real time at render. Pass
clock: new Date()for the real time, or setclockandtimezone. - VS Code has the macOS keybindings, like the browser and the desktop around it: press
Meta+…in the editor where scripts pressedControl+…(Meta+ArrowDownfor the end of a file). Its menus show ⌘. menubar: { clock }is nowmenubar: { clockText }, sinceclockelsewhere is a moment, not text.clockstill works there until 1.0.- The browser window is Chrome on a Mac on every host, like the desktop: pages show the same shortcut hints in a local preview as in the container, and a site that checks the user agent or client hints for a headless browser sees an ordinary one. Press
Meta+…for a page's own shortcuts (a script that pressedControl+Kin the container needsMeta+K); editing shortcuts in its fields (Meta+A,Alt+ArrowLeft) do what they do on a Mac on every host. - The browser window has no tabs: a link or
window.open()that would open a new tab opens in the window, instead of in a tab nobody sees. - A page's
alert(),confirm()orprompt(), which isn't drawn in the video, is answered OK with a warning at the line, rather than cancelled silently (a confirmed delete stayed undeleted). The README lists what else Chromium draws outside the page: a<select>'s list, pickers, context menus, tooltips. pronunciationsrespell whole words:{ SQL: "sequel" }leaves PostgreSQL alone.goto({ settle })is nowgoto({ hold }), becausesettleelsewhere means time off camera.settlestill works ongotountil 1.0.- Clicks and
moveToare checked. A script that moved to an element off screen, or clicked one covered by a window or an overlay, used to pass and film the wrong thing; now it fails at that line. Adddemo.scroll()orfocus()where needed. render,RenderOptions,recordCommand,scriptedEvents, andplaybackEventsare no longer exported; they were internal.
check can be trusted
- An editor file or command that VS Code can't find fails at its script line, instead of pressing Enter on "No matching results" or a similar command.
- A script that never calls
demo.render()fails instead of passing silently, andrender,previewandrecorddon't take ademo.check()for one (they exited 0 having written nothing). - A missing terminal recording names the script line.
- Options render can't use fail at their
createDemo()line:fps,viewport,desktopandgifsizes that aren't positive numbers (they failed in ffmpeg or sharp partway through a render), and a misspelttheme,timezoneorclock. Number options on actions fail where they're queued too: awpmorspeedof 0, or a string, hung the render, and a negativewaitran time backwards. (maxGap: Infinity, which keeps every silence in a recording, is still allowed.) - A missing
sessionfile names thecreateDemo()line. - A misspelt option name fails where it's written, with the name it probably meant (
viewPort: did you meanviewport?), as a misspelt value does; scripts run without type-checking, soduraton: 3000used to be ignored. Insidecamera,menubarandgiftoo. checkfails, at thesay()line, when the voice engine can't run (nokokoro-jsinstalled) for a linerenderwould have to synthesize.- The CLI names what's missing instead of doing something else: an option without its value (
--outlast), a value on an on/off option (--prune=no), a command with no script,cache clearwith no part, an unknowncachecommand. openFile()andcommand()accept only the file or command asked for. VS Code's search offers a near match for almost anything (webapp.ts for "app.ts"), and that used to be opened whilecheckpassed; now it fails at the line and names what VS Code offered.editor.file()andeditor.tab()match exact names too, and the folder the file is directly in when you give one ("src/app.ts", spaces included).- A script path that doesn't exist is named plainly, instead of with Node's module error.
Fixes and additions
- A page with scroll-driven animations (github.com has them) no longer stops the render with "Invalid currentTime": the page clock steps time-based animations only, and leaves one that follows the scroll position to the page.
- Renders no longer idle for about 10 seconds after finishing.
- With npm 12, which blocks dependencies' install scripts unless a project allows them, ffmpeg-static's binary is never downloaded: reelscript then uses an
ffmpegon your PATH, or names the two commands that fetch it, instead of failing withspawn ENOENT. The README's install says so too. reelscript warmup browserinstalls the Chromium build reelscript drives, and the README uses it: in a project with its own Playwright,npx playwright installfetched that version's build, and the error it led to sent you round in a loop.warmupwith no parts includes it, and it checks the browser starts: on Linux,--with-depsinstalls Chromium's system libraries, and a launch that fails for lack of them names them and that command. A missing browser names the command wherever it's found, in a form that also works without a local install (for MCP);loginsays it can't show a browser only where that's so;reelscript cachelists the browser, andcache clear browserremoves it (clear allleaves it, since other projects share it).- A target is its first visible match, so a hidden copy (a collapsed mobile menu) no longer fails the step, and several visible matches are a warning at the line.
- MCP:
inspect_pagelists elements inside web components, suggests selectors that find text fields (by placeholder or label;has-textnever matched them), and never shows what's typed in a field, such as a password. - Terminal output ending in a newline no longer leaves a blank line before the next prompt, and
promptonrun()andprint()can be a string: the prompt from then on, after acd, say. - GIFs aren't scaled up past the video's width, and the summary gives the GIF's own size and frame count.
- An unknown command is named before the usage.
- The README's commands all run after its own install step (
npx reelscript login,record,warmup narration), and its extension section says to build the extension first. - Ctrl-C during
recordsaves nothing, so the recordings a render replays stay as they were (it overwrote them with partial and empty ones);checkwarns about a recording that never finished. - A click, or a page's own redirect, that lands on an HTTP error page is a warning at the line, as a
goto()that does is. - A terminal whose
colsandrowsdon't fit its window warns that the rest is cut off (the README's asciinema recipe says to give it room). - MCP
inspect_pagesuggests one element per selector (:text-isfor a short label, and which one when several share it, such as an Edit in every row) and says when it lists only the first 80. - The README says what recorded commands print without a pseudo-terminal (
lsone name per line,gitwithout colour) and the flags that change it. An emptyREELSCRIPT_CACHEcounts as unset, as an emptyREELSCRIPT_MODELSdoes; it madecache clear allclear the working folder. - The test suite never clears a contributor's own
REELSCRIPT_MODELSfolder, and an emptyREELSCRIPT_MODELScounts as unset. - No
module.register()deprecation warning on every command under Node 26 (the Node Homebrew installs), nor in MCP results. - A
goto()nothing answers says so (is the app running?), and in the container explains thatlocalhostis the container and how to reach your machine; the README says so too. - The README states the one exception to the path rule (Playwright's own calls in
demo.call()), with a recipe for choosing a file to upload.record's warnings name the script line, and typing while the terminal has focus says how to name the field's window. demo.press("Meta+K")sends the key a Mac does,k, so a command palette listening for it opens (it sentK).- A function a script passes to
page.evaluate()indemo.call()can use named helpers; tsx's__namewasn't defined in the page. - Ctrl-C during
loginsaves nothing and leaves any session already there as it was. - Typed YAML lands as written in the editor; VS Code's own YAML settings turned auto-indent back on.
- A local page's paths from the root (
/pricing.html, a built app's/assets/...) are its folder's, as a site's root would be. check,renderandrecordwith several scripts run them all, report each failure, and end with how many failed; the first failure used to stop the rest without a word.untilmatches in any case and says when the text never came;recordstops what a command left running before exiting; a voice engine that returns no audio fails clearly (it made the render run forever);clock: "now"means the real time, as in MCP.- The README says a live server's data is stamped with the real date (and what to do), and its CI recipe starts the app.
terminal.run(cmd, { until }):recordstops a command that keeps running (a dev server) once its output shows that text, as meant, instead of at its two-minute limit with a warning (and a failure under--strict).- A recorded command doesn't see the settings the CLI passes itself, so recording a command that runs reelscript records what it really does.
checkandrenderwarn about a recording of a command that failed (without the run'sexitCodesaying so) or was cut off, socheck --strictcatches it in CI; it was a warning only atrecord. MCP'srecord_scriptis strict by default.demo.scroll(selector)takes the first visible match like every other target, and warns when several are; it falls back to the first on the page only for content that appears once it's scrolled to.- MCP
inspect_pagesays when a local page isn't there, and when a page answered with an HTTP error. render -hshows the help,cache clearsays when there was nothing to remove, and counts read "1 frame" and "an alert()".- The page clock leaves a page's own control of its animations alone: what the page pauses (
pause(),animation-play-state: paused) stays paused, where it seeks is where the clock goes on from, and what it finishes stays finished. The clock stepped them all. - Local pages (
goto("./app.html")) are served from this machine over http, not opened as files: theirfetch("/api/...")reachesmockAPI, their cookies stick, ES modules load, and video can seek. A local page that isn't there fails with its path. demo.scroll(selector)goes to content that only appears once it's scrolled into view (a reveal-on-scroll section), and a target that's there but not visible says so, with a hint to scroll to it.- A script can say a warning's cause is meant, so
--strictpasses it:goto(url, { status: 404 }),terminal.run(cmd, { exitCode: 1 }), andcursor.click({ dialog: "accept" | "dismiss" }), which also answers the dialog as asked. open()on an open terminal or editor keeps what isn't passed (an editor moved with{ x, y }kept no workspace, a terminal given a font lost its prompt).- A failed run leaves earlier output alone: under
render --out, a script that fails after its render puts the previous video back, andrecordwrites recordings only once every command has run (and, with--strict, without warnings). The video is there as soon asrender()returns, so a script can cut or caption its own render. demo.type()needs the keys to land in a text field (a button took a space as a click);previewof a script that renders twice shows the first; MCP tool calls that are cancelled stop the run.- Content that reacts to scrolling (a reveal-on-scroll, an IntersectionObserver) renders the same every time: after a page loads and after each scroll step, the page renders on its own frames, which is when Chromium delivers those callbacks, before its clock moves on. Renders of such pages differed visibly.
- A fade or slide that a click starts renders the same every time: Chromium also runs it on its compositor, and the clock held it before that copy had started, which now and then left the click's frame showing it a frame in.
- An action missing what it can't do without fails where it's queued:
wait()with no time hung the render, andscroll()needs a selector or exactly one of{ by }and{ to }. loginwithout a terminal (an agent's shell, stdin from /dev/null) waits for the window to close instead of saving at once, and never writes an empty session, least of all over one that works.- MCP:
check_scriptis strict by default, ascheck --strictin CI, andrender_scripttakesstrict;inspect_pagetakes aclockandtimezonelike a demo's, so a session for an app that checks its token's expiry works there too. - A target counts as visible only when a viewer could see it: an element inside something faded all the way out (a closed modal at
opacity: 0) isn't, for targets,waitFor, the caret and MCP'sinspect_pagealike. The repo's own example let a script aim at its closed dialog and pass. demo.type()fails on a field that can't take the keyboard (disabled, read-only, not a text field), instead of typing into whatever had it before.- A cookie the page sets to expire in a month, by its pinned date, is kept; Chromium judged it by the real date and dropped it at once (a consent banner that came back).
render --strictwith warnings leaves the previous video in place, like any failed render.- The README shows your own first script (check, preview, render) right after Install, says a target is in the window's page and not inside an iframe (with the off-camera way to fill one), and that a saved sign-in wants
clock: new Date()when the app checks its token's expiry. The CLI help showspreview --atas optional andcache cleartaking several parts. demo.scroll(selector)scrolls across as well as down, so a card in a carousel, a column of a wide table or a board comes into view; it only scrolled down, and the next step's hint to scroll sent you round in a loop.recordruns a command at the size of the terminal it runs in when the script fixes one (cols,rows), so its lines wrap as they will on screen.check --strict(andrender,record) fails on warnings too, for CI: a page that answered 404, a mock no request used, an ambiguous target.warmuprefuses a misspelt part before downloading anything.loginopens the same browser a demo uses (Chrome on a Mac), without the automation flag some sign-in pages refuse. Command hints in errors all readnpx @reelscript/cli …, which works with or without a local install.- The README says a page's fonts come from the machine (
system-uiis San Francisco on a Mac, a Linux font in the container). scroll({ by })andscroll({ to })move an app's own scrolling area when the page itself doesn't scroll (the usual app layout, where they did nothing), and fail when nothing on the page scrolls.- A script that renders twice (an MP4 and a GIF) runs each command once under
record, and--outorpreview, which name one output, refuse it instead of overwriting one render with the other. - A format
rendercan't write is refused before narration is synthesized (and before the voice model downloads). - VS Code's logs stay in each run's temporary folder instead of piling up in
~/.local/share/code-server. cache cleartakes several parts, likewarmup, and refuses a misspelt one before removing anything;loginnames a missing web address.- The README says network responses arrive in real time, and how to keep them out of the timing.
editor.type()after clicking a file in the Explorer types into the file; the keys went to the Explorer (and selected files) whilecheckpassed. With no file open, it fails at its line.- Opening a terminal that's open applies a new
fontSizeorlineHeighttoo, as the README's rule foropen()now says. - A
goto()that gets an HTTP error is a warning at its line: a renamed page would otherwise be filmed as the site's error page. - In a project without
"type": "module", the script's temporary copy is gone before the script runs, so it no longer shows in a demo's terminal (ls,git status) or the editor's Explorer. - The browser's request headers match what its scripts see (Chrome on macOS, not HeadlessChrome), and
navigator.webdriveris false. MCPinspect_pageshows the page as a demo's browser does: Chrome on a Mac, on the demo's default date and timezone. CHANGELOG.mdships in the package and the README links it.- A voice engine of your own has its own default voice (
defaultVoice, or the first of itsvoices), not Kokoro'saf_heart; the README documentsdefaultVoiceandready(). goto("/pricing")is a page on the site the browser is showing, as a path is inmockAPI, not a file at the root of the disk; with no site showing it says so. MCPinspect_pagetakes a local page's path.reelscript cachecounts the browser at its real size, and output piped intoheadends quietly.- Scripts without top-level
awaitrun in projects without"type": "module"too, as the README promised, and errors from such a script name it rather than its temporary copy. record --pruneworks with scripts that have no recordings folder.mockAPI("/api/projects")matches that path on any origin and with any query, as a path suggests (a pattern was only a URL glob, which a bare path never matched); the README gives the forms, and a mock nothing requested is a warning at its line.terminal.open({ cols })or{ rows }alone fixes that one and fits the other; it was ignored without both.preview --atpast the end fails with the demo's length, instead of quietly returning the last frame.- A failure in the page clock itself is a warning, once, instead of silently leaving that page's animations on real time.
close()on every window, andbrowser.open(geometry)to place the browser without navigating.mockAPIapplies to the browser window without opening it.clockandtimezoneoptions; the menu bar shows the demo's clock.reelscript cachelists what's cached andreelscript cache clear <part|all>removes it;reelscript warmupalso downloads VS Code. The parts share names withwarmup(narration,editor).reelscript recordtakes several scripts, warns when a command fails, and--pruneremoves recordings no script uses.reelscript loginand the session-not-found error print the exact paths to use, so following the error can't loop.- The container image is built for amd64 and arm64, each tested on its own architecture. VS Code and the voice model are built in, and
/cacheholds what a render adds, so a volume there keeps extensions and spoken lines between runs. It runs as any user; the README shows--userso files it writes on Linux are yours. - MCP:
inspect_pagetakes asession; a newrecord_scripttool that takes every script sharing a recordings folder; tools that drive the real app are no longer marked read-only; the container includes the README thatreelscript_docsserves. reelscript --helpexits cleanly, and progress lines are plain in CI logs.- A closed editor opens again, and reopening it on a different workspace, extensions, or settings starts a fresh VS Code. Stopping VS Code now stops every process it started.
- Rendering to anything but
.mp4or.gifis an error up front, and a render stops with ffmpeg's error instead of hanging if ffmpeg quits. editor.type()brings the editor forward before typing, anddemo.type()takes awindowand fails like other targets when its selector is missing.reelscript recordruns commands in the script's folder, or a run'scwd, so recordings don't depend on where you ran it from.- Calling
demo.check()from a script counts as the script's run, and honoursverbose. - Error messages about a window that isn't open name the call that opens it.
- A failed render leaves the previous output in place; the new file replaces it only once rendering succeeds.
- The page clock handles
Date()called withoutnew, and pages that subclassDate. It also covers the timeIntlformats when given no date andTemporal.Now, which showed the real date beside a pinnedDate, and seedsMath.random, so a page's random data is the same on every render. record --pruneonly deletes terminal recordings, never other JSON files in the folder.- Node 20.11 or later is required (20.6 to 20.10 couldn't run scripts in projects without
"type": "module"). - Clicks land where you aimed. Moving to or zooming on an element outside the visible part of its window fails with a hint to scroll first, and a click on an element covered by another window or an overlay fails at its line instead of clicking what's on top.
demo.scroll(selector | { by, to })scrolls on the frame clock, so scrolling renders the same every time. Chromium's smooth scrolling is off, so keys like PageDown jump instead of animating on their own clock.- The page clock also advances inside iframes.
- A misspelt voice fails
checkat itssay()line, checked against the demo's ownvoiceandttsengine, and narration errors name their line.checkalso rejects an output formatrenderwould. - On macOS, a render that failed or was interrupted after synthesizing narration no longer aborts with a C++ "mutex lock failed" and exit code 134; it exits with 1, or 130 after Ctrl-C.
- Ctrl-C and termination stop VS Code and remove partial videos and temporary script copies.
recordwarns clearly when it stops a command at its two-minute limit, and stops everything the command started (a && b,npm run dev), not just the shell. A command that runs twice, or in two folders, gets a recording for each run.- Open VSX and
.vsixextensions install into a mounted/cache(they failed with "cross-device link not permitted"). - In the container,
docker stopand Ctrl-C work from the moment reelscript starts, not only once a browser is open. rendertakes several scripts; options a command doesn't take are errors;--helpworks after any command;previewchecks--atand writes only.png.demo.scroll()fails clearly on the editor or terminal, which it can't scroll.checkmoves the page's mouse like a render, so hover menus open, and times narration with the real length of lines already synthesized.loginsaves IndexedDB too (Firebase and other apps keep their sign-in there), and explains that it needs your own machine when run where there's no visible browser.readAsciicast(path)plays asciinema recordings (v2 and v3) in a terminal window.demo.type()requires the field to be on screen, likemoveTo;demo.press()takes awindow.- The README is honest about VS Code's real-time clock, and the extension example waits for its result instead of a fixed time.
browser.goto("./app.html")opens a local page relative to the script, like every other path in a script.- Quick Open and the Command Palette ask again if VS Code hasn't registered an extension's commands or indexed files yet, instead of failing on a slow machine.
editor.openFile()ends once the file is open with the caret in it, andeditor.command()once VS Code has run it (or moved on to its own prompt), so the next step never races VS Code; this made editor checks flaky on slow machines.openFile()also waits for the Explorer to reveal the file, and aiming at something in the editor waits for it to stop moving, so a folder expanding under the cursor can't turn a click into a click on the next row.<video>,<audio>and SVG (SMIL) animations follow the frame clock, so pages with a hero video or an animated SVG render the same every time; a page's ownplay()/pause()still work. Animated GIFs can't be controlled and are documented as playing on their own.- Web components render the same every time too: animations,
<video>,<audio>and SVG in shadow roots, open or closed, follow the frame clock, and their text fields get the drawn caret. - A
<video>that can't be moved to the clock's time (served without HTTP Range requests, aspython -m http.serverdoes) is a warning instead of a silently still picture. - An odd
desktopsize is rounded up to even numbers, as H.264 needs, instead of failing the.mp4render;goto("./app.html#route")keeps its query and hash;recordhonoursverbose: false;cache clear narrationclears every voice model reelscript downloaded. - The text caret in web pages blinks on the frame clock: Chromium's own blinks on real time, so two renders differed wherever a field had focus.
- The page clock follows Web Animations the page reverses, slows, speeds up, or replays.
- A misspelt
ease,window,within,buttonorcamerafails where the script sets it; typing or pressing keys in the terminal window fails with a pointer toterminal.run(); an extension folder named without./is a path; a missingcwdfails clearly inrecord. - The desktop's wallpaper and menu bar are drawn before any page loads, and a screenshot Chromium refuses under load is retried, fixing intermittent
previewfailures on heavy sites. cache clear narrationremoves only the Kokoro model, not other files in aREELSCRIPT_MODELSfolder.- Option names drop their units:
camera: { hold }andmaxGap.holdMsandmaxGapMsstill work until 1.0. - "Built in" in
reelscript cachenow means only the container's own copies; a models folder you set withREELSCRIPT_MODELScan be cleared, and a code-server you point at is never deleted. - The README covers every command, option, and method, and the rules that hold across them.