@c15t/cli: Cookie consent setup CLI
Set up a c15t cookie consent banner for React, Next.js, and other supported frameworks, preview file edits, and configure consent integrations. Choose a hosted backend, a self-hosted backend, or local mode for development and tests.
c15t is used by 2,100+ sites, including expo.dev, zed.dev, unkey.dev, mintlify.com, and sazabi.com.
Key Features
- V3 quickstart files for Next.js, Nuxt, TanStack Start, Astro, React, JavaScript, a script tag, Vue, Svelte, SvelteKit, and Solid
- Preview and apply integration files with explicit framework wiring instructions
- Use prepared local package snapshots before v3 is published
- Add consent-aware script integration examples
- Manage hosted authentication and projects, or plan self-hosted database migrations
- Structured JSON results and a reusable command runner for automation
- Explicit legacy v1-to-v2 codemods with dry runs
- Agent skill installation
Prerequisites
- Node.js 20.19 or later
- npm, pnpm, or yarn package manager
Quick Start
Easiest setup with @c15t/cli:
# Set up c15t in your project
pnpm dlx @c15t/cli setup
# Alternatives:
# npx @c15t/cli setup
# bunx --bun @c15t/cli setup
The CLI will:
- Install necessary packages
- Configure your c15t instance
- Set up environment variables
- Add consent management components to your app
Usage
- Build the CLI from the checkout with bun run --cwd packages/cli build
- Preview unpublished v3 boilerplate: node packages/cli/dist/bin.mjs generate offline --framework react --cwd /path/to/app --plan --json
- Repeat with --apply to create files, then follow the generated README to connect them to your application
- Use --package-source with prepared local snapshots to avoid fetching unpublished v3 packages
Available Commands
setup: Set up c15t in your projectcodemods: Run migration codemods for c15t upgradesself-host: Self-hosted workflow commands (currently database migrations)skills: Install c15t agent skills for AI-assisted developmentchangelog: Open the c15t changelog in your browsergithub: Open the project's GitHub repository to star the projectdocs: Open the c15t documentation in your browser
Global Flags
--help: Display help menu--version: Show CLI version--no-telemetry: Disable anonymous usage data collection
Telemetry
Anonymous usage data collection to help improve the CLI
- Not personally identifiable
- Used to prioritize features and improvements
- Completely optional
Disable telemetry by:
- Use the
--no-telemetryflag - Set
C15T_TELEMETRY_DISABLED=1in your environment
Documentation
See the documentation for guides, API reference, and examples.
Setup Paths
- Hosted on inth.com: Configure a hosted c15t instance
- Self-hosted backend: Generate config and run database migrations for @c15t/backend
- Local mode: Generate a browser-only setup for development and tests. c15t keeps no server-side record of consent
Support
- Join our Discord community
- Open an issue on our GitHub repository
- Visit inth.com and use the chat widget
- Contact our support team via email [email protected]
Contributing
- Read the contribution guidelines before you open a pull request
- Follow the code of conduct
Security
Do not open a public issue for a security vulnerability. Report it privately through GitHub's vulnerability reporting. We examine every valid report.
- Do not share the vulnerability in public forums, issues, or pull requests
- Give the steps to reproduce it and the versions it affects
- Give us time to release a fix before you disclose it
License
Built by Inth