add-cli-option

Add or convert Remotion CLI and config options following the AnyRemotionOption pattern.

57.9k|4.4k|Updated Jun 23, 2020
One-click install
npx skills add https://github.com/remotion-dev/remotion --skill add-cli-option
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-cli-option
Source: https://github.com/remotion-dev/remotion/tree/main/.agents/skills/add-cli-option
Command: npx skills add https://github.com/remotion-dev/remotion --skill add-cli-option

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adding a new command-line flag or Remotion config option requires touching multiple packages, registering the option in several indexes, and keeping documentation in sync. This Skill provides a single, repeatable procedure so the option behaves identically across CLI, config, and Studio.

Core Features & Use Cases

  • Option Definition Pattern: Create an AnyRemotionOption in packages/renderer/src/options/ with typed defaults, CLI flag, SSR name, doc link, getter, and setter.
  • Cross-Package Wiring: Register the option in the renderer index, CLI parsed flags, command-line types, and the Config object.
  • Documentation Sync: Update CLI command pages and config.mdx to use the <Options id="..." /> component as the single source of truth.
  • Use Case: Convert a hardcoded --my-flag boolean into a first-class Remotion option so it can be set via CLI, Config.setMyFlagEnabled(), and surfaced in docs without duplication.

Quick Start

Add a new boolean Remotion CLI option called my-flag by creating the AnyRemotionOption definition, registering it across the renderer and CLI packages, wiring the Config setter, and updating the docs to use the Options component.

Frequently Asked Questions about add-cli-option

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new CLI flag to Remotion?

Create an AnyRemotionOption in packages/renderer/src/options/, register it in the options index, add the cliFlag to BooleanFlags in parsed-cli.ts, and wire the setter in packages/cli/src/config/index.ts. Documentation must use the Options component.

What is AnyRemotionOption in Remotion?

AnyRemotionOption is the typed option definition interface in packages/renderer/src/options/option.ts. It bundles the CLI flag, default value, getter, setter, SSR name, and doc link so the same option works across CLI, config, and Studio.

How do I convert a hardcoded CLI flag into a Remotion config option?

Replace direct parsedCli reads with an AnyRemotionOption that exposes a getValue and setConfig. Register the option in the renderer index, add the setter to the Config object, and replace hand-written docs with the Options component referencing the cliFlag id.

Does Remotion support negating CLI flags like --disable-ask-ai?

Yes. Negating flags are handled inside the option's getValue function by inverting the parsed CLI value before returning it. The cliFlag stays as the user-facing flag name while the internal boolean reflects the enabled state.

Why must Remotion CLI options update config.mdx?

Documentation must use the Options component with the cliFlag id so descriptions stay in sync with the option definition. This avoids drift between CLI help text, config docs, and the actual implementation.