Skip to content

Beta. consent-kit is at 0.x: expect breaking changes between releases, and treat everything it generates as a draft. Report a problem or share feedback.

consent-kit keeps a website’s cookie banner, its privacy documents and what the site really does in the browser in agreement, by generating all three from one file, privacy.registry.yaml.

You describe every cookie, storage key, third-party script, iframe, pixel, endpoint, stylesheet, font and media file the site uses, each with its purpose and lawful basis. consent-kit validates that file, compares it with the last released version, and compiles it into the files the site needs. A browser audit then checks a running site against the same file.

flowchart LR
  R[privacy.registry.yaml] --> C{consent-kit check}
  L[privacy.lock.json<br/>last release] --> C
  V[privacy.review.json<br/>human sign-off] --> C
  C --> B[consent-kit build]
  C --> D[consent-kit docs]
  C --> REL[consent-kit release]
  REL --> L
  B --> G1[CookieConsent config]
  B --> G2[Content-Security-Policy]
  B --> G3[inline guard]
  B --> G4[storage facade]
  B --> G5[receipt manifest]
  D --> P[privacy policy, cookie table,<br/>record of processing, ...]
  R --> A[consent-kit audit]
  S[running site] --> A
Step Command What happens
Validate and classify consent-kit check The registry is validated. Every change since the last release is classified as material or not. Material changes need a purpose version bump; some changes need a person’s sign-off.
Generate consent-kit build Writes the CookieConsent v3 configuration, a strict Content-Security-Policy, the inline runtime guard, a typed storage module and, when receipts are kept, the receipt manifest.
Write documents consent-kit docs Writes the privacy policy, cookie table, record of processing activities, processor list, field notices and changelog entry, in English and German, as drafts.
Release consent-kit release Records the registry as released in privacy.lock.json and raises the consent revision when visitors have to be asked again.
Audit consent-kit audit <url> Drives the running site in Chromium and reports anything it does that the registry does not declare, or does before consent.
You are Read, in this order
A developer integrating consent-kit Getting started (or, for an app that already runs, add consent-kit to an existing app), the registry model, how consent flows at runtime, then the guides you need: write a registry entry, add a vendor with a preset, migrate to the storage facade, embed an iframe, loosen the CSP, run the audit in CI, release a policy change.
A product owner declaring purposes The registry model, material changes and re-consent, the purposes part of write a registry entry, release a policy change, FAQ.
A lawyer reviewing phrases and documents FAQ and compliance notes, documents and phrase review, record a legal review, documents reference, the threat model and known limits.
A contributor adding a preset Add a vendor with a preset, contribute a preset, presets reference.
An operator running the receipt endpoint Consent receipts, deploy the receipt endpoint, receipts and server reference.
An operator receiving data subject requests Data subject requests, receive data subject requests, subject requests reference.
Package What it provides
@consent-kit/cli The command line tool (the consent-kit command). Also re-exports the helpers a site’s build script needs.
@consent-kit/schema Registry types, JSON Schema, validation, and the diff between two registry versions.
@consent-kit/compiler Policy snapshot, CookieConsent config, guard manifest, Content-Security-Policy, consent-gated script tags and iframe placeholders.
@consent-kit/guard The browser runtime guard, as an inline script or an installable function.
@consent-kit/storage The typed, consent-aware storage facade, embed activation and the receipt sender.
@consent-kit/eslint-plugin The @consent-kit/no-raw-storage rule.
@consent-kit/documents The document generator and its English and German phrase library.
@consent-kit/presets Versioned, sourced declarations of third-party tools.
@consent-kit/audit The Playwright audit. An optional peer of consent-kit.
@consent-kit/server The receiving end of consent receipts: a Fetch API handler and a Cloudflare D1 adapter.

The published packages run on Node.js 22 or newer. Working on the repository itself needs Node.js 22.6 or newer and pnpm 10.

consent-kit

Generate your cookie banner and privacy-policy drafts from one registry, and audit what your site really does against it.

© 2026 consent-kit · Released under the MIT licence.