diff --git a/app/tests/golden/mcp/get_skill_lists_the_skills_and_returns_one/get_skill-2.json b/app/tests/golden/mcp/get_skill_lists_the_skills_and_returns_one/get_skill-2.json index af752304..0acb526f 100644 --- a/app/tests/golden/mcp/get_skill_lists_the_skills_and_returns_one/get_skill-2.json +++ b/app/tests/golden/mcp/get_skill_lists_the_skills_and_returns_one/get_skill-2.json @@ -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\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\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" } ], diff --git a/app/tests/golden/mcp/get_skill_lists_the_skills_and_returns_one/get_skill.json b/app/tests/golden/mcp/get_skill_lists_the_skills_and_returns_one/get_skill.json index 7a06804e..d7848664 100644 --- a/app/tests/golden/mcp/get_skill_lists_the_skills_and_returns_one/get_skill.json +++ b/app/tests/golden/mcp/get_skill_lists_the_skills_and_returns_one/get_skill.json @@ -3,7 +3,7 @@ "result": { "content": [ { - "text": "{\"skills\":[{\"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.\",\"name\":\"visualci\"},{\"description\":\"Sets up VisualCI in Bitbucket Pipelines (bitbucket-pipelines.yml): the token as a secured variable, installing the CLI, creating the build, uploading snapshots and finalizing, including parallel steps. Use when the user wants visual or snapshot review in Bitbucket Pipelines, or a project has bitbucket-pipelines.yml and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-bitbucket\"},{\"description\":\"Sets up VisualCI in Buildkite pipelines: the token as a secret, installing the CLI, creating the build, uploading snapshots and finalizing, including parallel jobs. Use when the user wants visual or snapshot review in Buildkite, or a project has .buildkite/ and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-buildkite\"},{\"description\":\"Sets up VisualCI in CircleCI (.circleci/config.yml): the token in a context or project variable, installing the CLI, creating the build, uploading snapshots and finalizing, including parallelism. Use when the user wants visual or snapshot review in CircleCI, or a project has .circleci/config.yml and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-circleci\"},{\"description\":\"Writes and edits visualci.yml: ignore rules scoped to snapshot globs (JSON paths and regular expressions), thresholds, PDF rendering, the CI mode and what to upload. Use when the user wants to ignore volatile values such as timestamps or IDs, change thresholds or the CI mode, or keep VisualCI settings in the repository. Not for per-snapshot ignores in a single test.\",\"name\":\"visualci-config\"},{\"description\":\"Sends Cypress screenshots to VisualCI: taking them with cy.screenshot, turning off failure screenshots, uploading cypress/screenshots with a platform per browser and a threshold, and reviewing changes. Use when a project uses Cypress (cypress.config, cy.screenshot) and wants visual review with VisualCI. Not for Playwright or Capybara.\",\"name\":\"visualci-cypress\"},{\"description\":\"Makes browser screenshots deterministic so VisualCI shows only real changes, covering seeded randomness, loaded and self-hosted fonts, reduced motion, frozen animations, GIFs and videos, a pinned clock and timezone, a hermetic network, and a fixed viewport, scrollbar and device pixel ratio. Gives recipes for Playwright, Cypress and Storybook. Use when screenshots differ between runs of the same commit (flaky diffs), or when setting up visual tests. Not for uploading screenshots or setting up the CI provider.\",\"name\":\"visualci-deterministic\"},{\"description\":\"Sets up VisualCI in GitHub Actions, including Blacksmith and Depot runners, with VisualCI's action (DocSpring/visualci/clients/github-action): the token as a secret, what to upload, and matrix and parallel jobs, or with the CLI directly. Use when the user wants visual or snapshot review in GitHub Actions, or a project has .github/workflows and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-github-actions\"},{\"description\":\"Sets up VisualCI in GitLab CI (.gitlab-ci.yml): the token as a masked variable, installing the CLI, creating the build, uploading snapshots and finalizing, and the CI modes for reviewing without a GitHub check. Use when the user wants visual or snapshot review in GitLab CI, or a project has .gitlab-ci.yml and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-gitlab\"},{\"description\":\"Sends insta (Rust) snapshot files to VisualCI, so a changed snapshot waits for review instead of failing cargo test: accepting snapshots in CI and uploading the .snap files. Use when a Rust project uses insta (assert_snapshot!, snapshots/*.snap) with VisualCI. Not for other languages.\",\"name\":\"visualci-insta\"},{\"description\":\"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.\",\"name\":\"visualci-jenkins\"},{\"description\":\"Sends Jest snapshot files to VisualCI, so a changed snapshot waits for review instead of failing the build: running Jest with -u in CI and uploading the .snap files, one snapshot per test. Use when a project uses Jest snapshots (toMatchSnapshot, __snapshots__/*.snap) with VisualCI. Not for Vitest or screenshots.\",\"name\":\"visualci-jest\"},{\"description\":\"Sets up VisualCI for a Laravel Rust app's tests with the snapshot-testing-laravel crate: browser screenshots and HTML, JSON and text snapshots of responses, run under `visualci test -- cargo test`, with names, platforms, ignore rules and thresholds as VisualCI sees them. Use when a Laravel Rust project uses snapshot-testing-laravel, or wants screenshot or snapshot tests with VisualCI. Not for other Rust projects (see visualci-insta) or other frameworks.\",\"name\":\"visualci-laravel-rust\"},{\"description\":\"Runs tests on a laptop against VisualCI's baselines: local environments, each test failing once with every snapshot it changed, and approving local changes so the branch's baseline matches. Use when the user runs visual or snapshot tests locally with VisualCI, sees VisualCI failures in a local run, or wants to approve local results. Not for CI setup.\",\"name\":\"visualci-local-runs\"},{\"description\":\"Sends mobile app screenshots to VisualCI from iOS (XCUITest, swift-snapshot-testing), Android (Espresso, Paparazzi, Roborazzi), Maestro, Detox (React Native) and Flutter golden tests, with a platform tag per OS version and device. Use when an iOS, Android, React Native or Flutter project wants visual review with VisualCI. Not for browser screenshots (Playwright, Cypress) or for setting up the CI provider.\",\"name\":\"visualci-mobile\"},{\"description\":\"Compares PDFs a test suite generates (Ruby, Node, Python or anything else) with VisualCI, page by page in one pinned renderer: uploading them, fingerprints, checking fingerprints are stable, and reading page, text and moved-line changes. Use when a project generates PDFs (invoices, reports, statements, labels) and the user wants them checked for visual changes. Not for screenshots.\",\"name\":\"visualci-pdfs\"},{\"description\":\"Sends Playwright screenshots to VisualCI instead of toHaveScreenshot baselines in the repository: saving screenshots in tests, uploading them with a platform per browser project and a threshold, and reviewing changes. Use when a project uses Playwright (playwright.config, @playwright/test) and wants visual review with VisualCI. Not for Cypress or Capybara.\",\"name\":\"visualci-playwright\"},{\"description\":\"Reviews a VisualCI build over the MCP server: finds what changed, reads each snapshot's diff images, text diff or JSON changes, checks them against the code and the task, then approves intended changes or fixes the code and pushes. Use when a VisualCI check is pending or failing on a pull request, the user asks what changed visually, or asks to approve or reject snapshots. Not for setting VisualCI up in CI.\",\"name\":\"visualci-review\"},{\"description\":\"Adds VisualCI to RSpec feature and system specs with the visualci gem: screenshots from Capybara, PDFs, JSON, HTML and text matchers, per-snapshot ignore rules, local runs that fail each example once, and sharded CI builds. Use when a Ruby project wants visual review of Capybara screenshots or generated documents in RSpec. Not for rspec-snapshot files: see visualci-rspec-snapshot.\",\"name\":\"visualci-rspec-screenshots\"},{\"description\":\"Sends rspec-snapshot files to VisualCI, so a changed snapshot waits for review instead of failing RSpec: updating snapshots in CI and uploading the .snap files. Use when a Ruby project uses rspec-snapshot (match_snapshot) with VisualCI. Not for RSpec screenshots or PDFs: see visualci-rspec-screenshots and visualci-pdfs.\",\"name\":\"visualci-rspec-snapshot\"},{\"description\":\"Sets up VisualCI in Semaphore (.semaphore/semaphore.yml): the token as a secret, installing the CLI, creating the build, uploading snapshots and finalizing, including parallelism. Use when the user wants visual or snapshot review in Semaphore, or a project has .semaphore/ and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-semaphore\"},{\"description\":\"Sends syrupy (pytest) snapshot files to VisualCI, so a changed snapshot waits for review instead of failing pytest: updating snapshots in CI and uploading the .ambr files, one snapshot per test. Use when a Python project uses syrupy (snapshot fixture, __snapshots__/*.ambr) with VisualCI. Not for other languages.\",\"name\":\"visualci-syrupy\"},{\"description\":\"Sets up VisualCI in TeamCity: the token as a password parameter, the commit, branch and pull request from TeamCity's parameters, installing the CLI, creating the build, uploading snapshots and finalizing. Use when the user wants visual or snapshot review in TeamCity, or a project has a .teamcity/ directory and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-teamcity\"},{\"description\":\"Sets up VisualCI in Travis CI (.travis.yml): the token as a repository variable, installing the CLI, creating the build, uploading snapshots and finalizing. Use when the user wants visual or snapshot review in Travis CI, or a project has .travis.yml and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-travis\"},{\"description\":\"Sends Vitest snapshot files to VisualCI, so a changed snapshot waits for review instead of failing the build: running Vitest with -u in CI and uploading the .snap files, one snapshot per test. Use when a project uses Vitest snapshots (toMatchSnapshot, __snapshots__/*.snap) with VisualCI. Not for Jest or screenshots.\",\"name\":\"visualci-vitest\"}]}", + "text": "{\"skills\":[{\"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.\",\"name\":\"visualci\"},{\"description\":\"Sets up VisualCI in Bitbucket Pipelines (bitbucket-pipelines.yml): the token as a secured variable, installing the CLI, creating the build, uploading snapshots and finalizing, including parallel steps. Use when the user wants visual or snapshot review in Bitbucket Pipelines, or a project has bitbucket-pipelines.yml and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-bitbucket\"},{\"description\":\"Sets up VisualCI in Buildkite pipelines: the token as a secret, installing the CLI, creating the build, uploading snapshots and finalizing, including parallel jobs. Use when the user wants visual or snapshot review in Buildkite, or a project has .buildkite/ and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-buildkite\"},{\"description\":\"Sets up VisualCI in CircleCI (.circleci/config.yml): the token in a context or project variable, installing the CLI, creating the build, uploading snapshots and finalizing, including parallelism. Use when the user wants visual or snapshot review in CircleCI, or a project has .circleci/config.yml and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-circleci\"},{\"description\":\"Writes and edits visualci.yml: ignore rules scoped to snapshot globs (JSON paths and regular expressions), thresholds, PDF rendering, the CI mode and what to upload. Use when the user wants to ignore volatile values such as timestamps or IDs, change thresholds or the CI mode, or keep VisualCI settings in the repository. Not for per-snapshot ignores in a single test.\",\"name\":\"visualci-config\"},{\"description\":\"Sends Cypress screenshots to VisualCI: taking them with cy.screenshot, turning off failure screenshots, uploading cypress/screenshots with a platform per browser and a threshold, and reviewing changes. Use when a project uses Cypress (cypress.config, cy.screenshot) and wants visual review with VisualCI. Not for Playwright or Capybara.\",\"name\":\"visualci-cypress\"},{\"description\":\"Makes browser screenshots deterministic so VisualCI shows only real changes, covering seeded randomness, loaded and self-hosted fonts, reduced motion, frozen animations, GIFs and videos, a pinned clock and timezone, a hermetic network, and a fixed viewport, scrollbar and device pixel ratio. Gives recipes for Playwright, Cypress and Storybook. Use when screenshots differ between runs of the same commit (flaky diffs), or when setting up visual tests. Not for uploading screenshots or setting up the CI provider.\",\"name\":\"visualci-deterministic\"},{\"description\":\"Sets up VisualCI in GitHub Actions, including Blacksmith and Depot runners, with VisualCI's action (DocSpring/visualci/clients/github-action): the token as a secret, what to upload, and matrix and parallel jobs, or with the CLI directly. Use when the user wants visual or snapshot review in GitHub Actions, or a project has .github/workflows and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-github-actions\"},{\"description\":\"Sets up VisualCI in GitLab CI (.gitlab-ci.yml): the token as a masked variable, installing the CLI, creating the build, uploading snapshots and finalizing, and the CI modes for reviewing without a GitHub check. Use when the user wants visual or snapshot review in GitLab CI, or a project has .gitlab-ci.yml and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-gitlab\"},{\"description\":\"Sends insta (Rust) snapshot files to VisualCI, so a changed snapshot waits for review instead of failing cargo test: accepting snapshots in CI and uploading the .snap files. Use when a Rust project uses insta (assert_snapshot!, snapshots/*.snap) with VisualCI. Not for other languages.\",\"name\":\"visualci-insta\"},{\"description\":\"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.\",\"name\":\"visualci-jenkins\"},{\"description\":\"Sends Jest snapshot files to VisualCI, so a changed snapshot waits for review instead of failing the build: running Jest with -u in CI and uploading the .snap files, one snapshot per test. Use when a project uses Jest snapshots (toMatchSnapshot, __snapshots__/*.snap) with VisualCI. Not for Vitest or screenshots.\",\"name\":\"visualci-jest\"},{\"description\":\"Sets up VisualCI for a Laravel Rust app's tests with the snapshot-testing-laravel crate: browser screenshots and HTML, JSON and text snapshots of responses, run under `visualci test -- cargo test`, with names, platforms, ignore rules and thresholds as VisualCI sees them. Use when a Laravel Rust project uses snapshot-testing-laravel, or wants screenshot or snapshot tests with VisualCI. Not for other Rust projects (see visualci-insta) or other frameworks.\",\"name\":\"visualci-laravel-rust\"},{\"description\":\"Runs tests on a laptop against VisualCI's baselines: local environments, each test failing once with every snapshot it changed, and approving local changes so the branch's baseline matches. Use when the user runs visual or snapshot tests locally with VisualCI, sees VisualCI failures in a local run, or wants to approve local results. Not for CI setup.\",\"name\":\"visualci-local-runs\"},{\"description\":\"Sends mobile app screenshots to VisualCI from iOS (XCUITest, swift-snapshot-testing), Android (Espresso, Paparazzi, Roborazzi), Maestro, Detox (React Native) and Flutter golden tests, with a platform tag per OS version and device. Use when an iOS, Android, React Native or Flutter project wants visual review with VisualCI. Not for browser screenshots (Playwright, Cypress) or for setting up the CI provider.\",\"name\":\"visualci-mobile\"},{\"description\":\"Compares PDFs a test suite generates (Ruby, Node, Python or anything else) with VisualCI, page by page in one pinned renderer: uploading them, fingerprints, checking fingerprints are stable, and reading page, text and moved-line changes. Use when a project generates PDFs (invoices, reports, statements, labels) and the user wants them checked for visual changes. Not for screenshots.\",\"name\":\"visualci-pdfs\"},{\"description\":\"Sends Playwright screenshots to VisualCI instead of toHaveScreenshot baselines in the repository: saving screenshots in tests, uploading them with a platform per browser project and a threshold, and reviewing changes. Use when a project uses Playwright (playwright.config, @playwright/test) and wants visual review with VisualCI. Not for Cypress or Capybara.\",\"name\":\"visualci-playwright\"},{\"description\":\"Reviews a VisualCI build over the MCP server: finds what changed, reads each snapshot's diff images, text diff or JSON changes, checks them against the code and the task, then approves intended changes or fixes the code and pushes. Use when a VisualCI check is pending or failing on a pull request, the user asks what changed visually, or asks to approve or reject snapshots. Not for setting VisualCI up in CI.\",\"name\":\"visualci-review\"},{\"description\":\"Adds VisualCI to RSpec feature and system specs with the visualci gem: screenshots from Capybara, PDFs, JSON, HTML and text matchers, per-snapshot ignore rules, local runs that fail each example once, and sharded CI builds. Use when a Ruby project wants visual review of Capybara screenshots or generated documents in RSpec. Not for rspec-snapshot files: see visualci-rspec-snapshot.\",\"name\":\"visualci-rspec-screenshots\"},{\"description\":\"Sends rspec-snapshot files to VisualCI, so a changed snapshot waits for review instead of failing RSpec: updating snapshots in CI and uploading the .snap files. Use when a Ruby project uses rspec-snapshot (match_snapshot) with VisualCI. Not for RSpec screenshots or PDFs: see visualci-rspec-screenshots and visualci-pdfs.\",\"name\":\"visualci-rspec-snapshot\"},{\"description\":\"Sets up VisualCI in Semaphore (.semaphore/semaphore.yml): the token as a secret, installing the CLI, creating the build, uploading snapshots and finalizing, including parallelism. Use when the user wants visual or snapshot review in Semaphore, or a project has .semaphore/ and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-semaphore\"},{\"description\":\"Sends syrupy (pytest) snapshot files to VisualCI, so a changed snapshot waits for review instead of failing pytest: updating snapshots in CI and uploading the .ambr files, one snapshot per test. Use when a Python project uses syrupy (snapshot fixture, __snapshots__/*.ambr) with VisualCI. Not for other languages.\",\"name\":\"visualci-syrupy\"},{\"description\":\"Sets up VisualCI in TeamCity: the token as a password parameter, the commit, branch and pull request from TeamCity's parameters, installing the CLI, creating the build, uploading snapshots and finalizing. Use when the user wants visual or snapshot review in TeamCity, or a project has a .teamcity/ directory and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-teamcity\"},{\"description\":\"Sets up VisualCI in Travis CI (.travis.yml): the token as a repository variable, installing the CLI, creating the build, uploading snapshots and finalizing. Use when the user wants visual or snapshot review in Travis CI, or a project has .travis.yml and VisualCI. Not for other CI providers, or for writing the tests themselves.\",\"name\":\"visualci-travis\"},{\"description\":\"Sends Vitest snapshot files to VisualCI, so a changed snapshot waits for review instead of failing the build: running Vitest with -u in CI and uploading the .snap files, one snapshot per test. Use when a project uses Vitest snapshots (toMatchSnapshot, __snapshots__/*.snap) with VisualCI. Not for Jest or screenshots.\",\"name\":\"visualci-vitest\"}]}", "type": "text" } ], @@ -11,7 +11,7 @@ "structuredContent": { "skills": [ { - "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.", + "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.", "name": "visualci" }, { diff --git a/server/frontend/content/docs/ci/bitbucket.md b/server/frontend/content/docs/ci/bitbucket.md index 78a23fc7..a60f1267 100644 --- a/server/frontend/content/docs/ci/bitbucket.md +++ b/server/frontend/content/docs/ci/bitbucket.md @@ -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 diff --git a/server/frontend/content/docs/ci/buildkite.md b/server/frontend/content/docs/ci/buildkite.md index 42de03da..70ecbe86 100644 --- a/server/frontend/content/docs/ci/buildkite.md +++ b/server/frontend/content/docs/ci/buildkite.md @@ -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 diff --git a/server/frontend/content/docs/ci/circleci.md b/server/frontend/content/docs/ci/circleci.md index 911a83b8..63cd5146 100644 --- a/server/frontend/content/docs/ci/circleci.md +++ b/server/frontend/content/docs/ci/circleci.md @@ -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" diff --git a/server/frontend/content/docs/ci/github-actions.md b/server/frontend/content/docs/ci/github-actions.md index 529da53b..c1b6f5b0 100644 --- a/server/frontend/content/docs/ci/github-actions.md +++ b/server/frontend/content/docs/ci/github-actions.md @@ -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 }} @@ -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 @@ -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 @@ -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 @@ -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. @@ -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" diff --git a/server/frontend/content/docs/ci/gitlab.md b/server/frontend/content/docs/ci/gitlab.md index 0b9eb0ee..ed27dd1b 100644 --- a/server/frontend/content/docs/ci/gitlab.md +++ b/server/frontend/content/docs/ci/gitlab.md @@ -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 diff --git a/server/frontend/content/docs/ci/jenkins.md b/server/frontend/content/docs/ci/jenkins.md index 4940de54..5427f28d 100644 --- a/server/frontend/content/docs/ci/jenkins.md +++ b/server/frontend/content/docs/ci/jenkins.md @@ -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) diff --git a/server/frontend/content/docs/ci/semaphore.md b/server/frontend/content/docs/ci/semaphore.md index 07903a34..c2fe90d2 100644 --- a/server/frontend/content/docs/ci/semaphore.md +++ b/server/frontend/content/docs/ci/semaphore.md @@ -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 diff --git a/server/frontend/content/docs/ci/teamcity.md b/server/frontend/content/docs/ci/teamcity.md index c16a69dc..34d8edb6 100644 --- a/server/frontend/content/docs/ci/teamcity.md +++ b/server/frontend/content/docs/ci/teamcity.md @@ -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 diff --git a/server/frontend/content/docs/ci/travis.md b/server/frontend/content/docs/ci/travis.md index fd004270..269a1878 100644 --- a/server/frontend/content/docs/ci/travis.md +++ b/server/frontend/content/docs/ci/travis.md @@ -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) diff --git a/server/frontend/content/docs/index.md b/server/frontend/content/docs/index.md index 107eba70..c87a479e 100644 --- a/server/frontend/content/docs/index.md +++ b/server/frontend/content/docs/index.md @@ -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. diff --git a/server/frontend/content/docs/quick-start.md b/server/frontend/content/docs/quick-start.md index a1124cea..f339c971 100644 --- a/server/frontend/content/docs/quick-start.md +++ b/server/frontend/content/docs/quick-start.md @@ -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 @@ -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 diff --git a/server/frontend/content/docs/reference/cli.md b/server/frontend/content/docs/reference/cli.md index f3909176..6e490982 100644 --- a/server/frontend/content/docs/reference/cli.md +++ b/server/frontend/content/docs/reference/cli.md @@ -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 --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 --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. diff --git a/server/frontend/content/docs/snapshots/laravel-rust.md b/server/frontend/content/docs/snapshots/laravel-rust.md index f4c4839f..6382da20 100644 --- a/server/frontend/content/docs/snapshots/laravel-rust.md +++ b/server/frontend/content/docs/snapshots/laravel-rust.md @@ -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_... ``` @@ -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: diff --git a/server/frontend/public/ci.md b/server/frontend/public/ci.md index df07db92..0aebda10 100644 --- a/server/frontend/public/ci.md +++ b/server/frontend/public/ci.md @@ -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 diff --git a/server/frontend/public/install.md b/server/frontend/public/install.md index dfd5f432..2bc63f14 100644 --- a/server/frontend/public/install.md +++ b/server/frontend/public/install.md @@ -30,9 +30,15 @@ adding tests. ## 3. Create the project -Call `whoami`. Use the person's organization, or ask which one. Create a project named after the repository -(`create_project`) unless one exists, and a project token for CI (`create_project_token`). Show the token to the person -once and ask them to save it as the CI secret `VISUALCI_TOKEN`. Never commit it. +Call `whoami`. If the repository is on GitHub and has no project yet, ask the person to install the VisualCI GitHub App +on it: from their organization's page in the app (the setup steps' **Install on GitHub**), or at +https://app.visualci.com/github/install. Installing it makes a project for each repository they maintain, linked to it +for pull request checks. If the setup steps already offer an installation ("Already installed on …"), they choose +**Set it up**. Check with `get_organization` that the project exists. Not on GitHub, or the person would rather not: +create a project named after the repository (`create_project`). + +Then create a project token for CI (`create_project_token`). Show the token to the person once and ask them to save it +as the CI secret `VISUALCI_TOKEN`. Never commit it. ## 4. Write visualci.yml diff --git a/server/frontend/scripts/site.mjs b/server/frontend/scripts/site.mjs index 27e17d30..56d2226b 100644 --- a/server/frontend/scripts/site.mjs +++ b/server/frontend/scripts/site.mjs @@ -155,6 +155,17 @@ for (const pin of pins) { } if (released.get(version) === false) problems.push(`${page} pins VISUALCI_VERSION=${version}, which isn't released`) } +// One version everywhere: the app's add-to-CI step shows these snippets, so a page left behind shows an old release. +const versions = new Set([...pins].map((p) => p.split(' ')[1])) +if (versions.size > 1) problems.push(`the docs pin more than one CLI release (${[...versions].join(', ')}): pin the newest everywhere`) +{ + const headers = process.env.GITHUB_TOKEN ? { authorization: `Bearer ${process.env.GITHUB_TOKEN}` } : {} + const response = await fetch('https://api.github.com/repos/DocSpring/visualci/releases/latest', { headers }) + const latest = response.status === 200 ? (await response.json()).tag_name?.replace(/^v/, '') : null + for (const version of versions) { + if (latest && newer(latest, version)) console.warn(`the docs pin ${version}; ${latest} is out: move the pins to it`) + } +} // Production builds (VISUALCI_ANALYTICS=1, analytics.ts) carry the marketing site's Plausible script on every page but // the plain 404, and never the app's. if (process.env.VISUALCI_ANALYTICS === '1') { diff --git a/server/frontend/src/api/hooks.ts b/server/frontend/src/api/hooks.ts index 409ae448..9d52fe44 100644 --- a/server/frontend/src/api/hooks.ts +++ b/server/frontend/src/api/hooks.ts @@ -19,6 +19,7 @@ import type { ProjectData, ProjectSettings, Providers, + InstallationSetUp, Setup, Signup, SnapshotData, @@ -441,6 +442,15 @@ export function useUpdateSetup(org: string) { }) } +/** Set up an installation of the GitHub App the person can reach ("already installed on X: set it up"). */ +export function useSetUpInstallation() { + const qc = useQueryClient() + return useMutation({ + mutationFn: (installationId: string) => post(`/api/ui/installations/${installationId}/setup`, {}), + onSuccess: (r) => qc.invalidateQueries({ queryKey: keys.org(r.organization) }), + }) +} + /** "How did you hear about VisualCI?": an answer, or Skip. */ export function useHeardAbout() { const qc = useQueryClient() diff --git a/server/frontend/src/api/types.ts b/server/frontend/src/api/types.ts index 92ceb2fd..e71004e6 100644 --- a/server/frontend/src/api/types.ts +++ b/server/frontend/src/api/types.ts @@ -110,7 +110,31 @@ export type EmailPreview = { label: string; kind: string; subject: string; text: export type HeardAboutOption = { key: string; label: string; short_label: string; detail_label: string | null } -export type SetupStepKey = 'connect_agent' | 'create_project' | 'install_github_app' | 'add_to_ci' | 'review_changes' +export type SetupStepKey = 'install_github_app' | 'add_to_ci' | 'connect_agent' | 'review_changes' + +/** An installation of the VisualCI GitHub App the signed-in person can reach. */ +export type InstallationOffer = { + installation_id: string + account_login: string + account_type: 'User' | 'Organization' | string + /** The organization it's set up for; null until someone sets it up. */ + organization: string | null +} + +/** What setting an installation up did. */ +export type InstallationSetUp = { + installation_id: string + account_login: string + organization: string + organization_created: boolean + note: string | null + linked: { project: string; repository: string }[] + already: { project: string; repository: string }[] + skipped: { repository: string; reason: string }[] + truncated: boolean + /** Where to go next (the organization's page with the next step open). Only in the API's answer. */ + landing?: string +} /** The "Set up VisualCI" checklist: each step ticks itself from what happened. */ export type Setup = { @@ -119,6 +143,12 @@ export type Setup = { /** A build has been reviewed. */ complete: boolean dismissed: boolean + /** Where to install the GitHub App. */ + install_url: string + /** The person's installations of the App. */ + installations: InstallationOffer[] + /** The installations set up for this organization, with what their last set-up did. */ + github: { installation_id: string; account_login: string; result: InstallationSetUp | null }[] } export type Signup = { name: string; email: string; login: string | null; created_at: string; heard_about: string | null } diff --git a/server/frontend/src/components/SetupChecklist.tsx b/server/frontend/src/components/SetupChecklist.tsx index ee344073..db77e60a 100644 --- a/server/frontend/src/components/SetupChecklist.tsx +++ b/server/frontend/src/components/SetupChecklist.tsx @@ -1,8 +1,8 @@ import { useState, type ReactNode } from 'react' -import { Link } from '@tanstack/react-router' +import { Link, useNavigate } from '@tanstack/react-router' import { CheckIcon } from '@phosphor-icons/react' -import { useCreateToken, useUpdateSetup } from '../api/hooks' -import type { Org, SetupStepKey } from '../api/types' +import { useCreateToken, useSetUpInstallation, useUpdateSetup } from '../api/hooks' +import type { InstallationSetUp, Org, SetupStepKey } from '../api/types' import { apiUrl, mcpUrl } from '../lib/hosts' import { Button, CodeBlock, CopyButton, Help } from './ui' import { RequestBox } from './RequestBox' @@ -12,16 +12,121 @@ import circleci from '../../content/docs/ci/circleci.md?raw' import gitlab from '../../content/docs/ci/gitlab.md?raw' import buildkite from '../../content/docs/ci/buildkite.md?raw' -const GITHUB_APP = 'https://github.com/apps/visualci-com/installations/new' - const TITLES: Record = { - connect_agent: 'Connect your coding agent', - create_project: 'Create a project', install_github_app: 'Install the GitHub App', add_to_ci: 'Add VisualCI to CI', + connect_agent: 'Connect your coding agent', review_changes: 'Review your first changes', } +/** "Set up for acme: 3 projects." */ +function projectCount(r: InstallationSetUp): string { + const n = r.linked.length + r.already.length + return n === 1 ? '1 project' : `${n} projects` +} + +/** What setting an installation up did: its projects, and the repositories it couldn't add, with why. */ +function SetUpResult({ result }: { result: InstallationSetUp }) { + return ( +
+

+ Set up for {result.account_login}: {projectCount(result)}. + {result.note && {result.note}.} +

+ {result.skipped.length > 0 && ( +
+ + {result.skipped.length === 1 ? '1 repository' : `${result.skipped.length} repositories`} not added + +
    + {result.skipped.map((s) => ( +
  • + {s.repository} {s.reason} +
  • + ))} +
+
+ )} + {result.truncated &&

Only the first 100 repositories were looked at. Add the rest by hand.

} +
+ ) +} + +function InstallGithubApp({ org, data, onCreateProject }: { org: string; data: Org; onCreateProject?: () => void }) { + const setup = data.setup + const navigate = useNavigate() + const setUp = useSetUpInstallation() + const [pending, setPending] = useState(null) + const offers = setup.installations.filter((i) => i.organization === null) + const elsewhere = setup.installations.filter((i) => i.organization !== null && i.organization !== org) + const results = setup.github.flatMap((g) => (g.result ? [g.result] : [])) + const go = (id: string) => { + setPending(id) + setUp.mutate(id, { + onSuccess: (r) => { + if (r.organization !== org) navigate({ to: '/$org', params: { org: r.organization }, search: { setup: 'add_to_ci', installation: r.installation_id } }) + }, + onSettled: () => setPending(null), + }) + } + return ( + <> + {results.map((r) => ( + + ))} + {offers.length > 0 && ( +
    + {offers.map((o) => ( +
  • + + Already installed on {o.account_login} + + +
  • + ))} +
+ )} + {setUp.error && ( +

+ {setUp.error.message} +

+ )} + {elsewhere.map((o) => ( +

+ The GitHub App on {o.account_login} is set up in the{' '} + + {o.organization} + {' '} + organization. +

+ ))} +
+ + {offers.length || results.length ? 'Install on another account' : 'Install on GitHub'} + + + Pick the repositories to test. Each one you maintain becomes a project here, with checks on its pull requests + and access that follows people’s permission on it. It can’t read your code. + +
+ {onCreateProject && ( +

+ Not on GitHub?{' '} + + . +

+ )} + + ) +} + /** The first code block of a docs page: the CI snippets live in the docs, once. */ function firstBlock(markdown: string): string { return markdown.match(/```\w*\n([\s\S]*?)```/)?.[1].trimEnd() ?? '' @@ -105,7 +210,7 @@ function AddToCi({ org, projects }: { org: string; projects: Org['projects'] }) const create = useCreateToken(org, project) const s = SNIPPETS[provider] const api = apiUrl() - if (!project) return

Create a project first.

+ if (!project) return

Install the GitHub App first: it makes a project for each repository.

return ( <>
@@ -165,41 +270,28 @@ function ReviewChanges({ org, projects }: { org: string; projects: Org['projects ) } -export function SetupChecklist({ org, data, onCreateProject }: { org: string; data: Org; onCreateProject?: () => void }) { +export function SetupChecklist({ + org, + data, + onCreateProject, + focus, + installation, +}: { + org: string + data: Org + onCreateProject?: () => void + /** The step to open (the Setup URL lands on `add_to_ci`); else the next one. */ + focus?: SetupStepKey + /** The installation just set up, to say what it did. */ + installation?: string +}) { const update = useUpdateSetup(org) const setup = data.setup - const [open, setOpen] = useState(setup.next) + const [open, setOpen] = useState(focus ?? setup.next) + const just = installation ? setup.github.find((g) => g.installation_id === installation)?.result : undefined const body: Record = { connect_agent: , - create_project: ( -
- {onCreateProject && ( - - )} - Or ask your agent. -
- ), - install_github_app: ( - <> -
- - Install on GitHub - - Checks on each pull request, and access here that follows people’s permission on the repository. It can’t read your code. -
- {data.projects[0] && ( -

- Then link the repository in{' '} - - project settings - - . -

- )} - - ), + install_github_app: , add_to_ci: , review_changes: , } @@ -215,6 +307,11 @@ export function SetupChecklist({ org, data, onCreateProject }: { org: string; da Hide
+ {just && ( +

+ VisualCI is set up for {just.account_login}: {projectCount(just)}. Next, add it to CI. +

+ )}
    {setup.steps.map((s, i) => { const expanded = open === s.key diff --git a/server/frontend/src/pages/OrgPage.tsx b/server/frontend/src/pages/OrgPage.tsx index 4f518943..23a36aa8 100644 --- a/server/frontend/src/pages/OrgPage.tsx +++ b/server/frontend/src/pages/OrgPage.tsx @@ -15,6 +15,7 @@ const route = getRouteApi('/_app/$org') export function OrgPage() { const { org } = route.useParams() + const { setup: focus, installation } = route.useSearch() const q = useOrg(org) const create = useCreateProject(org) const navigate = useNavigate() @@ -47,7 +48,16 @@ export function OrgPage() { {me.data?.heard_about_pending && me.data.heard_about_options && } - {showSetup && setCreating(true) : undefined} />} + {showSetup && ( + setCreating(true) : undefined} + /> + )}
    @@ -58,7 +68,7 @@ export function OrgPage() { Show setup steps )} - {canCreate && !creating && ( + {canCreate && !creating && o.projects.length > 0 && ( @@ -87,11 +97,21 @@ export function OrgPage() { )} {o.projects.length === 0 && !creating ? ( + // The GitHub App makes the projects: the empty state points at the same step as the checklist, and the + // hand-made path stays a small link (in the checklist's first step, or here when the checklist is hidden) - {canCreate && ( - +

    Install the GitHub App to add your repositories: each one you maintain becomes a project.

    + + Install on GitHub + + {canCreate && !showSetup && ( +

    + Not on GitHub?{' '} + + . +

    )}
    ) : ( diff --git a/server/frontend/src/router.tsx b/server/frontend/src/router.tsx index 82b23a42..01b0a348 100644 --- a/server/frontend/src/router.tsx +++ b/server/frontend/src/router.tsx @@ -1,5 +1,6 @@ import { Outlet, createRootRouteWithContext, createRoute, createRouter } from '@tanstack/react-router' import type { QueryClient } from '@tanstack/react-query' +import type { SetupStepKey } from './api/types' import { AppGate, NotFound } from './components/AppShell' import { Home } from './pages/Home' import { OrgPage } from './pages/OrgPage' @@ -48,7 +49,17 @@ const askRoute = createRoute({ getParentRoute: () => appRoute, path: 'account/as // `device` is a reserved slug: `visualci login` sends people here to approve the CLI's code. const deviceRoute = createRoute({ getParentRoute: () => appRoute, path: 'device', component: DevicePage }) -const orgRoute = createRoute({ getParentRoute: () => appRoute, path: '$org', component: OrgPage }) +const SETUP_STEPS = ['install_github_app', 'add_to_ci', 'connect_agent', 'review_changes'] as const +const orgRoute = createRoute({ + getParentRoute: () => appRoute, + path: '$org', + component: OrgPage, + // The GitHub App's Setup URL lands here with the next step open and the installation it set up + validateSearch: (search: Record): { setup?: SetupStepKey; installation?: string } => ({ + ...(SETUP_STEPS.includes(search.setup as SetupStepKey) ? { setup: search.setup as SetupStepKey } : {}), + ...(search.installation != null && /^\d{1,20}$/.test(String(search.installation)) ? { installation: String(search.installation) } : {}), + }), +}) const billingRoute = createRoute({ getParentRoute: () => appRoute, path: '$org/billing', component: () => }) const billingUsageRoute = createRoute({ getParentRoute: () => appRoute, path: '$org/billing/usage', component: () => }) diff --git a/server/frontend/src/styles.css b/server/frontend/src/styles.css index 24112ffe..b5b960c5 100644 --- a/server/frontend/src/styles.css +++ b/server/frontend/src/styles.css @@ -4341,6 +4341,72 @@ svg.regions-dim { font-weight: 500; } +/* sc-9027: what the GitHub App's set-up did, and installations to set up */ +.setup-landed { + margin: 0; + padding: var(--space-3) var(--space-4); + border-radius: var(--radius-md); + background: var(--color-added-soft); + color: var(--color-ink); +} + +.setup-result { + display: grid; + gap: var(--space-2); +} + +.setup-result p { + margin: 0; +} + +.setup-skipped summary { + cursor: pointer; + color: var(--color-ink-2); + font-size: var(--text-sm); +} + +.setup-skipped summary:focus-visible { + outline: 2px solid var(--color-focus); + outline-offset: 2px; + border-radius: var(--radius-sm); +} + +.setup-skipped ul { + display: grid; + gap: var(--space-1); + margin: var(--space-2) 0 0; + padding-left: var(--space-5); + font-size: var(--text-sm); +} + +.setup-skipped li { + overflow-wrap: anywhere; +} + +.setup-offers { + list-style: none; + margin: 0; + padding: 0; + display: grid; + border: 1px solid var(--color-rule); + border-radius: var(--radius-md); +} + +.setup-offer { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: var(--space-3); + padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); + min-width: 0; + overflow-wrap: anywhere; +} + +.setup-offer + .setup-offer { + border-top: 1px solid var(--color-rule); +} + .setup-prompt { display: flex; align-items: center; diff --git a/skills/visualci-bitbucket/SKILL.md b/skills/visualci-bitbucket/SKILL.md index 4bac4b12..42c582aa 100644 --- a/skills/visualci-bitbucket/SKILL.md +++ b/skills/visualci-bitbucket/SKILL.md @@ -19,7 +19,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 diff --git a/skills/visualci-buildkite/SKILL.md b/skills/visualci-buildkite/SKILL.md index e8bca2c0..356a3da2 100644 --- a/skills/visualci-buildkite/SKILL.md +++ b/skills/visualci-buildkite/SKILL.md @@ -16,7 +16,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 diff --git a/skills/visualci-circleci/SKILL.md b/skills/visualci-circleci/SKILL.md index 048eee83..745bca4b 100644 --- a/skills/visualci-circleci/SKILL.md +++ b/skills/visualci-circleci/SKILL.md @@ -21,7 +21,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" diff --git a/skills/visualci-github-actions/SKILL.md b/skills/visualci-github-actions/SKILL.md index 35eca9ca..71a662d6 100644 --- a/skills/visualci-github-actions/SKILL.md +++ b/skills/visualci-github-actions/SKILL.md @@ -22,7 +22,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 }} @@ -55,7 +55,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 @@ -67,7 +67,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 @@ -111,7 +111,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 @@ -179,7 +179,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. @@ -223,7 +223,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" diff --git a/skills/visualci-gitlab/SKILL.md b/skills/visualci-gitlab/SKILL.md index 8036a903..31bfb8ec 100644 --- a/skills/visualci-gitlab/SKILL.md +++ b/skills/visualci-gitlab/SKILL.md @@ -18,7 +18,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 diff --git a/skills/visualci-jenkins/SKILL.md b/skills/visualci-jenkins/SKILL.md index 47b3e896..0bd2ea34 100644 --- a/skills/visualci-jenkins/SKILL.md +++ b/skills/visualci-jenkins/SKILL.md @@ -21,7 +21,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) diff --git a/skills/visualci-laravel-rust/SKILL.md b/skills/visualci-laravel-rust/SKILL.md index 3a4549cf..818f6964 100644 --- a/skills/visualci-laravel-rust/SKILL.md +++ b/skills/visualci-laravel-rust/SKILL.md @@ -54,7 +54,7 @@ For snapshots without a browser, `default-features = false` leaves the browser o Then the CLI, and a project token (see [Quick start](https://visualci.com/docs/quick-start.md)): ```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_... ``` @@ -81,7 +81,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: diff --git a/skills/visualci-semaphore/SKILL.md b/skills/visualci-semaphore/SKILL.md index 1d1c3d74..d3f85117 100644 --- a/skills/visualci-semaphore/SKILL.md +++ b/skills/visualci-semaphore/SKILL.md @@ -28,7 +28,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 diff --git a/skills/visualci-teamcity/SKILL.md b/skills/visualci-teamcity/SKILL.md index c923db58..c743eeb7 100644 --- a/skills/visualci-teamcity/SKILL.md +++ b/skills/visualci-teamcity/SKILL.md @@ -21,7 +21,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 diff --git a/skills/visualci-travis/SKILL.md b/skills/visualci-travis/SKILL.md index 4955fe1a..7eca9d09 100644 --- a/skills/visualci-travis/SKILL.md +++ b/skills/visualci-travis/SKILL.md @@ -19,7 +19,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) diff --git a/skills/visualci/SKILL.md b/skills/visualci/SKILL.md index 7a407317..f748b670 100644 --- a/skills/visualci/SKILL.md +++ b/skills/visualci/SKILL.md @@ -1,6 +1,6 @@ --- name: visualci -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." +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." license: Apache-2.0 metadata: docs: https://visualci.com/docs/quick-start.md @@ -12,15 +12,15 @@ metadata: 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](https://visualci.com/docs/reference/access.md). -A coding agent can do this step for you over MCP, with `create_organization`, `create_project` and `create_project_token`. See [Coding agents](https://visualci.com/docs/agents.md). +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](https://visualci.com/docs/reference/access.md). +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](https://visualci.com/docs/agents.md). ## 2. Install the CLI @@ -30,7 +30,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