npx skills add ...
npx skills add remotion-dev/remotion --skill add-cli-option
npx skills add remotion-dev/remotion --skill add-cli-option
Add a new Remotion CLI or config option by creating an AnyRemotionOption, registering CLI parsing, wiring config setters, and updating documentation. Use when adding or converting command-line flags or Remotion options.
How to convert a hardcoded CLI flag into a proper AnyRemotionOption, or add a brand new one.
Create packages/renderer/src/options/<name>.tsx:
The type in AnyRemotionOption<T> and type: <default> as T determines the option's value type. Use boolean, string | null, number | null, etc.
For negating flags (like --disable-ask-ai → askAIEnabled = false), handle the inversion in getValue.
packages/renderer/src/options/index.tsx:
allOptions objectThis makes it available as BrowserSafeApis.options.myFlagOption throughout the codebase.
packages/cli/src/parsed-cli.ts:
BrowserSafeApis.options.myFlagOption.cliFlag to the BooleanFlags arraypackages/cli/src/parse-command-line.ts:
BrowserSafeApis.optionsCommandLineOptions type, add: [myFlagOption.cliFlag]: TypeOfOption<typeof myFlagOption>;Instead of reading parsedCli['my-flag'] directly, resolve via:
For Studio options, this is typically in packages/cli/src/studio.ts. For render options, in the relevant render command file.
If the option is consumed by Studio, read ../studio-config-option-lifecycle/SKILL.md completely before wiring it. Classify the option as startup-fixed or reloadable across all Studio consumers; mixed behavior is not allowed. If any consumer requires startup-fixed behavior, pass the startup snapshot to every consumer. Add lifecycle tests that prove the classification.
packages/cli/src/config/index.ts:
BrowserSafeApis.optionsFlatConfig type (either in the RemotionConfigObject global interface or the FlatConfig intersection)Config object: setMyFlagEnabled: myFlagOption.setConfigThis step is mandatory. Every new option must have its docs updated to use <Options id="..." /> so the description is pulled from the option definition automatically (single source of truth). If converting an existing hardcoded flag, replace any hand-written description with the <Options> component.
CLI command pages (check all that apply — cli/render.mdx, lambda/cli/render.mdx, cloudrun/cli/render.mdx, cli/benchmark.mdx):
### \--my-flag`` section<Options id="my-flag" /> as the description body (no import needed — it's globally available)id must match the option's cliFlag / id valuepackages/docs/docs/config.mdx:
## \setMyFlagEnabled()`` section with:
<Options id="my-flag" /> for the descriptionFollow the pattern of nearby entries (e.g., setAskAIEnabled, setEnableCrossSiteIsolation).
packages/renderer/src/options/option.tspackages/renderer/src/options/ask-ai.tsx (boolean, studio-only)packages/renderer/src/options/index.tsxpackages/cli/src/parsed-cli.tspackages/cli/src/parse-command-line.tspackages/cli/src/config/index.tsconst myFlag = myFlagOption.getValue({commandLine: parsedCli}).value;cd packages/renderer && bun run make
cd packages/cli && bun run make