Examples
Every example below shows the command you run and the files ShotSweep produces. The examples use real sites from the NFSFU234 open-source ecosystem β TourGuideΒ and FormValidationΒ .
Each example writes to its own output folder. This matters because captures of the same page
and viewport use the same filename (full-<W>x<H>.png), so writing light and dark captures to the
same folder can cause one run to overwrite the other.
Full-page capture
shotsweep capture \
--url https://tour-guide.nforshifu234dev.com \
--mode full \
--out ./public/screenshots/full-pageFull-page mode captures the page from top to bottom instead of limiting the result to the initial viewport.
Sectioned capture
shotsweep capture \
--url https://tour-guide.nforshifu234dev.com \
--mode sections \
--out ./public/screenshots/sections \
--debugSectioned mode divides the page into viewport-sized screenshots based on the pageβs measured scrollable height.
--debug is useful when you want to inspect what ShotSweep measured during capture, especially
when a page contains content that loads or expands after the initial render.
The number of sections depends on the page's measured scroll height and the capture viewport. Use the debug output or manifest.json to inspect the sections produced by a run.
Capturing a whole sitemap
shotsweep capture \
--sitemap https://tour-guide.nforshifu234dev.com/sitemap.xml \
--out ./public/screenshots/sitemapInstead of supplying one URL, you can give ShotSweep a sitemap. It discovers the URLs listed in that sitemap and captures each page into the output directory.
Each URL from the sitemap gets its own capture directory, making large documentation sites practical to capture in one command.
Multiple viewports in one run
shotsweep capture \
--url https://form-validation.nforshifu234dev.com \
--viewport desktop --viewport mobile \
--out ./public/screenshots/viewportsYou can request multiple viewport presets in the same capture. ShotSweep runs the capture for each viewport and keeps the resulting screenshots separate by their dimensions.
The viewport dimensions are part of the output filename, so captures from different viewport sizes can coexist in the same output tree.
Dark mode
shotsweep capture \
--url https://form-validation.nforshifu234dev.com \
--dark \
--out ./public/screenshots/dark--dark captures the page with a dark color-scheme preference, allowing sites that respond to
prefers-color-scheme: dark to render their dark theme during capture.
Visual diff
shotsweep capture \
--url https://form-validation.nforshifu234dev.com \
--out ./public/screenshots/diff/before
shotsweep capture \
--url https://form-validation.nforshifu234dev.com \
--dark \
--out ./public/screenshots/diff/after
shotsweep diff \
./public/screenshots/diff/before/manifest.json \
./public/screenshots/diff/after/manifest.json \
--out ./public/screenshots/diff/resultThe diff command compares two capture manifests and produces visual comparison artifacts for
pages that differ between the two runs.
For this example, the two runs intentionally use different color-scheme preferences, so the result demonstrates what a visual change looks like rather than representing a typical before/after regression test.
The diff output groups comparison artifacts by page. The exact generated folder name depends on the captured URL and viewport; use diff-report.json or inspect the result directory to locate old.png, new.png, and diff.png.
Next steps
- Quick Start β run your first capture
- Diffing Two Runs β understand how two capture runs are compared
- Recipes β more copy-paste commands