Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/content/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ cli/
│ │ ├── release/ # archive, create, delete, deploy, deploys, finalize, list, propose-version, restore, set-commits, view
│ │ ├── replay/ # list, view
│ │ ├── repo/ # list
│ │ ├── snapshots/ # download
│ │ ├── snapshots/ # diff, download
│ │ ├── sourcemap/ # inject, resolve, upload
│ │ ├── span/ # list, view
│ │ ├── team/ # list
Expand Down
11 changes: 11 additions & 0 deletions docs/src/fragments/commands/snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
## Examples

```bash
# Compare two directories of snapshot images locally
sentry snapshots diff ./baseline ./head

# Fail (non-zero exit) if any images changed, with a custom threshold
sentry snapshots diff ./baseline ./head --fail-on-diff --threshold 0.02

# Download a specific baseline snapshot by ID
sentry snapshots download --snapshot-id 1234567890

Expand All @@ -15,6 +21,11 @@ sentry snapshots download --app-id my-app --output ./baseline/

## Important Notes

- `snapshots diff` compares two local image directories (PNG/JPEG) perceptually
— anti-aliasing aware, with a per-pixel `--threshold` (0.0–1.0) — and writes a
PNG diff mask per changed image. It makes **no network requests**. Use
`--fail-on-diff` to exit non-zero when any images changed/added/removed, and
`--selective` to treat images missing from head as skipped rather than removed.
- `snapshots download` fetches baseline snapshot images from Sentry's preprod
system and extracts them to a local directory. **Sentry SaaS only.**
- Provide exactly one of `--snapshot-id` (a direct artifact ID) or `--app-id`
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@types/http-cache-semantics": "^4.2.0",
"@types/node": "^22.20.0",
"@types/picomatch": "^4.0.3",
"@types/pngjs": "^6.0.5",
"@types/qrcode-terminal": "^0.12.2",
"@types/react": "^19.2.17",
"@types/semver": "^7.7.1",
Expand All @@ -39,10 +40,13 @@
"ignore": "^7.0.5",
"ink": "^7.1.0",
"ink-spinner": "^5.0.0",
"jpeg-js": "^0.4.4",
"marked": "^15.0.12",
"p-limit": "^7.3.0",
"peggy": "^5.1.0",
"picomatch": "^4.0.4",
"pixelmatch": "^7.2.0",
"pngjs": "^7.0.0",
"pretty-ms": "^9.3.0",
"qrcode-terminal": "^0.12.0",
"react": "^19.2.7",
Expand Down
1 change: 1 addition & 0 deletions plugins/sentry-cli/skills/sentry-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ Work with Sentry cron monitors

Manage and compare snapshots

- `sentry snapshots diff <base-dir> <head-dir>` — Compare two directories of snapshot images
- `sentry snapshots download` — Download baseline snapshot images

→ Full flags and examples: `references/snapshots.md`
Expand Down
17 changes: 17 additions & 0 deletions plugins/sentry-cli/skills/sentry-cli/references/snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ requires:

Manage and compare snapshots

### `sentry snapshots diff <base-dir> <head-dir>`

Compare two directories of snapshot images

**Flags:**
- `-o, --output <value> - Directory for diff mask images (default: ./diff-output/)`
- `--threshold <value> - Pixel color difference threshold (0.0-1.0) - (default: "0.01")`
- `--no-antialiasing - Disable antialiasing detection`
- `--fail-on-diff - Exit non-zero if any diffs (changed/added/removed/errored) are found`
- `--selective - Treat images missing from head as skipped instead of removed`

### `sentry snapshots download`

Download baseline snapshot images
Expand All @@ -24,6 +35,12 @@ Download baseline snapshot images
**Examples:**

```bash
# Compare two directories of snapshot images locally
sentry snapshots diff ./baseline ./head

# Fail (non-zero exit) if any images changed, with a custom threshold
sentry snapshots diff ./baseline ./head --fail-on-diff --threshold 0.02

# Download a specific baseline snapshot by ID
sentry snapshots download --snapshot-id 1234567890

Expand Down
33 changes: 33 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading