[ Documentation ]
rnx record

rnx record

rnx record

Drives the engine’s built-in canvas recorder over the WS bridge: no second browser, no ffmpeg. Encoding happens in the running page (MediaRecorder for webm, WebCodecs for mp4, gifenc for gif). Two modes: atomic (duration-bounded) or stateful (start → interact → stop). Stateful mode is webm/mp4 only; for gif/png use atomic mode. Use —frames to sample N evenly-spaced png snapshots instead of a video. NOTE on live/combined: the /preview/<id> id is derived from the app’s bundle identity, not the recording, so re-recording the same app reuses the same URL and overwrites the previous preview. This is intentional (re-record replaces in place); keep a recording you want to preserve by copying its /preview/<id> page elsewhere before recording the same app again.

terminal
rnx record [options]
rnx record start [options]
rnx record prelude-start [--origin <url>]
rnx record stop [--output <path>]
rnx record status # reports the record-start session; also probes the engine
rnx record cancel # cancels a record-start session
rnx record upload (--events <path> | --video <path>) [--open]

Options

flagdescription
--format <type>webm | mp4 | gif | png (inferred from —output extension; stateful mode is webm/mp4 only)
--mode <kind>video | live | combined (default: video). live captures the event stream; combined captures both and uploads automatically. NOTE: live/combined upload to /preview/<id> whose id is bundle-derived, so re-recording the same app overwrites the previous preview
--duration <seconds>recording duration (default: 10, atomic mode only)
--fps <number>target frame rate for video/gif (default: 30)
--output <path>output file, or directory when —frames is set
--frames <n>sample N evenly-spaced png frames instead of a video
--max-width <px>downscale gif frames to this width
--lockstepforced-perfect-frame-rate capture (record start/stop, mp4 only): step the engine clock exactly 1/fps per frame so every stored frame is freshly rendered unique content. virtual time runs slower than wall time, so wall-clock app timers and live gesture pacing compress relative to the output timeline
--no-shellexclude the simulated iOS chrome (status bar, keyboard, toasts) and record the tenant surfaces only
--shell-onlyrecord only the shell chrome
--openopen the uploaded preview URL in the browser after stop (live/combined)
--sim <sim>target a specific sim
--origin <url>billing/upload origin for live/combined (default: auto, which probes a local :3000 stack, else https://contrast.dev; also honors RNX_UPLOAD_ORIGIN)
--owner <org>associate live/combined preview uploads with a linked org repo; pass with —repo
--repo <repo>repo name for —owner; the signed-in user must belong to the owning org team
--events <path>for upload: gzipped events .jsonl.gz file to attach
--video <path>for upload: webm/mp4/gif recording to attach
--assets-onlyfor upload: keep assets only; re-issue API calls live

Examples

terminal
rnx record --duration 5
rnx record --format mp4 --output demo.mp4 --duration 8
rnx record --output demo.gif --duration 3
rnx record --frames 10 --output ./frames/
rnx record --mode combined --duration 8 --open --owner my-org --repo my-app
rnx record start --format mp4
rnx record start --mode combined
rnx record prelude-start
rnx record stop --output flow.mp4
rnx record cancel
rnx record upload --events ./my-run.jsonl.gz --open
rnx record upload --video /tmp/rnx-flow.webm

Recording Notes

record drives the engine’s built-in canvas recorder over the WS bridge: no second browser, no ffmpeg. Encoding happens in the running page:

  • +
    webm via MediaRecorder (default, fastest)
  • +
    mp4 via WebCodecs + mp4-muxer (chrome/edge, real h264)
  • +
    gif via gifenc on sampled frames
  • +
    --frames N dumps N evenly spaced png frames to a directory, handy when you only need a few snapshots from a sim (e.g. for handoff, regression reports, or diffing)

Format is inferred from --output’s extension, or pass --format. For step-by-step evidence around a bug, pair it with debug snapshot rather than trying to infer state from the video alone.