What Revyse adds to your site's code
Setting Revyse up is one change to your site's code, and so is taking it out. This page is everything in between, in full technical detail: what setup adds, the access Revyse needs, the checks it runs and how a change reaches production. You don't need any of it to use Revyse; it's here for whoever wants to know.
$ npx revyse initWhat it runs on
- Next.js
- Versions 14 to 16, on the App Router or the Pages Router, with webpack or Turbopack. Revyse's own automated tests run on Next.js 16.
- Pages Router
- Needs a custom
pages/_document.tsx(Next's default one is fine) for Revyse to load on the live site, and in development with Turbopack. - Node.js
- 22.12 or later, for the
revyseCLI and the@revyse/nextplugin. - Package managers
- npm, pnpm, Yarn and Bun, read from your lockfile.
- Repository
- GitHub, with one app at the repository's root. Monorepos, GitLab and Bitbucket aren't supported.
- Hosting
- Vercel, for a preview of each change, the Preview environment's variables and watching the production deployment. On another host Revyse still opens and merges the pull request and your host deploys it, with no preview and no browser check.
- Not supported
- Vite, Create React App, Vue, Svelte and Nuxt. Revyse doesn't run in them.
What setup adds to your code
One change, made once. Run npx revyse init in a clone: it asks before each step, shows the config edit as a diff, then commits and pushes what it changed. Or connect the site from the dashboard: Revyse makes the same change on the branch revyse/setup, opens the pull request “Add Revyse to your site” and squash-merges it. If your branch rules refuse the merge, you merge it on GitHub.
revyse.config.json- At the root: the framework, the package manager, your source folders, and the scripts Revyse runs as checks.
next.config- Wrapped in
withRevyse(), which opens Revyse in your dev server. Itsliveoption carries the project's public key and adds Revyse's loader tag to production builds. The key says which project the site belongs to and grants nothing. - Dev dependencies
revyseand@revyse/next, added with your package manager..gitignore.revyse/, the local change history.- Content Security Policy
- If the site sets one in
next.configor its middleware, Revyse's origin is added toscript-srcandconnect-src. - Exact locations
- For sites that build on Vercel: a
locationsoption in the plugin, an upload step after your build script, and a build token on the Vercel project. The build uploads a map from each element's opaque id to its file, line and column; your pages carry only the ids. - Your visitors
- The loader makes no request to Revyse and changes nothing until a signed-in member of the project opens Revyse, from the dashboard or by adding
#revyseto the address. It opens only on the addresses the project has registered.
The access each connection needs, and why
- GitHub: Contents, read and write
- Reads the code at the base branch, pushes each change to its own branch (
revyse/<change-id>), and merges the pull request when the project's release setting allows. - GitHub: Pull requests, read and write
- Opens the pull request for a change.
- GitHub: Metadata, read
- Required by GitHub for every app: repository names, default branch, visibility.
- GitHub: Checks, read
- Sees the results of your own checks on the change's branch.
- GitHub: Commit statuses, read
- Reads how your host's deployment of a merge went. Optional: without it Revyse asks the host.
- Nothing more
- Revyse refuses an installation that grants more than these, and works only on the repositories you select. Installation tokens are minted for each call and never stored.
- Your GitHub sign-in
- Lists the repositories you can reach when you pick one. Stored encrypted, per person; GitHub renews it every 8 hours, and revoking it on GitHub makes Revyse forget it.
- Vercel
- Reads projects and deployments, to show each change's preview and watch the production deployment. Reads and writes project environment variables: it sets a connected service's variables and a secret pasted into a change, and reads the Preview environment's values to run a live preview, where they stay in the running workspace's memory. Its token is stored encrypted. It never deploys: your project's own Git connection does.
What Revyse may and may not write to
- Writes
- Only inside the source folders named in
revyse.config.json(sourceDirs), and your ORM's migration folders. - Never reads
- Environment files, keys, credentials, dependency folders, or any path in your
excludelist. - Never edits
package.json, lockfiles or CI configuration. A package it adds goes through your package manager, checked first, with install scripts off.- Never runs
- A migration. It writes one and stops: your deployments run it, and a change with a migration always waits for a person.
- Edits by hand
- Written by Revyse's own code, with no AI, to the line the text or class came from. Refused where the text comes from a variable, a translation, fetched data or a shared component.
Which checks run
On a clean copy of the repository, with installs frozen to your lockfile, install scripts off and the network limited to GitHub, the package registries and Revyse.
- Your scripts
typecheck,lintandtest, as named inrevyse.config.json, then the build. Setup leavestestout so changes stay fast; add it toscriptsto run your tests too.- The preview
- When Vercel's preview is ready, Revyse loads it in a browser. If the plan said how to try the change, it walks those steps and keeps a screenshot of each.
- Before and after
- A check that already failed before the change is marked as failing before, and doesn't fail the change. A check that didn't run is shown as not run, never as passed.
- Security flags
- 18 rules look for security-sensitive code in the diff: a secret made public, an authentication check removed, SQL built from strings, a changed CI workflow and the like. A match holds the change for someone who may approve it, whatever the release setting.
- Your own CI
- Revyse reads your repository's own check results on the pull request before it merges.
How a change reaches production
Every cloud change is a branch and a pull request: Revyse commits the change as the person who asked, pushes it to revyse/<change-id> and opens the pull request with the request, the plan, the files and the checks. Owners pick one release setting for each project.
- Preview, then promote
- The default. Someone the project allows opens the preview and promotes it; owners choose whether that's anyone who can make changes, or only approvers and owners. Revyse then merges the pull request.
- Straight to production
- When the checks show nothing newly broken, Revyse merges by itself. A new check failure, a migration or a security flag waits for an approver.
- Review
- An approver decides on the change's page. When the project names reviewers, only they decide, in Revyse or by approving the pull request on GitHub. A person merges it on GitHub.
- The merge
- Revyse merges only the commit that was decided on: if someone pushed to the branch since, it stops and says so. If a branch rule refuses the merge, the change's page says why.
- The deploy
- Your host deploys the merge; Revyse never does. On Vercel it watches the deployment and reports one that fails or never comes.
- Undo
- Before publishing, each change undoes on its own. A change that has been merged has no undo in Revyse yet: revert its pull request on GitHub.
- On your machine
- A local change lands in your working tree. Publish pushes it, or opens a pull request on a new branch. Release settings apply to cloud changes only.
What is stored, and for how long
- Source files
- Not kept. Read for the change, sent to the model provider, then dropped.
- The plan and the list of changed files
- Kept with the change.
- The diff and the checks' output
- Deleted 90 days after the change was last touched, with secrets redacted and personal data masked.
- Screenshots
- Deleted after 30 days.
- A change's workspace
- Destroyed when the stage ends, or after 30 minutes.
- A live preview
- Paused after 10 idle minutes and ended with the session, at most 12 hours after it started. A snapshot of the code with its packages installed is kept at the workspace provider so the next one starts quickly; it's saved before any variable is set, and Revyse sets no expiry on it.
- Credentials
- GitHub installation tokens are never stored. Your GitHub sign-in and the Vercel token are stored encrypted.
- Models
- Anthropic's Claude by default; an owner can choose an OpenAI or Google model, or turn models off. All under no-training API terms.
How to remove it
- Delete the project
- An owner deletes it in the project's settings, typing its name. Revyse first takes itself out of the site: it closes its open pull requests and deletes its branches, then opens “Remove Revyse from your site”, which undoes what setup changed, and merges it. If your branch rules refuse, it waits for you to merge. Then it takes its build token off the Vercel project and deletes the project with its changes, diffs, checks and screenshots.
- Disconnect
- Uninstall the GitHub App or the Vercel integration, from GitHub or Vercel, at any time. Revyse disconnects the projects that used them.
- By hand
- Reverting the setup pull request does it too: with the plugin out of
next.config, nothing of Revyse is on your pages.