Capture
Capture screenshots of any URL or upload your own PNGs — no test framework required.
Prerequisites
Section titled “Prerequisites”npm install -g @pxdiff/cliCapture URLs
Section titled “Capture URLs”Define your targets in a JSON file:
[ { "name": "homepage", "url": "https://your-app.com", "viewport": { "width": 1280, "height": 720 } }, { "name": "homepage-mobile", "url": "https://your-app.com", "viewport": { "width": 375, "height": 812 } }]pxdiff loginpxdiff project set myorg/myproject
pxdiff capture targets.json --localpxdiff diff- run: | pxdiff capture targets.json pxdiff diff env: PXDIFF_API_KEY: ${{ secrets.PXDIFF_API_KEY }}Upload Screenshots
Section titled “Upload Screenshots”If you generate PNGs yourself (e.g. from Puppeteer, Selenium, or any other tool), upload a directory of them:
pxdiff upload ./screenshots --localpxdiff diff- run: | pxdiff upload ./screenshots pxdiff diff env: PXDIFF_API_KEY: ${{ secrets.PXDIFF_API_KEY }}Snapshot names are derived from filenames (minus the .png extension).
See the CLI reference for all options.