Last updated: November 11, 2026View as Markdown

Configuration: fidel.config.json

Fidel reads fidel.config.json from the root of your repository. npx usefidel init writes it for you. The file needs a non-empty designSystemChecks array, a non-empty checks array, or both.

Example

{
  "projectId": "0b9f2a4e-1c3d-4e5f-8a6b-7c8d9e0f1a2b",
  "designSystemChecks": [
    { "name": "Home", "url": "https://pr-{pr}.preview.example.com/" }
  ],
  "failOnDrift": false
}

Top-level fields

FieldTypeDefaultDescription
designSystemChecksarraynonePages to check against your design system on each pull request. See below.
checksarraynonePages to compare with a Figma frame. See below.
failOnDriftbooleanfalseBlock the merge when Fidel confirms a violation in design system checks.
projectIdstringnoneProject that runs are saved under. Without it, runs don't show in the web app.
defaultsobjectnoneSettings applied to every Figma check that doesn't set its own.
triggersobjectfrontend filesWhich changed files start a check.

designSystemChecks

Design system checks run through the Fidel GitHub App and need the Pro plan or above.

FieldRequiredDescription
nameyesLabel shown in the pull request comment.
urlyesThe page to check, usually the pull request's preview URL. Supports variables.
projectIdnoProject for this check. Defaults to the top-level projectId.

failOnDrift

Off by default, so Fidel only comments. Set it to true to block the merge when Fidel confirms a violation. Only true or false count; any other value is ignored.

failOnDrift applies to design system checks. Figma checks that run in the GitHub Action use the action's fail-on-drift input instead.

checks (Figma frame vs live page)

FieldRequiredDescription
nameyesLabel shown in the pull request comment.
figmayesLink to the Figma frame, copied from Figma.
urlyesThe live or preview URL to compare. Supports variables.
viewportno{ "width", "height" }. Defaults to 1440 × 900.
waitForSelectornoCSS selector to wait for before capturing.
waitForLoadStatenoload, domcontentloaded or networkidle (default).
waitAfterLoadMsnoExtra wait after load, in milliseconds. Defaults to 500.
textModenoText comparison mode. Defaults to styling-only.
projectIdnoProject for this check. Defaults to the top-level projectId.

Figma checks need a connected Figma account: run npx usefidel connect-figma.

defaults

Applies to every Figma check that doesn't override it. Accepts viewport, waitForSelector, waitForLoadState, waitAfterLoadMs and textMode.

triggers

By default Fidel runs only when a pull request changes a frontend file:

**/*.{ts,tsx,js,jsx,mjs,cjs,css,scss,sass,less,html,vue,svelte}

Set your own globs with triggers.paths:

{ "triggers": { "paths": ["src/**", "styles/**"] } }

Supported syntax: * within a path segment, ** across segments, ? for one character and {a,b} for alternatives.

Variables in url

VariableValue
{pr}Pull request number
{branch}Head branch name
{sha}Head commit SHA
$VAR or ${VAR}Environment variable from the workflow step. GitHub Action only.

The GitHub App doesn't expand environment variables, so design system checks use {pr}, {branch} and {sha}.

Fidel refuses variables whose name or value looks like a credential, and the run fails with an error naming the variable. This is a safeguard, not a guarantee: only reference values that are safe to appear in a stored run and a pull request comment.

projectId

The id in the project's address in the web app (/projects/<id>). If the id doesn't belong to your team, the run is refused with project_not_found.