Commands
setup
Plan and apply
Replace https://your-project.inth.app with the backend URL from your Inth
project. Any explicit flag makes setup non-interactive and returns a read-only
plan, even in a terminal. Add --apply or --yes to write files.
Setup installs missing c15t packages from the CLI's release line. A prerelease
CLI uses its dist-tag, so @c15t/cli@alpha installs c15t@alpha. A stable CLI
uses its major version, such as c15t@3. A c15t package already in
package.json stays as it is when its range can resolve to that release line.
A range on another major, such as ^2, is installed again from the CLI's
line.
For TanStack Start, Vue, Nuxt, Svelte, SvelteKit, Solid and Astro, pass
--framework. That selects framework boilerplate,
which has its own options.
Setup with Codex
Use setup --codex to give your installed Codex CLI the default c15t v3
frontend task. Add --plan --json to inspect the prompt without launching it.
With --plan or --dry-run, the CLI prints the prompt to stdout as plain
text, copies it to your clipboard and confirms the copy. If clipboard access
fails, copy the printed prompt or redirect it with > prompt.txt; status
messages stay out of the redirected file. --json exports the prompt without
accessing the clipboard.
See agent setup
for inputs and requirements. generate keeps the deterministic setup workflow.
Choose the mode and backend
Pass the mode as the first argument or with --mode:
| Mode | Backend |
|---|---|
hosted | Inth or a self-hosted backend. Requires --backend-url, or an Inth project through --project or the application preference set by projects select. |
offline | No backend. Choices stay in the browser. Not recommended for production environments. |
custom | Your own transport. |
The older mode names c15t and self-hosted map to hosted. Setup refuses an
Inth project that is still provisioning, because it has no backend URL yet.
Options
| Option | Purpose |
|---|---|
--plan, --dry-run | Return the proposed file edits without writing files or installing packages. |
--apply | Write the file edits and install missing packages. |
--skip-install | Write the file edits without running a package manager. |
--backend-url <url> | Use this HTTP or HTTPS backend URL. |
--project <id, name or organization/name> | Use the backend URL of a signed-in Inth project. |
--proxy | Add a Next.js rewrite to the hosted backend. Hosted Next.js only. |
--ssr | Start consent resolution on the server in a hosted Next.js App Router app. The wrapper passes the pending result to the provider, so pages render without waiting for the backend and the banner follows in a later chunk, before hydration. |
--devtools | Include c15t DevTools. |
--ui-style prebuilt or expanded | Use the stock components or their compound parts. React and Next.js only. |
--theme none, minimal, dark or tailwind | Apply a theme preset. React and Next.js only. |
--scripts <ids> | Add consent-aware vendor scripts, as a comma-separated list. An unknown ID returns the list of valid IDs. |
--resume | Recover an interrupted setup. |
--debug | Log setup state transitions. |
Without flags for them, non-interactive setup uses the stock components, no theme, no scripts, and no proxy, server resolution or DevTools. Replace the placeholder IDs in generated script configuration before you deploy.
Set up styles and Tailwind CSS
React and Next.js components render their own styles by default. Setup leaves your global CSS unchanged with Tailwind CSS 4 or without Tailwind.
When you choose a theme preset, the generated provider renders ConsentTheme
to apply the tokens in theme.ts. Passing theme in the provider options alone
does not generate CSS. The None preset keeps c15t's default styles.
Put a global reset such as * { padding: 0; margin: 0; } in @layer base.
An unlayered reset outranks c15t's layered component styles and removes the
banner and dialog spacing. Setup leaves those rules alone. Keep intentional
component overrides outside that layer.
Setup recognizes Tailwind CSS 3 version ranges, including >=3.4.17 <4.
With Tailwind CSS 3, setup imports c15t's styles.css in your global CSS and
sets styles: false in the generated provider. Tailwind's PostCSS build must
process the external stylesheet. Setup follows local CSS imports in the
application entrypoint, including semicolon-free imports and aliases from
tsconfig.json or jsconfig.json, then checks conventional global stylesheet
paths. Aliases outside the project are skipped. If setup cannot find a
stylesheet, it warns you to add the import yourself. Setup also:
- Puts the import above the
@tailwinddirectives, and replaces astyles.tw3.cssimport from an earlier setup. - Adds the plugin from the package it installed, such as
c15t/postcss-tailwind3, beforetailwindcssin your PostCSS config. It edits onepostcss.config.*or.postcssrc*file, in either the object or the array form, and leaves a config that already runs a c15tpostcss-tailwind3plugin alone. - Uses important modifiers in the Tailwind preset, such as
hover:!bg-blue-700, so the generated utilities override c15t's component styles. Tailwind CSS 4 uses ordinary utilities instead.
Setup prints the PostCSS change to make by hand when it finds no config, finds
several config files, finds the config in the postcss key of package.json,
or cannot edit the plugin list, such as a YAML file. A non-interactive run
logs these warnings and lists them in warnings in its result.
Tailwind CSS shows the
finished setup.
Create React App ignores PostCSS config files, so Tailwind 3 cannot run the
plugin and the build fails on c15t's stylesheet. Setup warns about
this. Add the plugin before tailwindcss through CRACO, eject, or move the app
to Vite.
How setup changes files
The plan holds each file's current and proposed text. When applying, setup checks that each file still matches the current text before writing it. If writing fails, setup restores the files it already changed and reports any file it could not restore. It never overwrites a change another process made after the plan.
Symlinks are allowed when their targets stay inside the project. Planning rejects dangling symlinks and symlinks that point outside the project.
Installing packages is a separate step from writing files. If the install
fails, setup restores the generated files, but changes the package manager made
to package.json, the lockfile or node_modules can remain.
An interrupted apply leaves a .c15t-generation.json recovery file. --resume
restores the files from it and plans again. If a file changed since the
interruption, recovery stops so you can review it. A non-interactive resume
needs --apply or --yes, and cannot be combined with --plan or --dry-run.