Keep your app's mockups current after every deploy
Save a mockup, then run npx devicemock render to capture your app again and write updated images. Run it manually or in CI after each deploy.
Needs the Individual or Team plan. Both start with a 7-day free trial.
$ npx devicemock render --base-url "$SITE_URL"
public/hero.png
public/og.png
store/app-store/iphone-6.9.png
Rendered 3 mockups.Update mockups in 4 steps
To keep screenshots current, give the agent URLs for your app's pages. It can capture those pages again when you render the mockup.
Make and save a mockup
Ask your agent to make the image from a page of your app, export it, and save the mockup. It saves the mockup in .devicemock/ in your repo.
Commit the mockup
Commit the .devicemock folder and the images. You don't need to edit the files in .devicemock.
Render the mockups
Run
npx devicemock render. It captures the pages again and updates the images for each saved mockup.Run the command after each deploy
In CI, set
DEVICEMOCK_API_KEYand point--base-urlat the deployed site. The workflow below opens a pull request with the new images.
A GitHub Actions workflow for each deploy
The workflow runs after each successful production deploy, renders the mockups from the deployed site, and opens a pull request when an image has changed.
- Add your key as the repository secret
DEVICEMOCK_API_KEY - Let GitHub Actions open pull requests
- Use a host that sends a successful deployment status for an environment named Production, including the site's URL, as Vercel does. If your environment has a different name, update the workflow to match.
name: Update mockups
on:
deployment_status:
permissions:
contents: write
pull-requests: write
jobs:
render:
if: >-
github.event.deployment_status.state == 'success' &&
github.event.deployment_status.environment == 'Production'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
ref: main
- uses: actions/setup-node@v7
with:
node-version: 24
- name: Render the mockups from the deployed site
run: npx --yes devicemock render --base-url "$SITE_URL"
env:
DEVICEMOCK_API_KEY: ${{ secrets.DEVICEMOCK_API_KEY }}
SITE_URL: ${{ github.event.deployment_status.environment_url }}
- name: Open a pull request with the changed images
uses: peter-evans/create-pull-request@v8
with:
base: main
branch: devicemock/update-mockups
commit-message: "chore: update mockups"
title: Update mockupsLive links: one image URL that stays current
A live link is a fixed image address on img.devicemock.app. It shows the newest image from the editor or from devicemock render, so you don't need to commit each new image.
- Save the mockup to a project, then create a link in the editor with Get a link
- Put the link in a README, your docs, or any page that shows images
- To update the link from CI, add its ID as
liveLinkto an output in the saved mockup. The output's format and scale must match the link's. - After the CLI updates a link, editor saves don't change it until you replace the link
- GitHub can show the old image for a while after an update
Questions
Which images get updated?
The ones made from web pages. A screenshot file stays the same until you replace it, so give the agent a page URL for each screen that must stay current.
Can it capture a page that requires sign-in?
No. The pages must load without a sign-in. A page that needs one is captured as its sign-in page.
What happens when a page doesn't load?
The command reports the error with the mockup's name, renders the other mockups, and exits with code 1, so your CI run shows the failure.
Which plan do I need?
The Individual plan at $12.99/month, or the Team plan at $39.99/month for your whole team. Both start with a 7-day free trial, one per team.