SDKs
Official Snapvisor JavaScript packages under the @snapvisor namespace, plus a Python SDK and CLI for uploading builds from any pipeline.
Snapvisor ships open-source SDKs for JavaScript and Python. The JavaScript packages are drop-in forks of the official @argos-ci SDKs and deliberately keep the ARGOS_* environment variable names, so they work unchanged in pipelines already wired for Argos.
JavaScript packages
Pick the high-level SDK for your test framework:
@snapvisor/playwright— capture screenshots from your Playwright tests@snapvisor/storybook— capture screenshots of your Storybook stories@snapvisor/vitest— capture screenshots from your Vitest browser tests@snapvisor/cli— interact with and upload screenshots from the command line@snapvisor/core— Node.js SDK, the base for building other integrations@snapvisor/api-client— typed client for the Snapvisor API@snapvisor/browser— browser utilities to stabilize visual testing@snapvisor/util— shared utilities used across the SDKs
Playwright example
npm install --save-dev @snapvisor/playwrightSet up the reporter in your Playwright config:
// playwright.config.ts
import { defineConfig } from "@playwright/test";
import { createArgosReporterOptions } from "@snapvisor/playwright/reporter";
export default defineConfig({
reporter: [
process.env.CI ? ["dot"] : ["list"],
[
"@snapvisor/playwright/reporter",
createArgosReporterOptions({ uploadToArgos: !!process.env.CI }),
],
],
});Then capture stable screenshots in your tests:
// tests/example.spec.ts
import { test } from "@playwright/test";
import { argosScreenshot } from "@snapvisor/playwright";
test("screenshot homepage", async ({ page }) => {
await page.goto("http://localhost:3000");
await argosScreenshot(page, "homepage");
});CLI example
npm install --save-dev @snapvisor/cli
ARGOS_TOKEN="<your-project-token>" npx @snapvisor/cli upload ./screenshotsThe CLI also exposes commands to deploy a static build, inspect and review builds, post a comment, and more — list them with npx @snapvisor/cli --help.
Python SDK and CLI
The Python SDK uploads a directory of screenshots as a build from any Python test suite or CI pipeline — no Node.js required. It speaks the same upload protocol as @snapvisor/core and reads the same ARGOS_* environment variables. Requires Python 3.10+.
pip install git+https://github.com/DevinoSolutions/snapvisor-pythonThe package is coming to PyPI as snapvisor; until then, install straight from GitHub as shown above.
CLI usage:
export ARGOS_TOKEN="<your-project-token>"
snapvisor upload ./screenshotsPython API:
from snapvisor import upload
result = upload(
"screenshots",
token="...", # or set ARGOS_TOKEN
build_name="my-suite", # optional
branch="main", # optional; resolved from env/git otherwise
commit="abc...def", # optional; resolved from env/git otherwise
reference_branch="main" # optional baseline
)The Python CLI also supports parallel shards (--parallel-nonce, --parallel-total, --parallel-index) and a custom --api-base-url.
MCP server
Connect Claude Code, Cursor, or any MCP client to Snapvisor's remote MCP server at mcp.snapvisor.io to list builds, read screenshot diffs, and approve visual changes.
Access tokens
Snapvisor has two kinds of credentials - project tokens for uploading screenshots from CI, and personal access tokens for the API and MCP server.