Repository navigation
Releases
v0.5.2
editor.openFile()andeditor.command()let VS Code finish a search before asking again. On a busy machine (a loaded CI runner, several code-servers at once) a Quick Open search could take longer than the pause before reelscript closed the palette and typed the name again, which started the search over; after ten seconds of that,checkfailed with "Quick Open found no file named …" for a file that exists. A search in flight is now waited for (up to 45 seconds), only VS Code's answers count toward the ten, and a timeout says VS Code hadn't found the file or command, not that it doesn't exist.- The README's API table gives each action option's default (
zoom.to's scale and duration, the follow camera's,click's duration,waitFor's timeout, the terminal's title, prompt and font size, …), as it did only forcreateDemo's, and says a mock lasts to the end of the demo: it can be replaced, not removed.reelscript --helpsayswarmupwith no part downloads all three.
v0.5.1
- An option named like the call's own argument no longer replaces it:
moveTo("#a", { target: "#b" })went to#b,terminal.run("ls", { command })ran the option's command, and{ kind }could turn a step into another. It fails at the line. - More options a step can't use fail at their line, as the rest have since 0.5.0:
type,pressandscrollwithwindow: "terminal"(andscrollwith"editor"), which always failed at render;speedormaxGapon declaredoutput, anddurationon timed or recorded output, which were ignored. say({ voice })is checked at its line, as the demo'svoiceis; it failed at render.- MCP:
check_scriptandrender_scripttakescripts, a list, asrecord_scriptand the CLI do;preview_frame'swidthisimageWidth, since it scales the returned image down, whereinspect_page'swidthis the viewport; every path parameter says it's relative to the working directory. - README: a local page shows a blank address pill, and
addressgets itsfile://URL;demo.check()fails at its line underrender,previewandrecord(it said the old forms all warn); the CLI block is--help's text again.
v0.5.0
Changes that can affect existing scripts
- Steps return nothing. They only ever queued, and
say(),zoom.to(),zoom.out()andmockAPI()already returned nothing while every other step returned a promise; now none does, andrender()is the one call to await.awaiton a step still works, so scripts don't need changing; a step's own mistake, like a misspelt option, now throws at its line rather than rejecting. The README and examples drop the awaits. - An option a step can't use fails at its line, as
menubaron thebaretheme has since 0.4.3:outputwithevents(outputwas dropped);cwd,untilorexitCodeon a run given its output (they're forrecord); text passed toprint()withevents(it wasn't shown);print()where the terminal shows a prompt, which wrote after it as if typed (end the run before withprompt: false, or open the terminal withprompt: ""); andaddressor a terminaltitleon thebaretheme, which draws neither. - A point target follows the rules a selector does. A click at
{ x, y }fails when the point is outside its window, or behind another window, where it clicked the desktop or that window;zoom.to()a point outside its window fails too. The cursor may still go anywhere, out of the shot, say. demo.check()gives way todemo.render(), whichreelscript checkalready checks. It still works underreelscript checkuntil 1.0, with a warning at its line; underrender,previeworrecordit fails at once, where it ran the whole check before failing.
Fixes
- A refitted window's warning says why: the smallest size a window can be (200x120, now in the README), the menu bar (
menubar: falseremoves it), or the desktop's size. It blamed the desktop's size for all three. - MCP's
preview_frameno longer names the temporary file it wrote the frame to, which it deletes before answering; the frame is the image it returns.
v0.4.3
- A window that doesn't fit on the desktop as asked (
terminal.open({ x: 700, width: 1200 })on a smaller one) is a warning at its line, naming what changed; it was moved and resized without a word. Windows also stay below the macOS menu bar instead of covering it. - The old names that still work until 1.0 (
goto({ settle }),maxGapMs, cameraholdMs,menubar.clock) are a warning at their line, so--strictfinds them before 1.0 removes them. Only the type definitions said so. menubarwith thebaretheme, which has no menu bar, fails atcreateDemo()instead of doing nothing.render --strict --out x.mp4with warnings saysx.mp4is unchanged, not the hidden file it renders beside it.- Documented: nothing runs until
render()plays the queue, so awaiting a step only queues it and atry/catcharound one catches nothing (usecall()for work that depends on the page);mockAPI()answers every method, and a later one on the same pattern replaces it;previewwritespreview-<seconds>s.pngin the working directory by default. - The repo's example recording names its script, as recordings have since 0.4.2.
v0.4.2
demo.render()resolves withcommand: what ran the script. The script also runs undercheck,previewandrecord, which write no video, so a script that cuts or captions its video should do it whencommandis"render"; undercheck,outnamed a file that was never written, and the script's own next step failed there (in CI, too). Undercheckandrecord,outis now"".record --pruneremoves only recordings the scripts it's given made. It removed every recording in the folder that those scripts didn't use, including other scripts' in a sharedrecordings/, the layout the README teaches. Each recording now names the script that made it; one from before 0.4.2 is left alone, and listed.- A misspelt
voicefails at itscreateDemo()line, like every other option; it failed at the firstsay(), or not at all in a demo with none. - Hints name the CLI as the project runs it:
npx reelscriptwhere reelscript is installed, as the README writes it, andnpx @reelscript/cliwhere it isn't.
v0.4.1
Fixes from using 0.4.0 the way the README says to.
- A
terminal.run()orprint()whoseeventshas a time that isn't a number ([["a", "x"]]) fails at its line;checkused to spin at full CPU forever.events,output,promptand the other text options of the wrong type fail there too, instead of with a JavaScript error and no line. waitFor()no longer passes on text only a screen reader gets. Withnotificationsoff, VS Code still puts a toast's message in a hidden alert, parked off the page's left edge, andwaitFor("text=Deployed")matched it while nothing showed; the README recommends that pattern. A box before the page's start, or clipped to nothing, isn't visible for any target or for MCP'sinspect_page.editor.file()andeditor.tab()fail on a path longer than a file and its folder ("bogus/src/app.ts"), which they quietly trimmed tosrc/app.ts.- An editor
workspacethat doesn't exist, or is a file, is named at its line; one failed with Node'sENOENT, and the other opened a broken, empty VS Code. - A
sessionfile that isn't a saved session (a log, say) says so and how to make one, instead of with Playwright's JSON error. - MCP's
inspect_pageanswers a misspelttimezone, an app that isn't running and a size that isn't positive the way a script is answered, instead of with Chromium's errors. - Messages that named the wrong thing:
render --out x.webmnamesx.webm, not the hidden file it renders beside it; a missing recording's hint names the script instead of<script>;checkwith warnings says so rather than "check passed" just before--strictfails it; and Ctrl-C duringrecordsays the recordings are unchanged, without first warning about the recording it stopped. - The README's snippet for demoing an extension says its paths are from the script's folder (
demo/fixtures/project), as they are.
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 me...
v0.3.1
- Logged-in apps.
reelscript login <url>opens a real browser so you can sign in once, and saves the session to a file.createDemo({ session: "session.json" })starts every browser window signed in. A missing session file is a clear error that tells you how to make one. demo.call(fn)gets the page.fnreceives{ page, context }, the focused window's Playwright page and the browser context, for setup that has to happen off camera.- Editor extensions no longer leak between demos. Each demo gets its own extensions, so an extension one demo loads never appears in another. Open VSX extensions and
.vsixfiles install once and are cached; pin versions withpublisher.name@1.2.3.
v0.3.0
reelscript check. Runs a script's whole timeline against the real app with nothing captured or encoded, in about a second for a browser demo, and fails with the script line of the first broken step. Made for pull requests: the demo breaks in CI when the UI changes under it.- Errors point at your script. Every failure from
renderorchecknow ends with the line that caused it, likeat demo/signup.ts:14:19 (cursor.moveTo). - Follow camera.
camera: "follow"zooms toward clicks and the typing caret on its own, starts moving before a click lands, keeps the cursor in view, and eases out when things go quiet.{ scale, holdMs }tunes it;zoom.to()still takes over when you want a specific shot. - MCP server for coding agents.
reelscript mcpgives Claude Code and other MCP clients the docs, page inspection with ready-made selectors,check, frame previews as images, and rendering, so an agent can write and iterate on a demo itself. demo.waitFor(selector, { window, timeout, settle })holds, off camera, until something appears, anddemo.call(fn)runs your own code at a point in the timeline, for changes the page can't cause itself.cursor.click({ duration: 0 })takes no video time, so a followingwaitForcuts straight to the result.zoom.to(target, { within: "window" })keeps a zoom inside the window, and a zoom that replaces another starts from wherever the first one got to.- Terminal:
terminal.run(cmd, { prompt: false })andterminal.print()for output that keeps coming, recordings made elsewhere as timed events, a fixedcolsandrows, andlineHeight. - Desktop:
addressrewrites what the browser's address pill shows (blank for local files, trimmed with an ellipsis when long), andmenubarsets the menu bar's app name and clock or removes it. - Pages get clipboard access; finished CSS animations stay finished under the frame-stepped clock.
Unreleased
-
demo.waitFor(selector). Holds the camera until the selector is visible while the page's clock keeps running, so a page that loads, fetches or animates gets the time without its loading being filmed. No video time passes. -
demo.call(fn),terminal.print(text)andterminal.run(cmd, { prompt: false }). A function run at a point of the timeline, for a change the page should see happen then, such as another client's edit; and terminal output split around it, with no prompt in between. -
Output recorded elsewhere.
terminal.runandterminal.printtakeevents, timed chunks of output with their escape codes, played like a recording;terminal.open({ cols, rows })fixes the terminal's size in characters, andlineHeightsets its line spacing (1 joins block characters, as in most terminal apps; the default stays 1.3). Together they play back a full-screen program (an agent's TUI, say) recorded at that size withscript -ror asciinema. Those events are written as they are, as a terminal writes a program's output: a bare line feed moves down a row and keeps the column. Other output still gets a carriage return before each line feed. -
cursor.click({ duration })andwaitFor(selector, { settle }). A click that takes no video time, followed by waitFor, cuts from the click straight to the page it led to;settleruns the page's clock a little longer, off camera, for what the page does once the target shows. -
zoom.to(target, { within: "window" }). Keeps the zoomed view inside the target's window, so the desktop behind it never shows at the window's edge. -
menubaroption.createDemo({ menubar: { app, clock } })sets what the macOS menu bar says;menubar: falseleaves it out and moves the window up into its place. -
Fixed: animations replayed. A CSS animation with a fill mode stays in
document.getAnimations()after it ends; the page clock took it for a new one every frame and started it over, so titles kept sliding in and anything with an enter animation flickered. -
addressoption.createDemo({ address: (url) => ... })rewrites what the address pill shows, so a dev server can appear as the public site. The pill now follows in-page navigation too, instead of the address the window was opened at. -
The page context is granted clipboard read and write, so Copy buttons in the page under demo work as they do in a real browser.
-
Address pill. Blank for
file://pages (title cards, fixtures), and a long path is cut at the end with an ellipsis instead of being clipped on both sides.
v0.2.0
- Editor window.
demo.editor.open()runs a real VS Code (code-server) on a workspace folder. Open files from the Explorer or Quick Open, type code, run palette commands, and load extensions from a folder, a.vsix, or Open VSX. Demo the extension you're building straight from its repo. - Multi-window desktop. Browser, terminal, and editor windows with positions, sizes, focus, and z-order. Clicking a window raises it; selectors resolve in the focused window or the one named with
window. - Terminal windows.
demo.terminal.open()andterminal.run()with declared output, or record real commands withreelscript recordand replay them frame-exact. - Narration.
demo.say()with Kokoro text-to-speech by default (offline, no account), paced timeline viawaitForNarration(), clips cached, audio mixed into the mp4. - Sub-pixel zoom. No more cursor jitter during zooms.
- GIF output with a palette-optimized encoder, chosen by file extension.
- Container image at
ghcr.io/trevin-lee/reelscriptwith Chromium, ffmpeg, fonts, the narration model, and code-server baked in. - CLI runs scripts as ES modules from any project, and
reelscript warmuppre-downloads the narration model.