CLI

Run Snapshot Site from your terminal, scripts, and CI jobs

Use the Snapshot Site CLI when you want reproducible screenshot, analyze, and compare jobs from the shell without wiring a full SDK first.

@snapshot-site/cli
Official CLI
Shell first
CI, scripts, local ops
Save assets
Images and JSON to disk
Install:pnpm add -g @snapshot-site/cli
Auth:SNAPSHOT_SITE_API_KEY=ss_live_xxx
CLI workflow
Good fits
CI screenshot checks before deployment
Local compare jobs against staging and production
Quick QA capture tasks without app code
Saving returned assets directly to disk for review

CLI overview

The CLI gives teams a direct operational interface to Snapshot Site. It is useful when the workflow starts in the shell, in CI, or in a small automation script.

1

No wrapper app required

You can run screenshot, analyze, and compare directly from the terminal.

2

Works well in CI and ops workflows

The CLI is a good fit for scripted checks before deployment or for recurring operational reviews.

3

Supports saved local config

You can log in once locally instead of exporting an API key in every shell session.

4

Easy asset export

Returned screenshots and JSON payloads can be written straight to disk for review.

Quick start

Install, authenticate, run commands

1

Install `@snapshot-site/cli` globally

2

Export `SNAPSHOT_SITE_API_KEY` or run `snapshot-site login`

3

Call `snapshot-site screenshot`, `analyze`, or `compare`

4

Save JSON or image outputs locally for review

Command examples

Screenshot

Take a screenshot

Capture a page and save both JSON output and an image locally.

snapshot-site screenshot \
  --url https://snapshot-site.com/pricing \
  --width 1440 \
  --full-size \
  --hide-cookie \
  --output ./pricing.json \
  --save-image ./pricing.png
Analyze

Analyze a page

Run page analysis and persist both the JSON payload and image.

snapshot-site analyze \
  --url https://snapshot-site.com \
  --width 1440 \
  --full-size \
  --enable-summary \
  --enable-quality \
  --output ./analysis.json \
  --save-image ./analysis.png
Compare

Compare staging and production

Compare two URLs and save the result set locally.

snapshot-site compare \
  --before-url https://snapshot-site.com/pricing \
  --after-url https://staging.snapshot-site.com/pricing \
  --width 1440 \
  --full-size \
  --hide-cookie \
  --threshold 0.1 \
  --output ./compare.json \
  --save-image ./compare-assets
Auth

Persist local credentials

Store credentials locally when you do not want to export the API key every time.

snapshot-site login --api-key ss_live_xxx
snapshot-site whoami-config
snapshot-site logout

# saved config path
~/.config/snapshot-site/config.json