Jev directory
CommunityJev Tools & CLIs
Jev Compare
Node.js library and CLI that compares two images through Jev, returning a 1–10 similarity score, located differences with bounding boxes, and per-difference fix suggestions. Handles PNG and JPEG, optional caching, and offline HTML reports.
- Reading time
- 2 min
- Published by
- Community
- Added
- Nov 2026
Highlights
- Returns a 1–10 similarity score plus per-difference probability, type, element, and suggestion.
- Locates differences with bounding boxes in both ratio and pixel coordinates.
- Requires Node.js 22+ and a JEV_KEY or TYPESAFE_API_KEY environment variable.
- Auto-resizes images whose long edge exceeds 1568px before upload; box coordinates stay in original pixels.
- Caches identical inputs in memory or on disk and can save JSON plus offline HTML reports.
Questions about this entry
Short answers drawn from the linked project or page.
Install with npm install jev-compare, or run it directly with npx jev-compare design.png screenshot.png --svg diff.svg. Node.js 22 or later is required. The package exposes both a TypeScript API (compareImages, annotateDifferences) and a command-line interface.
It reads the key from the JEV_KEY or TYPESAFE_API_KEY environment variable, or you can pass it explicitly through the apiKey option. When developing the repository itself, copy .env.example to .env and fill in the key.
Only PNG and JPEG are supported. Images whose long edge exceeds 1568px are automatically compressed before upload, and the returned box coordinates are still expressed in the original image's pixels.
It includes score, scoreConfidence, scoreBreakdown, identicalProbability, a summary, a differences array with type, element, suggestion, probability and boxes, whole-image issues, image metadata, the model name, token usage, and request and cache counts.
maxDifferences defaults to 4 and accepts 0–8, with one extra parallel request per 4 differences. refine defaults to true and adds one parallel request per difference to classify it more precisely and expand the box to the whole affected element.
Caching is optional and can use memoryCache(), fileCache(), a directory string, or a custom CacheStore, so identical inputs skip repeat API calls. Reports are written only when the report option is passed, and disk caches can be pruned by age, entry count, or size.
It targets visual UI review and regression checks on PNG or JPEG pairs, such as design mock versus implementation screenshot. Box localization requires the jev-preview model, and it does not handle other image formats or non-visual comparison tasks.
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.