Skip to content
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 .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"plugins": [
{
"name": "visualci",
"version": "0.1.33",
"version": "0.1.34",
"description": "Visual regression and snapshot review for PDFs, screenshots, JSON, HTML and text: VisualCI's MCP server and its skills for each CI provider and test tool.",
"author": { "name": "DocSpring", "url": "https://visualci.com" },
"homepage": "https://visualci.com/docs/skills/",
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "visualci",
"version": "0.1.33",
"version": "0.1.34",
"description": "Visual regression and snapshot review for PDFs, screenshots, JSON, HTML and text: VisualCI's MCP server and its skills for each CI provider and test tool.",
"author": { "name": "DocSpring", "url": "https://visualci.com" },
"homepage": "https://visualci.com/docs/skills/",
Expand Down
2 changes: 1 addition & 1 deletion .cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "visualci",
"displayName": "VisualCI",
"version": "0.1.33",
"version": "0.1.34",
"description": "Visual regression and snapshot review for PDFs, screenshots, JSON, HTML and text: VisualCI's MCP server and its skills for each CI provider and test tool.",
"author": {
"name": "DocSpring"
Expand Down
2 changes: 1 addition & 1 deletion gemini-extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "visualci",
"version": "0.1.33",
"version": "0.1.34",
"description": "Visual regression and snapshot review for PDFs, screenshots, JSON, HTML and text: VisualCI's MCP server and its skills for each CI provider and test tool.",
"mcpServers": {
"visualci": {
Expand Down
8 changes: 7 additions & 1 deletion server/frontend/content/docs/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ After CI finishes on your push:
pending or expected, the build is waiting for review: review it. Never bypass the check.

If you don't have VisualCI's tools, ask the person to connect the MCP server (https://visualci.com/docs/agents/)
and to start a new session: MCP servers load when a session starts.
and to start a new session: MCP servers load when a session starts. Until then, the CLI does the same review:
`visualci build list --waiting`, `visualci build show <n>`, `visualci build snapshot <n> <name> --crop changed
--save-images <dir>` and `visualci build review <n> approve`.
```

Where agents push straight to the default branch, replace step 4 with "Review the build of every push to the default
Expand Down Expand Up @@ -209,6 +211,10 @@ failing in the repository instead of sending them.
- Out of credits: `whoami` (for each organization) and `get_build` return `blocked`, with what fixes it and a `message` to pass on to your person as it is. Buying credits stays with them.
- `create_organization`, `create_project`, `get_project`, `update_project` (settings and [ignore rules](/docs/reference/api/#project-settings)), `create_project_token`, `delete_project_token`.

**Without the MCP server**

- The CLI has the review tools as commands, for CI jobs and agents without MCP: `visualci build list`, `build show`, `build snapshot` (with `--save-images`) and `build review`. See [Reviewing builds](/docs/reference/cli/#reviewing-builds).

**Support**

- `support_send`: send feedback about VisualCI itself. See [Support](/docs/support/).
Expand Down
2 changes: 1 addition & 1 deletion server/frontend/content/docs/ci/bitbucket.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pipelines:
name: Test
image: node:24
script:
- curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.8 VISUALCI_INSTALL_DIR=/usr/local/bin sh
- curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.10 VISUALCI_INSTALL_DIR=/usr/local/bin sh
- export VISUALCI_BUILD_ID=$(visualci build create)
- npm test -- -u # write snapshots instead of failing; see the snapshot guides
- visualci upload --from auto src tests
Expand Down
2 changes: 1 addition & 1 deletion server/frontend/content/docs/ci/buildkite.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The CLI reads the commit from `BUILDKITE_COMMIT`, the branch from `BUILDKITE_BRA
steps:
- label: ":test_tube: Tests"
command: |
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.8 VISUALCI_INSTALL_DIR="$$HOME/bin" sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.10 VISUALCI_INSTALL_DIR="$$HOME/bin" sh
export PATH="$$HOME/bin:$$PATH"
export VISUALCI_BUILD_ID=$$(visualci build create)
npm test -- -u
Expand Down
2 changes: 1 addition & 1 deletion server/frontend/content/docs/ci/circleci.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- checkout
- run:
name: Install VisualCI
command: curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.8 VISUALCI_INSTALL_DIR="$HOME/bin" sh
command: curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.10 VISUALCI_INSTALL_DIR="$HOME/bin" sh
- run:
name: Start a VisualCI build
command: echo "export VISUALCI_BUILD_ID=$($HOME/bin/visualci build create)" >> "$BASH_ENV"
Expand Down
12 changes: 6 additions & 6 deletions server/frontend/content/docs/ci/github-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0 # VisualCI finds the baseline through the commit's ancestors
- run: npm test -- -u # write snapshots instead of failing; see the snapshot guides
- uses: DocSpring/visualci/clients/github-action@v0.2.8
- uses: DocSpring/visualci/clients/github-action@v0.2.10
if: always()
with:
token: ${{ secrets.VISUALCI_TOKEN }}
Expand Down Expand Up @@ -50,7 +50,7 @@ Every job of a workflow run that uses the same `name` joins one build. Send from
browser: [chromium, webkit]
steps:
# ... checkout and tests ...
- uses: DocSpring/visualci/clients/github-action@v0.2.8
- uses: DocSpring/visualci/clients/github-action@v0.2.10
with:
token: ${{ secrets.VISUALCI_TOKEN }}
finalize: false
Expand All @@ -62,7 +62,7 @@ Every job of a workflow run that uses the same `name` joins one build. Send from
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DocSpring/visualci/clients/github-action@v0.2.8
- uses: DocSpring/visualci/clients/github-action@v0.2.10
with:
token: ${{ secrets.VISUALCI_TOKEN }}
finalize-only: true
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
- uses: actions/checkout@v4 # your default branch: the fork's commits are only fetched
with:
fetch-depth: 0
- uses: DocSpring/visualci/clients/github-action@v0.2.8
- uses: DocSpring/visualci/clients/github-action@v0.2.10
with:
token: ${{ secrets.VISUALCI_TOKEN }}
artifact: visualci
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
- 'templates/**'
- name: Install VisualCI
run: |
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.8 VISUALCI_INSTALL_DIR="$RUNNER_TEMP" sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.10 VISUALCI_INSTALL_DIR="$RUNNER_TEMP" sh
echo "$RUNNER_TEMP" >> "$GITHUB_PATH"
- name: Start a VisualCI build
# A skipped run sends nothing: --subset carries every snapshot forward.
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
fetch-depth: 0
- name: Install VisualCI
run: |
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.8 VISUALCI_INSTALL_DIR="$RUNNER_TEMP" sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.10 VISUALCI_INSTALL_DIR="$RUNNER_TEMP" sh
echo "$RUNNER_TEMP" >> "$GITHUB_PATH"
- name: Start a VisualCI build
run: echo "VISUALCI_BUILD_ID=$(visualci build create)" >> "$GITHUB_ENV"
Expand Down
2 changes: 1 addition & 1 deletion server/frontend/content/docs/ci/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ visual:
variables:
GIT_DEPTH: 0 # VisualCI finds the baseline through the commit's ancestors
script:
- curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.8 VISUALCI_INSTALL_DIR=/usr/local/bin sh
- curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.10 VISUALCI_INSTALL_DIR=/usr/local/bin sh
- export VISUALCI_BUILD_ID=$(visualci build create)
- npm test -- -u
- visualci upload --from auto src tests
Expand Down
2 changes: 1 addition & 1 deletion server/frontend/content/docs/ci/jenkins.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pipeline {
stages {
stage('Test') {
steps {
sh 'curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.8 VISUALCI_INSTALL_DIR="$WORKSPACE/bin" sh'
sh 'curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.10 VISUALCI_INSTALL_DIR="$WORKSPACE/bin" sh'
sh '''
export PATH="$WORKSPACE/bin:$PATH"
export VISUALCI_BUILD_ID=$(visualci build create)
Expand Down
2 changes: 1 addition & 1 deletion server/frontend/content/docs/ci/semaphore.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ blocks:
- name: Test
commands:
- checkout
- curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.8 VISUALCI_INSTALL_DIR="$HOME/bin" sh
- curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.10 VISUALCI_INSTALL_DIR="$HOME/bin" sh
- export PATH="$HOME/bin:$PATH"
- export VISUALCI_BUILD_ID=$(visualci build create)
- npm test -- -u # write snapshots instead of failing; see the snapshot guides
Expand Down
2 changes: 1 addition & 1 deletion server/frontend/content/docs/ci/teamcity.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The CLI doesn't read TeamCity's parameters by itself: pass them as environment v
Then a command-line step:

```sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.8 VISUALCI_INSTALL_DIR="$PWD/bin" sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.10 VISUALCI_INSTALL_DIR="$PWD/bin" sh
export PATH="$PWD/bin:$PATH"
export VISUALCI_BUILD_ID=$(visualci build create)
npm test -- -u # write snapshots instead of failing; see the snapshot guides
Expand Down
2 changes: 1 addition & 1 deletion server/frontend/content/docs/ci/travis.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ git:
depth: false
install:
- npm ci
- curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.8 VISUALCI_INSTALL_DIR="$HOME/bin" sh
- curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.10 VISUALCI_INSTALL_DIR="$HOME/bin" sh
script:
- export PATH="$HOME/bin:$PATH"
- export VISUALCI_BUILD_ID=$(visualci build create)
Expand Down
18 changes: 16 additions & 2 deletions server/frontend/content/docs/local-runs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ Outside CI, `visualci build create` makes a local build. It records the branch,

Each snapshot is compared with its own baseline: the one approved at the nearest ancestor commit, else your branch's latest, else the default branch's. So a rebased or force-pushed branch still finds the baselines approved on it.

## One build per run: visualci test

`visualci test -- <command>` runs your tests inside one local build:

```sh
visualci test -- cargo test
visualci test -- npx jest
visualci test -- pytest -n auto
```

It creates the build, runs the command with `VISUALCI_BUILD_ID` set, and finalizes the build when the command ends, even when tests fail or you press Ctrl-C. Then it prints what changed, with links. Every process the command starts adds to that build: each `tests/*.rs` binary of `cargo test`, nextest's processes, pytest-xdist and Jest workers. Without it, each process would make a build of its own. A local run is a subset, so a filtered run (`cargo test signup`) doesn't count the snapshots it skipped as removed. It exits with the tests' status when they failed, otherwise as `visualci build finalize --wait` does: in the default `review` mode, changes don't fail the run; they wait for review, and the helpers below fail the tests that made them. `--upload` also sends visualci.yml's `uploads` after the command, for test runners that write snapshot files.

The helpers below then only send and compare: `visualci test` creates and finalizes the build around them.

## Environments

Browsers and simulators draw a little differently on a Mac, on Linux and in your CI image, so screenshots keep a baseline set per environment: `ci`, `local-mac` and `local-linux`. The CLI picks the environment itself (`ci` when it finds a CI provider or `CI=true`, otherwise your operating system). `VISUALCI_ENVIRONMENT` sets another.
Expand Down Expand Up @@ -68,7 +82,7 @@ afterEach(() => {
})
```

Load it with `setupFiles` (Jest) or `setupFiles` in `vitest.config` (Vitest), and finalize the build after the run with `visualci build finalize`.
Load it with `setupFiles` (Jest) or `setupFiles` in `vitest.config` (Vitest), and run the tests with `visualci test -- npx jest` (or `npx vitest run`).

### pytest

Expand Down Expand Up @@ -125,4 +139,4 @@ impl Drop for Visual {
}
```

Create the build before `cargo test` (`export VISUALCI_BUILD_ID=$(visualci build create --subset)`) and finalize it afterwards.
Run the tests with `visualci test -- cargo test`: every test binary sends to the same build, which is finalized when `cargo test` ends.
2 changes: 1 addition & 1 deletion server/frontend/content/docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ On Linux (x86_64 or arm64) or macOS:
curl -fsSL https://visualci.com/install.sh | sh
```

It installs to `/usr/local/bin`, or to `$VISUALCI_INSTALL_DIR`, and checks the download's SHA-256. In CI, pin the version with `VISUALCI_VERSION=0.2.8`, so a new release never changes a build by surprise. It downloads the latest [GitHub release](https://github.com/DocSpring/visualci/releases) for Linux (x86_64 and arm64) or macOS. Anywhere else with Rust, build it from source:
It installs to `/usr/local/bin`, or to `$VISUALCI_INSTALL_DIR`, and checks the download's SHA-256. In CI, pin the version with `VISUALCI_VERSION=0.2.10`, so a new release never changes a build by surprise. It downloads the latest [GitHub release](https://github.com/DocSpring/visualci/releases) for Linux (x86_64 and arm64) or macOS. Anywhere else with Rust, build it from source:

```sh
cargo install --git https://github.com/DocSpring/visualci visualci-cli
Expand Down
26 changes: 25 additions & 1 deletion server/frontend/content/docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: CLI reference
description: Every visualci command and option, and the environment variables the CLI reads.
---

Install it on Linux or macOS with `curl -fsSL https://visualci.com/install.sh | sh` (set `VISUALCI_VERSION=0.2.8` to pin a release, and `VISUALCI_INSTALL_DIR` for somewhere other than `/usr/local/bin`), or anywhere with Rust with `cargo install --git https://github.com/DocSpring/visualci visualci-cli`. `visualci --help` and `visualci <command> --help` print the same options.
Install it on Linux or macOS with `curl -fsSL https://visualci.com/install.sh | sh` (set `VISUALCI_VERSION=0.2.10` to pin a release, and `VISUALCI_INSTALL_DIR` for somewhere other than `/usr/local/bin`), or anywhere with Rust with `cargo install --git https://github.com/DocSpring/visualci visualci-cli`. `visualci --help` and `visualci <command> --help` print the same options.

Every command that talks to the server takes `--token` (default `$VISUALCI_TOKEN`, a project token, else the token `visualci login` kept) and `--api-url` (default `$VISUALCI_API_URL`, else `https://api.visualci.com`). With a personal token, it also needs the project: `--project org/project`, `$VISUALCI_PROJECT`, or `project:` in visualci.yml. Errors exit with status 2.

Expand Down Expand Up @@ -78,6 +78,30 @@ Prints a build's status as JSON. `--build <id>`, default `$VISUALCI_BUILD_ID`.

`visualci check <paths>` is a one-shot local check: it creates a local build, uploads, waits and prints what changed, with a link. The server renders the PDFs, so a laptop gets the same pixels as CI. It takes `upload`'s options, plus `--name` and `--timeout` (default 600). It exits 0 when nothing changed and 1 when something did, or when the paths hold nothing to check.

## visualci test

`visualci test -- <command>` runs a test command inside one build. It creates the build, runs the command with `VISUALCI_BUILD_ID` set, so every test, process and worker adds to it, and finalizes it when the command ends, even when the tests fail or are interrupted. Then it waits for the result and prints what changed. It takes `build create`'s options. A local run is always a subset. Options:

- `--upload` also sends visualci.yml's `uploads` after the command.
- `--no-wait` finalizes without waiting for the result.
- `--timeout` sets how long to wait, in seconds (default 900).

It exits with the command's status when that failed. Otherwise, like `build finalize --wait`, it exits 0 when CI should pass, 1 when it shouldn't, 3 when the result didn't come in time, and 4 when the organization is out of credits.

## Reviewing builds

The MCP server's review tools, for agents and scripts without it. They use the token `visualci login` stored (or `$VISUALCI_TOKEN`) and print the same answer the tool gives, as text, or the whole result with `--json`.

- `visualci build list [--waiting] [--branch <b>] [--limit <n>]` lists the project's newest builds, or with `--waiting` those waiting for a review (`list_builds`).
- `visualci build show <build> [--all] [--offset <n>] [--limit <n>]` shows what a build changed, the largest change first (`get_build`).
- `visualci build snapshot <build> <name>` shows one snapshot's comparison (`get_snapshot`). Options:
- `--crop changed` crops the images to what changed, and `--images all|diff|head|base|none` chooses which images;
- `--pages 1,2` picks pages, and `--against previous` compares with the branch's previous build;
- `--save-images <dir>` writes the images as files (`02-page-2-changed-diff.png`).
- `visualci build review <build> approve|reject [--only added|changed] [--snapshot <name>]... [--comment <text>]` approves or rejects a build's changes (`review`).

A refused call (an unknown build, an open comment thread) prints why and exits 1.

## Local tools

These don't need a token.
Expand Down
6 changes: 6 additions & 0 deletions server/frontend/content/docs/snapshots/insta.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,10 @@ INSTA_UPDATE=always INSTA_FORCE_PASS=1 cargo test && visualci check --from insta

It creates a local build, waits for the result and prints what changed, with a link to the diff. Approving a local change makes it the baseline for your branch, so CI matches it when you push. Screenshots keep a separate set per environment (`ci`, `local-mac`, `local-linux`); text and PDFs share one.

With the snapshot folder listed in visualci.yml's `uploads` (step 3), one command runs the tests inside a build and sends the files when they end, a failing run too:

```sh
INSTA_UPDATE=always INSTA_FORCE_PASS=1 visualci test --upload -- cargo test
```

Pushing straight to main, without pull requests? See [Repositories without pull requests](/docs/agents/#repositories-without-pull-requests).
6 changes: 6 additions & 0 deletions server/frontend/content/docs/snapshots/jest.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,10 @@ npx jest -u && visualci check --from jest src

It creates a local build, waits for the result and prints what changed, with a link to the diff. Approving a local change makes it the baseline for your branch, so CI matches it when you push. Screenshots keep a separate set per environment (`ci`, `local-mac`, `local-linux`); text and PDFs share one.

With the snapshot folder listed in visualci.yml's `uploads` (step 3), one command runs the tests inside a build and sends the files when they end, a failing run too:

```sh
visualci test --upload -- npx jest -u
```

Pushing straight to main, without pull requests? See [Repositories without pull requests](/docs/agents/#repositories-without-pull-requests).
6 changes: 6 additions & 0 deletions server/frontend/content/docs/snapshots/rspec-snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ UPDATE_SNAPSHOTS=true bundle exec rspec && visualci check --from rspec spec

It creates a local build, waits for the result and prints what changed, with a link to the diff. Approving a local change makes it the baseline for your branch, so CI matches it when you push. Screenshots keep a separate set per environment (`ci`, `local-mac`, `local-linux`); text and PDFs share one.

With the snapshot folder listed in visualci.yml's `uploads` (step 3), one command runs the tests inside a build and sends the files when they end, a failing run too:

```sh
UPDATE_SNAPSHOTS=true visualci test --upload -- bundle exec rspec
```

Pushing straight to main, without pull requests? See [Repositories without pull requests](/docs/agents/#repositories-without-pull-requests).
6 changes: 6 additions & 0 deletions server/frontend/content/docs/snapshots/syrupy.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,10 @@ pytest --snapshot-update && visualci check --from syrupy tests

It creates a local build, waits for the result and prints what changed, with a link to the diff. Approving a local change makes it the baseline for your branch, so CI matches it when you push. Screenshots keep a separate set per environment (`ci`, `local-mac`, `local-linux`); text and PDFs share one.

With the snapshot folder listed in visualci.yml's `uploads` (step 3), one command runs the tests inside a build and sends the files when they end, a failing run too:

```sh
visualci test --upload -- pytest --snapshot-update
```

Pushing straight to main, without pull requests? See [Repositories without pull requests](/docs/agents/#repositories-without-pull-requests).
Loading
Loading