
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@corralimited/snapdiff
Advanced tools
Typed TypeScript client for the SnapDiff REST API. Visual diffs, screenshots, project baselines. Generated from the official OpenAPI spec — every method is fully typed end-to-end.
Typed TypeScript client for the SnapDiff REST API. Visual diffs, screenshots, project baselines.
npm install @corralimited/snapdiff
import { Snapdiff } from '@corralimited/snapdiff';
const sd = new Snapdiff({ apiKey: process.env.SNAPDIFF_API_KEY! });
// Ad-hoc visual diff between two URLs
const result = await sd.diff({
before: 'https://example.com',
after: 'https://staging.example.com',
});
console.log(`${result.diff_percentage}% changed`);
console.log(result.diff_image_url);
// Compare against a stored project baseline
const baseline = await sd.diffBaseline({
project: 'acme-marketing',
page_name: 'pricing',
after: 'https://staging.acme.com/pricing',
});
// Single screenshot
const shot = await sd.screenshot({ url: 'https://example.com', full_page: true });
// Project management
const projects = await sd.projects.list();
const project = await sd.projects.get('prj_xxx');
Non-2xx responses throw SnapdiffError:
import { Snapdiff, SnapdiffError } from '@corralimited/snapdiff';
try {
await sd.diffBaseline({ project: 'unknown', page_name: 'home', after: '...' });
} catch (err) {
if (err instanceof SnapdiffError) {
console.error(err.status, err.message); // 404 'Project "unknown" not found'
}
}
For operations without an ergonomic helper, every endpoint is reachable through the typed
openapi-fetch client:
const { data, error } = await sd.client.POST(
'/projects/{projectId}/builds/{buildId}/approve',
{ params: { path: { projectId: 'prj_xxx', buildId: 'bld_xxx' } } },
);
Path, query, body, and response types are all inferred from the OpenAPI spec.
| Option | Default | Notes |
|---|---|---|
apiKey | — | Required. Get one at https://snapdiff.ai/dashboard |
baseUrl | https://api.snapdiff.ai/v1 | Override for self-hosted or testing. |
fetch | globalThis.fetch | Inject a custom fetch (Node 18+, undici, polyfill). |
MIT — see LICENSE.
FAQs
Typed TypeScript client for the SnapDiff REST API. Visual diffs, screenshots, project baselines. Generated from the official OpenAPI spec — every method is fully typed end-to-end.
The npm package @corralimited/snapdiff receives a total of 5 weekly downloads. As such, @corralimited/snapdiff popularity was classified as not popular.
We found that @corralimited/snapdiff demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.