Preview uploads & sharing
peach maestro test --preview, peach record --mode combined, and
peach record upload publish the bundle running in your sim to a shareable
/preview/<id> link. Anyone with the URL can open a live interactive copy of
the app in their browser, alongside an inline <video> of whatever sim run
you recorded.
Use cases:
- +PRs: attach a playable demo to every pull request
- +Designers / PMs / clients: hand someone a link; no TestFlight, no dev build, no Xcode
- +Sales demos, bug repros, onboarding walkthroughs: embed the same link anywhere an iframe fits
- +Support: ask a user to record their flow; get back a link that replays the exact state
One-off: upload the current sim
--open launches the resulting /preview/<id> URL in your browser after upload.
The three one-shot flows
1. Record + share in one command
Captures video and the event stream simultaneously, uploads to a /preview/<id> link, copies the URL to your clipboard, and animates the Dynamic Island while uploading.
2. Record a flow file + share
--preview implies --record, captures the event stream, and chains into upload automatically. Prints the /preview/<id> URL when done. Add --preview-open to open it.
3. Upload an existing recording
Attach an existing mp4 or gif recording and a gzipped event stream. Useful when you already have assets from a CI run or scripted harness.
Auth
Uploads require a signed-in desktop session:
Uploads go to https://contrast.dev by default. Override the host with --origin or the PEACH_UPLOAD_ORIGIN environment variable.
What the preview page does
- +Live interactive app: the real bundle boots clientside on the visitor’s GPU via WebAssembly CanvasKit. No server-rendered frames, no streaming latency.
- +Inline video: the recording plays overlaid on the app surface; scrub the timeline to watch the recorded flow, then tap anywhere to take control.
- +Forward scrub: drag the scrubber forward to jump to any point in the recorded session; the live app catches up.
- +Resume live: at any point, tap the app to exit playback and drive it live from the current state.
- +URL params: device, theme, network condition, language, and region all controlled by query string.
Contrast GitHub App
peach record upload is the manual upload path behind sticky PR comments:
- +A CI job runs the flow, captures video + events, and calls
peach record upload --video ... --events ... - +The upload endpoint posts back a sticky comment on the PR with a two-state
<video>(generating → ready) and a/preview/<id>link. - +Reviewers play the video inline in the PR, click through to the live app, and drive it themselves.
This is the integration surface peach maestro test --preview is built for.
For the managed GitHub App, the repo uses the generated Contrast workflow
instead of storing PEACH_API_KEY. That pipeline creates recorded PR previews
and separate branch builds. Preview capture failures do not fail the generated
workflow. Check the sticky comment for the preview result, then open its link to
verify the recording and live app. The separate Contrast Tests check reports
test results. See
GitHub PR Previews.
Flags you’ll want to know
| Command | Flag | Effect |
|---|---|---|
peach record upload | --events <path> | Attach a gzipped .jsonl.gz event stream |
peach record upload | --video <path> | Attach an mp4/gif recording |
peach record upload | --sim <sim> | Target a specific sim |
peach record upload | --open | Open the resulting URL |
peach record upload | --origin <url> | Override upload host |
peach maestro test | --preview | Record + upload in one step |
peach maestro test | --preview-open | Open the resulting URL |
peach record | --mode combined | Capture video + events + auto-upload |
Related
- +
peach record: recording and upload modes - +
peach maestro: Maestro runner +--preview - +GitHub PR Previews: managed PR preview and branch build lane
- +Agents › CLI Use: agent-driven previews