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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"result": {
"content": [
{
"text": "---\nname: visualci-jenkins\ndescription: \"Sets up VisualCI in a Jenkins pipeline (Jenkinsfile): the token as a credential, installing the CLI, creating the build, uploading snapshots and finalizing, including parallel stages. Use when the user wants visual or snapshot review in Jenkins, or a project has a Jenkinsfile and VisualCI. Not for other CI providers, or for writing the tests themselves.\"\nlicense: Apache-2.0\nmetadata:\n docs: https://visualci.com/docs/ci/jenkins.md\n---\n\n<!-- Generated from server/frontend/content/docs/ci/jenkins.md by server/frontend/scripts/skills.mjs. Edit the page. -->\n\n# Jenkins\n\nStore a project token as a **Secret text** credential, say `visualci-token`. The CLI reads the commit from `GIT_COMMIT`, the branch from `CHANGE_BRANCH`, `BRANCH_NAME` or `GIT_BRANCH`, and the pull request from `CHANGE_ID`.\n\n```groovy\npipeline {\n agent any\n environment {\n VISUALCI_TOKEN = credentials('visualci-token')\n }\n stages {\n stage('Test') {\n steps {\n sh 'curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.12 VISUALCI_INSTALL_DIR=\"$WORKSPACE/bin\" sh'\n sh '''\n export PATH=\"$WORKSPACE/bin:$PATH\"\n export VISUALCI_BUILD_ID=$(visualci build create)\n npm test -- -u # write snapshots instead of failing; see the snapshot guides\n visualci upload --from auto src tests\n visualci build finalize\n '''\n }\n }\n }\n}\n```\n\nEach `sh` step is its own shell, so keep the build's commands in one step, or pass `VISUALCI_BUILD_ID` on with `withEnv`.\n\n## Parallel stages\n\nCreate the build once, then give each parallel stage a shard number:\n\n```groovy\nstage('Start VisualCI') {\n steps {\n script {\n env.VISUALCI_BUILD_ID = sh(script: 'bin/visualci build create --shards 2', returnStdout: true).trim()\n }\n }\n}\nstage('Tests') {\n parallel {\n stage('Unit') { steps { sh 'npm run test:unit -- -u && bin/visualci upload --from auto src && bin/visualci build finalize --shard 0' } }\n stage('Browser') { steps { sh 'npm run test:e2e && bin/visualci upload screenshots && bin/visualci build finalize --shard 1' } }\n }\n}\n```\n\nSee [Other CI providers](https://visualci.com/docs/ci/other.md) for the environment variables and how shards work.\n\nThis skill is the page https://visualci.com/docs/ci/jenkins.md. All of VisualCI's documentation: https://visualci.com/llms.txt\n",
"text": "---\nname: visualci-jenkins\ndescription: \"Sets up VisualCI in a Jenkins pipeline (Jenkinsfile): the token as a credential, installing the CLI, creating the build, uploading snapshots and finalizing, including parallel stages. Use when the user wants visual or snapshot review in Jenkins, or a project has a Jenkinsfile and VisualCI. Not for other CI providers, or for writing the tests themselves.\"\nlicense: Apache-2.0\nmetadata:\n docs: https://visualci.com/docs/ci/jenkins.md\n---\n\n<!-- Generated from server/frontend/content/docs/ci/jenkins.md by server/frontend/scripts/skills.mjs. Edit the page. -->\n\n# Jenkins\n\nStore a project token as a **Secret text** credential, say `visualci-token`. The CLI reads the commit from `GIT_COMMIT`, the branch from `CHANGE_BRANCH`, `BRANCH_NAME` or `GIT_BRANCH`, and the pull request from `CHANGE_ID`.\n\n```groovy\npipeline {\n agent any\n environment {\n VISUALCI_TOKEN = credentials('visualci-token')\n }\n stages {\n stage('Test') {\n steps {\n sh 'curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 VISUALCI_INSTALL_DIR=\"$WORKSPACE/bin\" sh'\n sh '''\n export PATH=\"$WORKSPACE/bin:$PATH\"\n export VISUALCI_BUILD_ID=$(visualci build create)\n npm test -- -u # write snapshots instead of failing; see the snapshot guides\n visualci upload --from auto src tests\n visualci build finalize\n '''\n }\n }\n }\n}\n```\n\nEach `sh` step is its own shell, so keep the build's commands in one step, or pass `VISUALCI_BUILD_ID` on with `withEnv`.\n\n## Parallel stages\n\nCreate the build once, then give each parallel stage a shard number:\n\n```groovy\nstage('Start VisualCI') {\n steps {\n script {\n env.VISUALCI_BUILD_ID = sh(script: 'bin/visualci build create --shards 2', returnStdout: true).trim()\n }\n }\n}\nstage('Tests') {\n parallel {\n stage('Unit') { steps { sh 'npm run test:unit -- -u && bin/visualci upload --from auto src && bin/visualci build finalize --shard 0' } }\n stage('Browser') { steps { sh 'npm run test:e2e && bin/visualci upload screenshots && bin/visualci build finalize --shard 1' } }\n }\n}\n```\n\nSee [Other CI providers](https://visualci.com/docs/ci/other.md) for the environment variables and how shards work.\n\nThis skill is the page https://visualci.com/docs/ci/jenkins.md. All of VisualCI's documentation: https://visualci.com/llms.txt\n",
"type": "text"
}
],
Expand Down

Large diffs are not rendered by default.

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.12 VISUALCI_INSTALL_DIR=/usr/local/bin sh
- curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 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.12 VISUALCI_INSTALL_DIR="$$HOME/bin" sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 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.12 VISUALCI_INSTALL_DIR="$HOME/bin" sh
command: curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 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.12
- uses: DocSpring/visualci/clients/github-action@v0.2.19
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.12
- uses: DocSpring/visualci/clients/github-action@v0.2.19
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.12
- uses: DocSpring/visualci/clients/github-action@v0.2.19
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.12
- uses: DocSpring/visualci/clients/github-action@v0.2.19
with:
token: ${{ secrets.VISUALCI_TOKEN }}
artifact: visualci
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
- 'templates/**'
- name: Install VisualCI
run: |
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.12 VISUALCI_INSTALL_DIR="$RUNNER_TEMP" sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 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 @@ -218,7 +218,7 @@ jobs:
fetch-depth: 0
- name: Install VisualCI
run: |
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.12 VISUALCI_INSTALL_DIR="$RUNNER_TEMP" sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 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.12 VISUALCI_INSTALL_DIR=/usr/local/bin sh
- curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 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.12 VISUALCI_INSTALL_DIR="$WORKSPACE/bin" sh'
sh 'curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 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.12 VISUALCI_INSTALL_DIR="$HOME/bin" sh
- curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 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.12 VISUALCI_INSTALL_DIR="$PWD/bin" sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 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.12 VISUALCI_INSTALL_DIR="$HOME/bin" sh
- curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 VISUALCI_INSTALL_DIR="$HOME/bin" sh
script:
- export PATH="$HOME/bin:$PATH"
- export VISUALCI_BUILD_ID=$(visualci build create)
Expand Down
2 changes: 1 addition & 1 deletion server/frontend/content/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A change doesn't fail the build. The pull request's GitHub check waits while you

## Start here

- [Quick start](/docs/quick-start/): install the CLI, create a project and run your first build.
- [Quick start](/docs/quick-start/): install the GitHub App, which makes your projects, then the CLI, and run your first build.
- [Coding agents](/docs/agents/): connect an agent to the MCP server and let it review builds.
- [CI providers](/docs/ci/github-actions/): GitHub Actions, CircleCI, Buildkite, GitLab and the rest.

Expand Down
16 changes: 8 additions & 8 deletions server/frontend/content/docs/quick-start.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
title: Quick start
description: Install the visualci CLI, create a project and a token, and send your first build from CI.
description: Install the GitHub App, which makes your projects, then the visualci CLI, and send your first build from CI.
skill: visualci
skill_description: Sets up VisualCI, visual regression and snapshot review for PDFs, screenshots, images, JSON, HTML and text: installs the CLI, creates the project and a CI token, sends the first build, and picks the visualci-* skill for the user's CI provider and test tools. Use when the user mentions VisualCI, wants visual regression testing, screenshot or PDF comparison, or snapshot changes that wait for review instead of failing CI. Not for a specific CI provider or test tool once VisualCI is set up: use that skill.
skill_description: Sets up VisualCI, visual regression and snapshot review for PDFs, screenshots, images, JSON, HTML and text: installs the GitHub App (which makes a project per repository) and the CLI, creates a CI token, sends the first build, and picks the visualci-* skill for the user's CI provider and test tools. Use when the user mentions VisualCI, wants visual regression testing, screenshot or PDF comparison, or snapshot changes that wait for review instead of failing CI. Not for a specific CI provider or test tool once VisualCI is set up: use that skill.
---

To see what a review looks like first, open the [demo build](https://app.visualci.com/visualci/demo): no sign-in needed.

## 1. Create a project
## 1. Install the GitHub App

Sign in at [app.visualci.com](https://app.visualci.com) with GitHub, create an organization and a project, and create a project token on the project's **Tokens** tab. Project tokens start with `vci_`.
Sign in at [app.visualci.com](https://app.visualci.com) with GitHub, then choose **Install on GitHub** in the setup steps and pick the repositories to test. VisualCI makes a project for each repository you can maintain (an admin or maintainer on GitHub), linked to it, so its pull requests get a VisualCI check. Installed on your own account, the projects go into your personal organization; installed on a GitHub organization, into a VisualCI organization named after it, which your teammates join from their permission on the repositories when they sign in. See [Members and access](/docs/reference/access/).

A coding agent can do this step for you over MCP, with `create_organization`, `create_project` and `create_project_token`. See [Coding agents](/docs/agents/).
Repositories you can't maintain are listed with the reason: ask an admin of the repository to set it up. Already installed the App? The setup steps offer that installation: choose **Set it up**.

A new account already has its own organization and a project called `default`, with no builds. Use it for the first suite: rename it to the repository's name with `update_project` (`slug` and `name`) rather than creating a second project beside it.
Then create a project token on the project's **Tokens** tab (the **Add VisualCI to CI** step does it for you). Project tokens start with `vci_`.

To get a GitHub check on pull requests, install the VisualCI GitHub App on the repository, then link the project to it on the project's **Settings** tab. Your teammates then get access from their permission on the repository when they sign in with GitHub. See [Members and access](/docs/reference/access/).
Not on GitHub? Create a project by hand from the organization's page, or let a coding agent do it over MCP with `create_project` and `create_project_token`. See [Coding agents](/docs/agents/).

## 2. Install the CLI

Expand All @@ -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.12`, 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.19`, 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
2 changes: 1 addition & 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.12` 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.19` 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. `--verbose` prints how long each step takes: hashing the files, each call to the server, and the uploads.

Expand Down
4 changes: 2 additions & 2 deletions server/frontend/content/docs/snapshots/laravel-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ For snapshots without a browser, `default-features = false` leaves the browser o
Then the CLI, and a project token (see [Quick start](/docs/quick-start/)):

```sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.12 sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 sh
export VISUALCI_TOKEN=vci_...
```

Expand All @@ -76,7 +76,7 @@ On GitHub Actions:
node-version: 22
- run: npx -y playwright@1.65.2 install --with-deps --only-shell chromium
- run: |
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.12 VISUALCI_INSTALL_DIR="$HOME/bin" sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 VISUALCI_INSTALL_DIR="$HOME/bin" sh
echo "$HOME/bin" >> "$GITHUB_PATH"
- run: visualci test -- cargo test --locked
env:
Expand Down
2 changes: 1 addition & 1 deletion server/frontend/public/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ https://visualci.com/install.md for the whole setup). The token is the CI secret
Every provider runs the same three steps around the tests:

```sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.12 VISUALCI_INSTALL_DIR="$HOME/bin" sh
curl -fsSL https://visualci.com/install.sh | VISUALCI_VERSION=0.2.19 VISUALCI_INSTALL_DIR="$HOME/bin" sh
export VISUALCI_BUILD_ID=$(visualci build create)
# run the tests (writing snapshots instead of failing), then:
visualci upload # sends visualci.yml's uploads
Expand Down
Loading
Loading