Quickstart

Run setup

The fastest path is the interactive setup command. It detects your framework, installs the right packages, configures the client, and drops in a banner + dialog.

You'll be asked:

  1. Which framework you're using (React, Next.js, or vanilla JavaScript).
  2. Whether you want a hosted instance (inth.com) or self-hosted backend.
  3. Where to write configuration files.

The CLI then:

  • Installs @c15t/react (or @c15t/nextjs, or c15t) and peers.
  • Adds the prebuilt stylesheet import to your app's CSS entrypoint.
  • Creates a ConsentManagerProvider wrapper component with ConsentBanner and ConsentDialog.
  • Writes any required environment variables.

When it finishes, run your dev server — the banner appears on first visit.

What if I'm migrating from v1?

Use codemods after upgrading the package versions. It rewrites legacy APIs (CookieBannerConsentBanner, gdprTypesconsentCategories, etc.) automatically.

See the codemods reference for the full list.

Self-hosted next steps

If you chose self-hosted during setup, run database migrations next:

See self-host for adapter-specific guidance.