본문으로 건너뛰기
cccskills
무료GitHub에 공개

add-cli-option

Add a Remotion command-line or configuration option, or convert a hardcoded flag into a shared option definition. Connect parsing, configuration setters, help entries, and generated documentation so the option is consistently available and documented.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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.

설치 방법 보기

이럴 때 유용합니다

  • Add a new Remotion command-line flag
  • Convert a hardcoded flag into a shared option
  • Connect an option to Config setters
  • Update help entries and generate option documentation

포함된 파일(1)

  • SKILL.md6.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Add a new CLI option

How to convert a hardcoded CLI flag into a proper AnyRemotionOption, or add a brand new one.

1. Create the option definition

Create packages/renderer/src/options/<name>.tsx:

import type {AnyRemotionOption} from './option';

let myValue = false; // module-level default state

const cliFlag = 'my-flag' as const;

export const myFlagOption = {
  name: 'Human-readable Name',
  cliFlag,
  id: cliFlag,
  description: () => <>Description shown in docs.</>,
  ssrName: null, // or 'myFlag' if used in SSR APIs
  docLink: 'https://www.remotion.dev/docs/options/my-flag',
  type: false as boolean, // TypeScript type witness; defaults are resolved in getValue
  getValue: ({commandLine}) => {
    if (commandLine[cliFlag] !== undefined) {
      return {value: commandLine[cliFlag] as boolean, source: 'cli'};
    }
    return {value: myValue, source: 'config'};
  },
  setConfig(value) {
    myValue = value;
  },
} satisfies AnyRemotionOption<boolean>;

The type in AnyRemotionOption<T> and type: <value> as T determines the option's value type. Use boolean, string | null, number | null, etc.

The id must be unique and contain only lowercase letters, digits, and hyphens. It determines the /docs/options/<id> page and the <Options id="..." /> value. It usually matches cliFlag, but shared flags can have distinct option IDs.

Set docLink to https://www.remotion.dev/docs/options/<id>.

For negating flags (like --disable-ask-ai → askAIEnabled = false), handle the inversion in getValue.

2. Register in options index

packages/renderer/src/options/index.tsx:

  • Add the import (keep alphabetical within the import block)
  • Add the option to the allOptions object

This makes it available as BrowserSafeApis.options.myFlagOption throughout the codebase.

3. Update CLI parsed flags

packages/cli/src/parsed-cli.ts:

  • For boolean flags, add BrowserSafeApis.options.myFlagOption.cliFlag to the BooleanFlags array
  • For non-boolean flags, no entry needed here (minimist handles them as strings/numbers automatically)

packages/cli/src/parse-command-line.ts:

  • Add to the destructured BrowserSafeApis.options
  • In the CommandLineOptions type, add: [myFlagOption.cliFlag]: TypeOfOption<typeof myFlagOption>;

4. Use the option where needed

Instead of reading parsedCli['my-flag'] directly, resolve via:

const myFlag = myFlagOption.getValue({commandLine: parsedCli}).value;

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.

5. Add to Config

packages/cli/src/config/index.ts:

  • Add to the destructured BrowserSafeApis.options
  • Add the setter signature to the FlatConfig type (either in the RemotionConfigObject global interface or the FlatConfig intersection)
  • Add the implementation to the Config object: setMyFlagEnabled: myFlagOption.setConfig

6. Update docs — IMPORTANT, do not skip this step

This 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):

  • Add or update the ### \--my-flag`` section
  • Use <Options id="my-flag" /> as the description body (no import needed — it's globally available)
  • The id must match the option's id value

CLI help metadata: Add the flag to each supported command's option list in packages/cli/src/print-help.ts, packages/lambda/src/cli/help.ts, or packages/cloudrun/src/cli/help.ts. The generated option page uses the help entries' optionIds to list supported commands; ensure shared flags resolve to the correct option ID.

API pages: Document each public parameter under its own heading so the generated page can link to it.

packages/docs/docs/config.mdx:

  • Add or update the ## \setMyFlagEnabled()`` section with:
    • <Options id="my-flag" /> for the description
    • A twoslash config example
    • A link to /docs/options/<id> noting that the CLI flag takes precedence

Follow the pattern of nearby entries (e.g., setAskAIEnabled, setEnableCrossSiteIsolation).

Generated option reference: Generate packages/docs/docs/options/<id>.mdx and the options index using the commands below. Edit the option definition and API/config docs rather than the generated MDX. Option pages are added to the sidebar automatically.

7. Build and verify

# From the repository root
bun run build
cd packages/docs
bun run generate-option-docs
bun run render-cards
bun run check-option-docs

Verify /docs/options/<id> includes the description, supported commands, and relevant API/configuration links. Commit the generated page and index, the article catalog (packages/docs/src/data/articles.ts), and the new social preview card.

Reference files

  • Option type definition: packages/renderer/src/options/option.ts
  • Good example to copy: packages/renderer/src/options/ask-ai.tsx (boolean, studio-only)
  • Options index: packages/renderer/src/options/index.tsx
  • CLI flag registration: packages/cli/src/parsed-cli.ts
  • CLI type definitions: packages/cli/src/parse-command-line.ts
  • Config registration: packages/cli/src/config/index.ts

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

add-bug

무료

Add a reported Remotion bug to the bugs API with its affected versions, a short title, and upgrade guidance. Follow the existing entry format and place the new record first so recent bugs appear at the top.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding a reported bug to the Remotion bugs API
  • Recording which versions a bug affects
  • Including upgrade guidance in a bug description
remotion-dev/remotion6.5만2026년 10월 18일 업데이트

Add a new effect to @remotion/effects, including its implementation, package entry points, documentation, interactive demo, and preview images. Follow the package conventions and verify the changes with tests, formatting checks, and builds.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Implementing a new effect for @remotion/effects
  • Registering effect imports and parameter types
  • Creating documentation and an interactive effect demo
remotion-dev/remotion6.5만2026년 10월 18일 업데이트

Add a person to the Remotion experts page by placing their portrait, entering their profile and contact links, and generating an expert card image. The instructions specify file locations, profile fields, and how to verify card generation.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Add a new person to the Remotion experts page
  • Register a portrait, specialties, and contact links
  • Generate an expert card image
remotion-dev/remotion6.5만2026년 10월 18일 업데이트

Create a new @remotion package within the Remotion monorepo, a repository containing multiple packages. Set up its files, register it across the project, and prepare documentation, usage examples, and build configuration.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Creating a new @remotion package
  • Registering a package across the monorepo
  • Adding documentation and usage examples
remotion-dev/remotion6.5만2026년 10월 18일 업데이트

add-sfx

무료

Add a new sound effect to @remotion/sfx, from registering the audio file to exporting its URL and documenting its use. The workflow covers playback examples, attribution, navigation entries, waveform generation, and the package build.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Add a sound effect to @remotion/sfx
  • Create documentation with playback and usage examples
  • Update sound effect navigation and waveform data
remotion-dev/remotion6.5만2026년 10월 18일 업데이트

Add browser WebCodecs bugs to the Remotion Mediabunny documentation. It checks the linked issue’s title, filing date, reporter, and resolution, then adds a table row while preserving the existing format.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding a Chromium bug to the documentation
  • Recording WebKit or Firefox issues
  • Checking reporter details and fix status before adding a row
remotion-dev/remotion6.5만2026년 10월 18일 업데이트

remotion-dev의 스킬 모두 보기

이 스킬의 문제 신고