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:
- Which framework you're using (React, Next.js, or vanilla JavaScript).
- Whether you want a hosted instance (inth.com) or self-hosted backend.
- Where to write configuration files.
The CLI then:
- Installs
@c15t/react(or@c15t/nextjs, orc15t) and peers. - Adds the prebuilt stylesheet import to your app's CSS entrypoint.
- Creates a
ConsentManagerProviderwrapper component withConsentBannerandConsentDialog. - 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 (CookieBanner → ConsentBanner, gdprTypes → consentCategories, 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.