🎥 Make videos programmatically with React
`create-video`: Require `--tailwind` to add TailwindCSS
Jonny Burgera6189fd927b6
diff --git a/packages/create-video/src/help.ts b/packages/create-video/src/help.tsindex 569a63884b..d5d3a3b0ef 100644--- a/packages/create-video/src/help.ts+++ b/packages/create-video/src/help.ts@@ -35,10 +35,13 @@ export const getCreateVideoHelp = () => {description:'Enable non-interactive mode. Requires a template flag and a directory, unless --tmp is used.',}),+ formatOption({+ flag: '--tailwind',+ description: 'Install TailwindCSS for supported templates.',+ }),formatOption({flag: '--no-tailwind',- description:- 'Skip automatic TailwindCSS installation for supported templates.',+ description: 'Skip TailwindCSS installation (the default).',}),formatOption({flag: '--tmp',diff --git a/packages/create-video/src/init.ts b/packages/create-video/src/init.tsindex b7256f97b8..3394a35ca4 100644--- a/packages/create-video/src/init.ts+++ b/packages/create-video/src/init.ts@@ -27,7 +27,7 @@ import {resolveProjectRoot} from './resolve-project-root';import {getDirectoryArgument,isHelpFlagSelected,- isNoTailwindFlagSelected,+ isTailwindFlagSelected,isTmpFlagSelected,isYesFlagSelected,selectTemplate,@@ -160,7 +160,7 @@ export const init = async () => {});const shouldOverrideTailwind =- selectedTemplate.allowEnableTailwind && !isNoTailwindFlagSelected();+ selectedTemplate.allowEnableTailwind && isTailwindFlagSelected();const skillsInstallation = isYesFlagSelected() ? null : await askSkills();diff --git a/packages/create-video/src/select-template.ts b/packages/create-video/src/select-template.tsindex f20a6fe9f7..aba12fd662 100644--- a/packages/create-video/src/select-template.ts+++ b/packages/create-video/src/select-template.ts@@ -10,8 +10,7 @@ const ALL_TEMPLATES = [...FEATURED_TEMPLATES, ...PAID_TEMPLATES];type Options = {tmp: boolean;yes: boolean;- 'no-tailwind': boolean;- tailwind: boolean | undefined;+ tailwind: boolean;help: boolean;};@@ -20,7 +19,7 @@ const parsed = minimist<Options>(process.argv.slice(2), {...ALL_TEMPLATES.map((f) => f.cliId),'tmp','yes',- 'no-tailwind',+ 'tailwind','help',],string: ['_'],@@ -31,7 +30,7 @@ export const isTmpFlagSelected = () => parsed.tmp;export const isYesFlagSelected = () => parsed.yes;-export const isNoTailwindFlagSelected = () => parsed.tailwind === false;+export const isTailwindFlagSelected = () => parsed.tailwind;export const isHelpFlagSelected = () => parsed.help;diff --git a/packages/docs/docs/ai/coding-agents.mdx b/packages/docs/docs/ai/coding-agents.mdxindex 4245b70d1b..4895ea2594 100644--- a/packages/docs/docs/ai/coding-agents.mdx+++ b/packages/docs/docs/ai/coding-agents.mdx@@ -22,7 +22,7 @@ Most coding agents require a paid subscription.Create a new project using the following command:```bash-npx create-video --yes --blank --no-tailwind my-video+npx create-video --yes --blank my-video```This creates a [Blank](https://remotion.dev/templates/blank) project in the `my-video` directory.diff --git a/packages/docs/docs/cli/create-video.mdx b/packages/docs/docs/cli/create-video.mdxindex 7ec2d7c15c..7da0316d7b 100644--- a/packages/docs/docs/cli/create-video.mdx+++ b/packages/docs/docs/cli/create-video.mdx@@ -37,7 +37,7 @@ Requires a template flag and a directory argument.When used:-- TailwindCSS is installed if the template supports it (disable with `--no-tailwind`)+- TailwindCSS is added only with [`--tailwind`](#--tailwind) for supported templates- Agent skills are not installed- The editor is not opened- If already inside a Git repository, the command fails@@ -50,14 +50,18 @@ npx create-video --yes --blank my-videoAlias for `--yes`.-### `--no-tailwind`<AvailableFrom v="4.0.439" />+### `--tailwind`<AvailableFrom v="4.0.534" />-Skip automatic TailwindCSS installation for supported templates. Works with or without `--yes` and does not change templates with their own TailwindCSS setup.+Install [TailwindCSS](/docs/tailwind) for supported templates. Works with or without `--yes`. TailwindCSS is not added by default, and templates with their own TailwindCSS setup keep it.-```bash-npx create-video --yes --blank --no-tailwind my-video+```bash title="Create a project with TailwindCSS"+npx create-video --yes --blank --tailwind my-video```+### `--no-tailwind`<AvailableFrom v="4.0.439" />++Skip TailwindCSS installation. This is the default and does not affect templates with their own TailwindCSS setup.+### `--tmp`<AvailableFrom v="4.0.214" />Create the project in a temporary directory instead of specifying a directory name.@@ -100,17 +104,17 @@ npx create-video --yes --blank my-videoWhen using `--yes`:-- TailwindCSS is installed if the template supports it. Pass [`--no-tailwind`](#--no-tailwind) to skip it.+- TailwindCSS is added only with [`--tailwind`](#--tailwind) for supported templates.- [Agent skills](/docs/ai/skills) are not installed. You can add them manually afterwards by running [`npx skills add remotion-dev/skills`](/docs/cli/skills) in the project directory.- The editor is not opened after scaffolding.- The command fails if you are already inside a Git repository.### Examples-Without TailwindCSS:+With TailwindCSS:-```bash-npx create-video --yes --blank --no-tailwind my-video+```bash title="Create a project with TailwindCSS"+npx create-video --yes --blank --tailwind my-video```In a temporary directory:diff --git a/packages/docs/docs/getting-started.mdx b/packages/docs/docs/getting-started.mdxindex 58fe8b2ec7..195a6746de 100644--- a/packages/docs/docs/getting-started.mdx+++ b/packages/docs/docs/getting-started.mdx@@ -26,7 +26,7 @@ Paste into a coding agent, such as Claude Code, Codex or OpenCode:## From the command line```sh-npx create-video@latest --yes --blank --no-tailwind my-video+npx create-video@latest --yes --blank my-videocd my-videonpx remotion skills addnpm run dev@@ -47,7 +47,7 @@ For your first project, we recommend the [Hello World](/templates/hello-world) t## Wizard-Customize the creation of a Remotion project by selecting a package manager, a template and whether to enable Tailwind and Agent Skills.+Customize the creation of a Remotion project by selecting a package manager, a template and whether to install Agent Skills.<TabsdefaultValue="npm"diff --git a/packages/docs/docs/tailwind.mdx b/packages/docs/docs/tailwind.mdxindex 716d1b4a5b..f935f21cae 100644--- a/packages/docs/docs/tailwind.mdx+++ b/packages/docs/docs/tailwind.mdx@@ -11,7 +11,7 @@ import {TailwindSupport} from '../components/TailwindSupport';## Using the CLI-The easiest way to get started with Tailwind is by scaffolding a new video using the CLI and selecting a template that supports adding Tailwind automatically.+To scaffold a new video with TailwindCSS, pass [`--tailwind`](/docs/cli/create-video#--tailwind) to the CLI and select a supported template.<TabsdefaultValue="npm"@@ -24,29 +24,29 @@ values={[}><TabItem value="npm">-```bash-npx create-video@latest+```bash title="Create a project with npm"+npx create-video@latest --tailwind```</TabItem><TabItem value="pnpm">-```bash-pnpm create video+```bash title="Create a project with pnpm"+pnpm create video --tailwind```</TabItem><TabItem value="bun">-```bash-bun create video+```bash title="Create a project with Bun"+bun create video --tailwind```</TabItem><TabItem value="yarn">-```bash-yarn create video+```bash title="Create a project with Yarn"+yarn create video --tailwind```</TabItem>