@remotion/cli 4.0.521 → 4.0.522

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1,2 @@
1
+ export declare const tryPrintCloudrunHelp: (remotionRoot: string, args: string[], logLevel: "error" | "info" | "trace" | "verbose" | "warn") => boolean;
1
2
  export declare const cloudrunCommand: (remotionRoot: string, args: string[], logLevel: "error" | "info" | "trace" | "verbose" | "warn") => Promise<never>;
@@ -1,8 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cloudrunCommand = void 0;
3
+ exports.cloudrunCommand = exports.tryPrintCloudrunHelp = void 0;
4
4
  const studio_server_1 = require("@remotion/studio-server");
5
5
  const log_1 = require("./log");
6
+ const tryPrintCloudrunHelp = (remotionRoot, args, logLevel) => {
7
+ let path;
8
+ try {
9
+ path = require.resolve('@remotion/cloudrun/internal/help', {
10
+ paths: [remotionRoot],
11
+ });
12
+ }
13
+ catch (_a) {
14
+ return false;
15
+ }
16
+ try {
17
+ const { printHelp } = require(path);
18
+ if (typeof printHelp !== 'function') {
19
+ return false;
20
+ }
21
+ printHelp(args, logLevel);
22
+ return true;
23
+ }
24
+ catch (_b) {
25
+ return false;
26
+ }
27
+ };
28
+ exports.tryPrintCloudrunHelp = tryPrintCloudrunHelp;
6
29
  const cloudrunCommand = async (remotionRoot, args, logLevel) => {
7
30
  try {
8
31
  const path = require.resolve('@remotion/cloudrun', {
@@ -0,0 +1,29 @@
1
+ export type CommandHelpOption = {
2
+ flag: string;
3
+ description: string;
4
+ };
5
+ export type CommandHelpEntry = {
6
+ path: readonly string[];
7
+ args: string;
8
+ description: string;
9
+ documentation: string;
10
+ options: readonly CommandHelpOption[];
11
+ listed?: boolean;
12
+ };
13
+ type RemotionOptionForHelp = {
14
+ cliFlag: string;
15
+ name: string;
16
+ type: unknown;
17
+ };
18
+ export declare const makeCommandHelpOption: ({ option, description, value, }: {
19
+ option: RemotionOptionForHelp;
20
+ description?: string | undefined;
21
+ value?: string | null | undefined;
22
+ }) => CommandHelpOption;
23
+ export declare const getCommandHelp: ({ binaryName, commands, selectedPath, rootDocumentation, }: {
24
+ binaryName: string;
25
+ commands: readonly CommandHelpEntry[];
26
+ selectedPath: readonly string[];
27
+ rootDocumentation: string;
28
+ }) => string[];
29
+ export {};
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCommandHelp = exports.makeCommandHelpOption = void 0;
4
+ const chalk_1 = require("./chalk");
5
+ const makeCommandHelpOption = ({ option, description, value, }) => {
6
+ const valueSuffix = value === null
7
+ ? ''
8
+ : ` ${value !== null && value !== void 0 ? value : (typeof option.type === 'boolean' ? '' : '<value>')}`;
9
+ return {
10
+ flag: `--${option.cliFlag}${valueSuffix}`.trimEnd(),
11
+ description: description !== null && description !== void 0 ? description : option.name,
12
+ };
13
+ };
14
+ exports.makeCommandHelpOption = makeCommandHelpOption;
15
+ const commandMatches = (command, selectedPath) => command.path.every((part, index) => selectedPath[index] === part) &&
16
+ selectedPath.length >= command.path.length;
17
+ const formatOption = (option, width) => {
18
+ return ` ${chalk_1.chalk.blue(option.flag.padEnd(width))}${option.description}`;
19
+ };
20
+ const getCommandHelp = ({ binaryName, commands, selectedPath, rootDocumentation, }) => {
21
+ const selectedCommand = commands
22
+ .filter((command) => commandMatches(command, selectedPath))
23
+ .sort((a, b) => b.path.length - a.path.length)[0];
24
+ if (selectedCommand) {
25
+ const displayPath = selectedPath
26
+ .slice(0, selectedCommand.path.length)
27
+ .join(' ');
28
+ const selectedBinaryName = displayPath
29
+ ? `${binaryName} ${displayPath}`
30
+ : binaryName;
31
+ const children = commands.filter((command) => command.listed !== false &&
32
+ command.path.length === selectedCommand.path.length + 1 &&
33
+ selectedCommand.path.every((part, index) => command.path[index] === part));
34
+ const options = [
35
+ ...selectedCommand.options,
36
+ { flag: '--help', description: 'Show this help.' },
37
+ ];
38
+ const optionWidth = Math.max(...options.map((option) => option.flag.length)) + 2;
39
+ const commandLines = [
40
+ '',
41
+ chalk_1.chalk.blue(selectedBinaryName) + chalk_1.chalk.gray(selectedCommand.args),
42
+ selectedCommand.description,
43
+ ];
44
+ if (children.length > 0) {
45
+ commandLines.push('', 'Commands:');
46
+ for (const child of children) {
47
+ commandLines.push('', chalk_1.chalk.blue(`${binaryName} ${child.path.join(' ')}`) +
48
+ chalk_1.chalk.gray(child.args), child.description);
49
+ }
50
+ }
51
+ commandLines.push('', 'Options:', ...options.map((option) => formatOption(option, optionWidth)), '', chalk_1.chalk.gray(`Full documentation: ${selectedCommand.documentation}`));
52
+ return commandLines;
53
+ }
54
+ const lines = ['', 'Available commands:'];
55
+ for (const command of commands) {
56
+ if (command.path.length !== 1 || command.listed === false) {
57
+ continue;
58
+ }
59
+ lines.push('', chalk_1.chalk.blue(`${binaryName} ${command.path[0]}`) + chalk_1.chalk.gray(command.args), command.description, chalk_1.chalk.gray(command.documentation));
60
+ }
61
+ lines.push('', `Visit ${rootDocumentation} for browsable CLI documentation.`);
62
+ return lines;
63
+ };
64
+ exports.getCommandHelp = getCommandHelp;
@@ -0,0 +1,4 @@
1
+ export declare const getVideoImageFormat: ({ codec, uiImageFormat, }: {
2
+ codec: import("@remotion/renderer").CodecOrUndefined;
3
+ uiImageFormat: "jpeg" | "none" | "png" | null;
4
+ }) => "jpeg" | "none" | "png";
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getVideoImageFormat = void 0;
4
+ const client_1 = require("@remotion/renderer/client");
5
+ const pure_1 = require("@remotion/renderer/pure");
6
+ const parsed_cli_1 = require("./parsed-cli");
7
+ const getVideoImageFormat = ({ codec, uiImageFormat, }) => {
8
+ if (uiImageFormat !== null) {
9
+ return uiImageFormat;
10
+ }
11
+ const configured = client_1.BrowserSafeApis.options.videoImageFormatOption.getValue({
12
+ commandLine: parsed_cli_1.parsedCli,
13
+ }).value;
14
+ if (configured !== null) {
15
+ return configured;
16
+ }
17
+ if (pure_1.NoReactAPIs.isAudioCodec(codec)) {
18
+ return 'none';
19
+ }
20
+ if (codec === 'h264' ||
21
+ codec === 'h264-mkv' ||
22
+ codec === 'h264-ts' ||
23
+ codec === 'h265' ||
24
+ codec === 'av1' ||
25
+ codec === 'vp8' ||
26
+ codec === 'vp9' ||
27
+ codec === 'prores' ||
28
+ codec === 'gif') {
29
+ return 'jpeg';
30
+ }
31
+ if (codec === undefined) {
32
+ return 'png';
33
+ }
34
+ throw new Error('Unrecognized codec ' + codec);
35
+ };
36
+ exports.getVideoImageFormat = getVideoImageFormat;
package/dist/index.d.ts CHANGED
@@ -186,6 +186,21 @@ export declare const CliInternals: {
186
186
  disableGitSource: boolean;
187
187
  logLevel: "error" | "info" | "trace" | "verbose" | "warn";
188
188
  }) => import("@remotion/studio-shared").GitSource | null;
189
+ getCommandHelp: ({ binaryName, commands, selectedPath, rootDocumentation, }: {
190
+ binaryName: string;
191
+ commands: readonly import("./command-help").CommandHelpEntry[];
192
+ selectedPath: readonly string[];
193
+ rootDocumentation: string;
194
+ }) => string[];
195
+ makeCommandHelpOption: ({ option, description, value, }: {
196
+ option: {
197
+ cliFlag: string;
198
+ name: string;
199
+ type: unknown;
200
+ };
201
+ description?: string | undefined;
202
+ value?: string | null | undefined;
203
+ }) => import("./command-help").CommandHelpOption;
189
204
  handleCtrlC: ({ indent, logLevel, exit, }: {
190
205
  indent: boolean;
191
206
  logLevel: "error" | "info" | "trace" | "verbose" | "warn";
package/dist/index.js CHANGED
@@ -17,6 +17,7 @@ const chalk_1 = require("./chalk");
17
17
  const check_for_npm_run_flag_pass_1 = require("./check-for-npm-run-flag-pass");
18
18
  const cleanup_before_quit_1 = require("./cleanup-before-quit");
19
19
  const cloudrun_command_1 = require("./cloudrun-command");
20
+ const command_help_1 = require("./command-help");
20
21
  const compositions_1 = require("./compositions");
21
22
  const determine_image_format_1 = require("./determine-image-format");
22
23
  const download_progress_1 = require("./download-progress");
@@ -50,6 +51,23 @@ const { packageManagerOption, skipSkillsOption, versionFlagOption } = client_1.B
50
51
  const cli = async () => {
51
52
  var _a;
52
53
  const [command, ...args] = parsed_cli_1.parsedCli._;
54
+ const helpPath = command === 'help' && (args.length > 0 || !parsed_cli_1.parsedCli.help)
55
+ ? args
56
+ : parsed_cli_1.parsedCli._;
57
+ if (parsed_cli_1.parsedCli.help || command === 'help') {
58
+ const [helpCommand, ...helpArgs] = helpPath;
59
+ if (helpCommand === 'lambda' || helpCommand === 'cloudrun') {
60
+ const helpRemotionRoot = renderer_1.RenderInternals.findRemotionRoot();
61
+ const printed = helpCommand === 'lambda'
62
+ ? (0, lambda_command_1.tryPrintLambdaHelp)(helpRemotionRoot, helpArgs, 'info')
63
+ : (0, cloudrun_command_1.tryPrintCloudrunHelp)(helpRemotionRoot, helpArgs, 'info');
64
+ if (printed) {
65
+ return;
66
+ }
67
+ }
68
+ (0, print_help_1.printHelp)('info', helpPath);
69
+ return;
70
+ }
53
71
  const packageManager = packageManagerOption.getValue({
54
72
  commandLine: parsed_cli_1.parsedCli,
55
73
  }).value;
@@ -149,18 +167,11 @@ const cli = async () => {
149
167
  else if (command === 'benchmark') {
150
168
  await (0, benchmark_1.benchmarkCommand)(remotionRoot, args, logLevel);
151
169
  }
152
- else if (command === 'help') {
153
- (0, print_help_1.printHelp)(logLevel);
154
- process.exit(0);
155
- }
156
- else if (parsed_cli_1.parsedCli.help) {
157
- (0, print_help_1.printHelp)(logLevel);
158
- }
159
170
  else {
160
171
  if (command) {
161
172
  log_1.Log.error({ indent: false, logLevel }, `Command ${command} not found.`);
162
173
  }
163
- (0, print_help_1.printHelp)(logLevel);
174
+ (0, print_help_1.printHelp)(logLevel, []);
164
175
  process.exit(1);
165
176
  }
166
177
  }
@@ -203,6 +214,8 @@ exports.CliInternals = {
203
214
  makeHyperlink: make_link_1.makeHyperlink,
204
215
  supportsHyperlink: is_supported_1.supportsHyperlink,
205
216
  getGitSource: get_github_repository_1.getGitSource,
217
+ getCommandHelp: command_help_1.getCommandHelp,
218
+ makeCommandHelpOption: command_help_1.makeCommandHelpOption,
206
219
  handleCtrlC: cleanup_before_quit_1.handleCtrlC,
207
220
  registerCtrlCHandler: cleanup_before_quit_1.registerCtrlCHandler,
208
221
  };
@@ -1 +1,2 @@
1
+ export declare const tryPrintLambdaHelp: (remotionRoot: string, args: string[], logLevel: "error" | "info" | "trace" | "verbose" | "warn") => boolean;
1
2
  export declare const lambdaCommand: (remotionRoot: string, args: string[], logLevel: "error" | "info" | "trace" | "verbose" | "warn") => Promise<never>;
@@ -1,8 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lambdaCommand = void 0;
3
+ exports.lambdaCommand = exports.tryPrintLambdaHelp = void 0;
4
4
  const studio_server_1 = require("@remotion/studio-server");
5
5
  const log_1 = require("./log");
6
+ const tryPrintLambdaHelp = (remotionRoot, args, logLevel) => {
7
+ let path;
8
+ try {
9
+ path = require.resolve('@remotion/lambda/internal/help', {
10
+ paths: [remotionRoot],
11
+ });
12
+ }
13
+ catch (_a) {
14
+ return false;
15
+ }
16
+ try {
17
+ const { printHelp } = require(path);
18
+ if (typeof printHelp !== 'function') {
19
+ return false;
20
+ }
21
+ printHelp(args, logLevel);
22
+ return true;
23
+ }
24
+ catch (_b) {
25
+ return false;
26
+ }
27
+ };
28
+ exports.tryPrintLambdaHelp = tryPrintLambdaHelp;
6
29
  const lambdaCommand = async (remotionRoot, args, logLevel) => {
7
30
  try {
8
31
  const path = require.resolve('@remotion/lambda', {
@@ -1 +1 @@
1
- export declare const printHelp: (logLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
1
+ export declare const printHelp: (logLevel: "error" | "info" | "trace" | "verbose" | "warn", selectedPath: readonly string[]) => void;
@@ -1,68 +1,491 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.printHelp = void 0;
4
+ const client_1 = require("@remotion/renderer/client");
4
5
  const browser_1 = require("./browser");
5
- const chalk_1 = require("./chalk");
6
+ const command_help_1 = require("./command-help");
6
7
  const gpu_1 = require("./gpu");
7
8
  const log_1 = require("./log");
8
9
  const versions_1 = require("./versions");
9
10
  const packagejson = require('../package.json');
10
- const printHelp = (logLevel) => {
11
- log_1.Log.info({ indent: false, logLevel }, `@remotion/cli ${packagejson.version}`);
12
- log_1.Log.info({ indent: false, logLevel }, `© ${new Date().getFullYear()} Remotion AG`);
13
- log_1.Log.info({ indent: false, logLevel });
14
- log_1.Log.info({ indent: false, logLevel }, 'Available commands:');
15
- log_1.Log.info({ indent: false, logLevel });
16
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue('remotion studio') + chalk_1.chalk.gray(' <entry-point.ts>'));
17
- log_1.Log.info({ indent: false, logLevel }, 'Start the Remotion studio.');
18
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/studio'));
19
- log_1.Log.info({ indent: false, logLevel });
20
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue('remotion render') +
21
- chalk_1.chalk.gray(' <entry-point.ts> <comp-id> <output-file.mp4>'));
22
- log_1.Log.info({ indent: false, logLevel }, 'Render video, audio or an image sequence.');
23
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/render'));
24
- log_1.Log.info({ indent: false, logLevel });
25
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue('remotion still') +
26
- chalk_1.chalk.gray(' <entry-point.ts> <comp-id> <still.png>'));
27
- log_1.Log.info({ indent: false, logLevel }, 'Render a still frame and save it as an image.');
28
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/still'));
29
- log_1.Log.info({ indent: false, logLevel });
30
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue('remotion bundle') + chalk_1.chalk.gray(' <entry-point.ts>'));
31
- log_1.Log.info({ indent: false, logLevel }, 'Create a Remotion bundle to be deployed to the web.');
32
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/bundle'));
33
- log_1.Log.info({ indent: false, logLevel });
34
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue('remotion compositions') + chalk_1.chalk.gray(' <index-file.ts>'));
35
- log_1.Log.info({ indent: false, logLevel }, 'Prints the available compositions.');
36
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/compositions'));
37
- log_1.Log.info({ indent: false, logLevel });
38
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue('remotion benchmark') +
39
- chalk_1.chalk.gray(' <index-file.ts> <list-of-compositions>'));
40
- log_1.Log.info({ indent: false, logLevel }, 'Benchmarks rendering a composition. Same options as for render.');
41
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/benchmark'));
42
- log_1.Log.info({ indent: false, logLevel });
43
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue('remotion ' + versions_1.VERSIONS_COMMAND));
44
- log_1.Log.info({ indent: false, logLevel }, 'Prints and validates versions of all Remotion packages.');
45
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/versions'));
46
- log_1.Log.info({ indent: false, logLevel });
47
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue('remotion ' + gpu_1.GPU_COMMAND));
48
- log_1.Log.info({ indent: false, logLevel }, 'Prints information about how Chrome uses the CPU.');
49
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/gpu'));
50
- log_1.Log.info({ indent: false, logLevel });
51
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue('remotion upgrade'));
52
- log_1.Log.info({ indent: false, logLevel }, 'Ensure Remotion is on the newest version.');
53
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/upgrade'));
54
- log_1.Log.info({ indent: false, logLevel });
55
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue('remotion add') + chalk_1.chalk.gray(' <package-name...>'));
56
- log_1.Log.info({ indent: false, logLevel }, 'Add Remotion packages with the correct version.');
57
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/add'));
58
- log_1.Log.info({ indent: false, logLevel });
59
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue('remotion skills ') + chalk_1.chalk.gray('<add | update>'));
60
- log_1.Log.info({ indent: false, logLevel }, 'Install or update skills from remotion-dev/skills.');
61
- log_1.Log.info({ indent: false, logLevel });
62
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue(`remotion ${browser_1.BROWSER_COMMAND}`));
63
- log_1.Log.info({ indent: false, logLevel }, 'Ensure Remotion has a browser it can use for rendering.');
64
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/browser'));
65
- log_1.Log.info({ indent: false, logLevel });
66
- log_1.Log.info({ indent: false, logLevel }, 'Visit https://www.remotion.dev/docs/cli for browsable CLI documentation.');
11
+ const rendererOptions = Object.values(client_1.BrowserSafeApis.options);
12
+ const cliOnlyOptions = {
13
+ output: {
14
+ flag: '--output <path>',
15
+ description: 'Set the output path instead of using a positional argument.',
16
+ },
17
+ 'browser-args': {
18
+ flag: '--browser-args <arguments>',
19
+ description: 'Pass command line arguments to the browser.',
20
+ },
21
+ quiet: {
22
+ flag: '--quiet, -q',
23
+ description: 'Reduce console output.',
24
+ },
25
+ };
26
+ const options = (flags, descriptionOverrides = {}) => {
27
+ return flags.map((flag) => {
28
+ const cliOnlyOption = cliOnlyOptions[flag];
29
+ if (cliOnlyOption) {
30
+ return cliOnlyOption;
31
+ }
32
+ const rendererOption = rendererOptions.find((candidate) => candidate.cliFlag === flag);
33
+ if (!rendererOption) {
34
+ throw new Error(`No CLI help metadata exists for --${flag}`);
35
+ }
36
+ return (0, command_help_1.makeCommandHelpOption)({
37
+ option: rendererOption,
38
+ description: descriptionOverrides[flag],
39
+ });
40
+ });
41
+ };
42
+ const studioOptions = options([
43
+ 'props',
44
+ 'config',
45
+ 'env-file',
46
+ 'log',
47
+ 'port',
48
+ 'public-dir',
49
+ 'binaries-directory',
50
+ 'disable-git-source',
51
+ 'audio-latency-hint',
52
+ 'disable-keyboard-shortcuts',
53
+ 'disable-interactivity',
54
+ 'allow-html-in-canvas',
55
+ 'editor',
56
+ 'coding-agent',
57
+ 'rspack',
58
+ 'webpack-poll',
59
+ 'no-open',
60
+ 'browser',
61
+ 'browser-args',
62
+ 'browser-executable',
63
+ 'bundle-cache',
64
+ 'chrome-mode',
65
+ 'concurrency',
66
+ 'image-format',
67
+ 'jpeg-quality',
68
+ 'pixel-format',
69
+ 'scale',
70
+ 'crf',
71
+ 'prores-profile',
72
+ 'x264-preset',
73
+ 'gop',
74
+ 'audio-bitrate',
75
+ 'video-bitrate',
76
+ 'audio-codec',
77
+ 'buffer-size',
78
+ 'max-rate',
79
+ 'every-nth-frame',
80
+ 'muted',
81
+ 'enforce-audio-track',
82
+ 'number-of-gif-loops',
83
+ 'color-space',
84
+ 'hardware-acceleration',
85
+ 'timeout',
86
+ 'ignore-certificate-errors',
87
+ 'disable-web-security',
88
+ 'disable-headless',
89
+ 'dark-mode',
90
+ 'gl',
91
+ 'user-agent',
92
+ 'media-cache-size-in-bytes',
93
+ 'offthreadvideo-cache-size-in-bytes',
94
+ 'offthreadvideo-video-threads',
95
+ 'enable-multiprocess-on-linux',
96
+ 'repro',
97
+ 'sample-rate',
98
+ 'for-seamless-aac-concatenation',
99
+ 'beep-on-finish',
100
+ 'ipv4',
101
+ 'number-of-shared-audio-tags',
102
+ 'experimental-keep-audio-context-alive',
103
+ 'preview-sample-rate',
104
+ 'cross-site-isolation',
105
+ 'disable-ask-ai',
106
+ 'force-new',
107
+ 'public-license-key',
108
+ ]);
109
+ const commandHelp = [
110
+ {
111
+ path: ['studio'],
112
+ args: ' <entry-point>?',
113
+ description: 'Start the Remotion Studio.',
114
+ documentation: 'https://www.remotion.dev/docs/cli/studio',
115
+ options: studioOptions,
116
+ },
117
+ {
118
+ path: ['preview'],
119
+ args: ' <entry-point>?',
120
+ description: 'Start the Remotion Studio.',
121
+ documentation: 'https://www.remotion.dev/docs/cli/studio',
122
+ options: studioOptions,
123
+ listed: false,
124
+ },
125
+ {
126
+ path: ['render'],
127
+ args: ' [<entry-point|serve-url>] [<composition-id>] [<output-location>]',
128
+ description: 'Render video, audio or an image sequence.',
129
+ documentation: 'https://www.remotion.dev/docs/cli/render',
130
+ options: options([
131
+ 'props',
132
+ 'height',
133
+ 'width',
134
+ 'fps',
135
+ 'duration',
136
+ 'concurrency',
137
+ 'pixel-format',
138
+ 'image-format',
139
+ 'image-sequence-pattern',
140
+ 'config',
141
+ 'env-file',
142
+ 'jpeg-quality',
143
+ 'output',
144
+ 'overwrite',
145
+ 'sequence',
146
+ 'codec',
147
+ 'audio-codec',
148
+ 'audio-bitrate',
149
+ 'video-bitrate',
150
+ 'buffer-size',
151
+ 'max-rate',
152
+ 'prores-profile',
153
+ 'x264-preset',
154
+ 'gop',
155
+ 'crf',
156
+ 'browser-executable',
157
+ 'chrome-mode',
158
+ 'scale',
159
+ 'frames',
160
+ 'every-nth-frame',
161
+ 'muted',
162
+ 'enforce-audio-track',
163
+ 'disallow-parallel-encoding',
164
+ 'number-of-gif-loops',
165
+ 'color-space',
166
+ 'hardware-acceleration',
167
+ 'bundle-cache',
168
+ 'log',
169
+ 'port',
170
+ 'public-dir',
171
+ 'public-path',
172
+ 'audio-latency-hint',
173
+ 'timeout',
174
+ 'ignore-certificate-errors',
175
+ 'disable-web-security',
176
+ 'disable-headless',
177
+ 'dark-mode',
178
+ 'gl',
179
+ 'user-agent',
180
+ 'media-cache-size-in-bytes',
181
+ 'offthreadvideo-cache-size-in-bytes',
182
+ 'offthreadvideo-video-threads',
183
+ 'enable-multiprocess-on-linux',
184
+ 'repro',
185
+ 'binaries-directory',
186
+ 'rspack',
187
+ 'disable-ask-ai',
188
+ 'disable-keyboard-shortcuts',
189
+ 'quiet',
190
+ 'public-license-key',
191
+ 'sample-rate',
192
+ 'for-seamless-aac-concatenation',
193
+ 'separate-audio-to',
194
+ 'metadata',
195
+ ], { 'image-format': 'Video Image Format' }),
196
+ },
197
+ {
198
+ path: ['still'],
199
+ args: ' <serve-url|entry-point>? [<composition-id>] [<output-location>]',
200
+ description: 'Render a still frame and save it as an image.',
201
+ documentation: 'https://www.remotion.dev/docs/cli/still',
202
+ options: options([
203
+ 'props',
204
+ 'height',
205
+ 'width',
206
+ 'fps',
207
+ 'duration',
208
+ 'image-format',
209
+ 'config',
210
+ 'env-file',
211
+ 'jpeg-quality',
212
+ 'output',
213
+ 'overwrite',
214
+ 'browser-executable',
215
+ 'scale',
216
+ 'frame',
217
+ 'bundle-cache',
218
+ 'log',
219
+ 'port',
220
+ 'public-dir',
221
+ 'public-path',
222
+ 'audio-latency-hint',
223
+ 'timeout',
224
+ 'ignore-certificate-errors',
225
+ 'disable-web-security',
226
+ 'disable-headless',
227
+ 'dark-mode',
228
+ 'chrome-mode',
229
+ 'gl',
230
+ 'user-agent',
231
+ 'media-cache-size-in-bytes',
232
+ 'offthreadvideo-cache-size-in-bytes',
233
+ 'offthreadvideo-video-threads',
234
+ 'enable-multiprocess-on-linux',
235
+ 'binaries-directory',
236
+ 'rspack',
237
+ 'disable-ask-ai',
238
+ 'disable-keyboard-shortcuts',
239
+ 'quiet',
240
+ 'public-license-key',
241
+ ]),
242
+ },
243
+ {
244
+ path: ['compositions'],
245
+ args: ' <serve-url|entry-file>?',
246
+ description: 'Print the available compositions.',
247
+ documentation: 'https://www.remotion.dev/docs/cli/compositions',
248
+ options: options([
249
+ 'props',
250
+ 'browser-executable',
251
+ 'config',
252
+ 'env-file',
253
+ 'bundle-cache',
254
+ 'log',
255
+ 'port',
256
+ 'public-dir',
257
+ 'public-path',
258
+ 'audio-latency-hint',
259
+ 'timeout',
260
+ 'ignore-certificate-errors',
261
+ 'disable-web-security',
262
+ 'disable-headless',
263
+ 'dark-mode',
264
+ 'gl',
265
+ 'enable-multiprocess-on-linux',
266
+ 'user-agent',
267
+ 'media-cache-size-in-bytes',
268
+ 'offthreadvideo-cache-size-in-bytes',
269
+ 'offthreadvideo-video-threads',
270
+ 'binaries-directory',
271
+ 'chrome-mode',
272
+ 'quiet',
273
+ 'rspack',
274
+ 'disable-ask-ai',
275
+ 'disable-keyboard-shortcuts',
276
+ ]),
277
+ },
278
+ {
279
+ path: ['lambda'],
280
+ args: ' <command>',
281
+ description: 'Control Remotion Lambda.',
282
+ documentation: 'https://www.remotion.dev/docs/lambda/cli',
283
+ options: [],
284
+ },
285
+ {
286
+ path: ['bundle'],
287
+ args: ' <serve-url|entry-file>?',
288
+ description: 'Create a Remotion bundle to be deployed to the web.',
289
+ documentation: 'https://www.remotion.dev/docs/cli/bundle',
290
+ options: options([
291
+ 'config',
292
+ 'log',
293
+ 'public-dir',
294
+ 'out-dir',
295
+ 'public-path',
296
+ 'disable-git-source',
297
+ 'bundle-cache',
298
+ 'audio-latency-hint',
299
+ 'rspack',
300
+ 'disable-ask-ai',
301
+ 'disable-keyboard-shortcuts',
302
+ 'quiet',
303
+ ]),
304
+ },
305
+ {
306
+ path: [browser_1.BROWSER_COMMAND],
307
+ args: ' <command>',
308
+ description: 'Ensure Remotion has a browser it can use for rendering.',
309
+ documentation: 'https://www.remotion.dev/docs/cli/browser',
310
+ options: [],
311
+ },
312
+ {
313
+ path: [browser_1.BROWSER_COMMAND, 'ensure'],
314
+ args: '',
315
+ description: 'Ensure Remotion has a browser it can use for rendering.',
316
+ documentation: 'https://www.remotion.dev/docs/cli/browser/ensure',
317
+ options: options(['browser-executable', 'log', 'quiet']),
318
+ },
319
+ {
320
+ path: ['cloudrun'],
321
+ args: ' <command>',
322
+ description: 'Control Remotion Cloud Run.',
323
+ documentation: 'https://www.remotion.dev/docs/cloudrun/cli',
324
+ options: [],
325
+ },
326
+ {
327
+ path: ['benchmark'],
328
+ args: ' [<entry-point>] [composition-ids]',
329
+ description: 'Benchmark rendering one or more compositions.',
330
+ documentation: 'https://www.remotion.dev/docs/cli/benchmark',
331
+ options: options([
332
+ 'runs',
333
+ 'concurrencies',
334
+ 'concurrency',
335
+ 'codec',
336
+ 'crf',
337
+ 'frames',
338
+ 'height',
339
+ 'width',
340
+ 'fps',
341
+ 'duration',
342
+ 'image-format',
343
+ 'pixel-format',
344
+ 'props',
345
+ 'prores-profile',
346
+ 'x264-preset',
347
+ 'gop',
348
+ 'jpeg-quality',
349
+ 'log',
350
+ 'ignore-certificate-errors',
351
+ 'disable-web-security',
352
+ 'dark-mode',
353
+ 'disable-headless',
354
+ 'enable-multiprocess-on-linux',
355
+ 'gl',
356
+ 'chrome-mode',
357
+ 'timeout',
358
+ 'scale',
359
+ 'port',
360
+ 'number-of-gif-loops',
361
+ 'every-nth-frame',
362
+ 'muted',
363
+ 'enforce-audio-track',
364
+ 'disallow-parallel-encoding',
365
+ 'browser-executable',
366
+ 'user-agent',
367
+ 'public-dir',
368
+ 'public-path',
369
+ 'config',
370
+ 'env-file',
371
+ 'bundle-cache',
372
+ 'video-bitrate',
373
+ 'audio-bitrate',
374
+ 'buffer-size',
375
+ 'max-rate',
376
+ 'color-space',
377
+ 'hardware-acceleration',
378
+ 'offthreadvideo-cache-size-in-bytes',
379
+ 'offthreadvideo-video-threads',
380
+ 'media-cache-size-in-bytes',
381
+ 'binaries-directory',
382
+ 'rspack',
383
+ 'overwrite',
384
+ 'metadata',
385
+ 'sample-rate',
386
+ 'for-seamless-aac-concatenation',
387
+ 'disable-ask-ai',
388
+ 'disable-keyboard-shortcuts',
389
+ 'quiet',
390
+ ], { 'image-format': 'Video Image Format' }),
391
+ },
392
+ {
393
+ path: ['skills'],
394
+ args: ' <add | update>',
395
+ description: 'Install or update skills from remotion-dev/skills.',
396
+ documentation: 'https://www.remotion.dev/docs/cli/skills',
397
+ options: [],
398
+ },
399
+ {
400
+ path: ['skills', 'add'],
401
+ args: ' [options]',
402
+ description: 'Install skills from remotion-dev/skills.',
403
+ documentation: 'https://www.remotion.dev/docs/cli/skills',
404
+ options: [],
405
+ },
406
+ {
407
+ path: ['skills', 'update'],
408
+ args: ' [options]',
409
+ description: 'Update skills from remotion-dev/skills.',
410
+ documentation: 'https://www.remotion.dev/docs/cli/skills',
411
+ options: [],
412
+ },
413
+ {
414
+ path: [versions_1.VERSIONS_COMMAND],
415
+ args: '',
416
+ description: 'Print and validate versions of all Remotion packages.',
417
+ documentation: 'https://www.remotion.dev/docs/cli/versions',
418
+ options: options(['log']),
419
+ },
420
+ {
421
+ path: ['upgrade'],
422
+ args: '',
423
+ description: 'Ensure Remotion is on the newest version.',
424
+ documentation: 'https://www.remotion.dev/docs/cli/upgrade',
425
+ options: options(['package-manager', 'version', 'skip-skills', 'log']),
426
+ },
427
+ {
428
+ path: ['add'],
429
+ args: ' <package-name...>',
430
+ description: 'Add Remotion packages with the correct version.',
431
+ documentation: 'https://www.remotion.dev/docs/cli/add',
432
+ options: options(['package-manager', 'log']),
433
+ },
434
+ {
435
+ path: [gpu_1.GPU_COMMAND],
436
+ args: '',
437
+ description: 'Print information about how Chrome uses the GPU.',
438
+ documentation: 'https://www.remotion.dev/docs/cli/gpu',
439
+ options: options([
440
+ 'log',
441
+ 'gl',
442
+ 'chrome-mode',
443
+ 'browser-executable',
444
+ 'user-agent',
445
+ 'disable-web-security',
446
+ 'ignore-certificate-errors',
447
+ 'enable-multiprocess-on-linux',
448
+ 'timeout',
449
+ 'disable-headless',
450
+ 'dark-mode',
451
+ 'quiet',
452
+ ]),
453
+ },
454
+ {
455
+ path: ['ffmpeg'],
456
+ args: ' <arguments...>',
457
+ description: 'Execute FFmpeg with all arguments forwarded.',
458
+ documentation: 'https://www.remotion.dev/docs/cli/ffmpeg',
459
+ options: [],
460
+ },
461
+ {
462
+ path: ['ffprobe'],
463
+ args: ' <arguments...>',
464
+ description: 'Execute FFprobe with all arguments forwarded.',
465
+ documentation: 'https://www.remotion.dev/docs/cli/ffprobe',
466
+ options: [],
467
+ },
468
+ {
469
+ path: ['help'],
470
+ args: ' <command...>',
471
+ description: 'Print available commands and flags for the Remotion CLI.',
472
+ documentation: 'https://www.remotion.dev/docs/cli/help',
473
+ options: [],
474
+ },
475
+ ];
476
+ const printHelp = (logLevel, selectedPath) => {
477
+ if (selectedPath.length === 0) {
478
+ log_1.Log.info({ indent: false, logLevel }, `@remotion/cli ${packagejson.version}`);
479
+ log_1.Log.info({ indent: false, logLevel }, `© ${new Date().getFullYear()} Remotion AG`);
480
+ }
481
+ const lines = (0, command_help_1.getCommandHelp)({
482
+ binaryName: 'remotion',
483
+ commands: commandHelp,
484
+ selectedPath,
485
+ rootDocumentation: 'https://www.remotion.dev/docs/cli',
486
+ });
487
+ for (const line of selectedPath.length === 0 ? lines : lines.slice(1)) {
488
+ log_1.Log.info({ indent: false, logLevel }, line);
489
+ }
67
490
  };
68
491
  exports.printHelp = printHelp;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/cli"
4
4
  },
5
5
  "name": "@remotion/cli",
6
- "version": "4.0.521",
6
+ "version": "4.0.522",
7
7
  "description": "Control Remotion features using the `npx remotion` command",
8
8
  "main": "dist/index.js",
9
9
  "bin": {
@@ -37,18 +37,18 @@
37
37
  "license": "SEE LICENSE IN LICENSE.md",
38
38
  "dependencies": {
39
39
  "@babel/parser": "7.24.1",
40
- "@remotion/bundler": "4.0.521",
41
- "@remotion/media-utils": "4.0.521",
42
- "@remotion/player": "4.0.521",
43
- "@remotion/renderer": "4.0.521",
44
- "@remotion/studio-shared": "4.0.521",
45
- "@remotion/studio-server": "4.0.521",
46
- "@remotion/studio": "4.0.521",
40
+ "@remotion/bundler": "4.0.522",
41
+ "@remotion/media-utils": "4.0.522",
42
+ "@remotion/player": "4.0.522",
43
+ "@remotion/renderer": "4.0.522",
44
+ "@remotion/studio-shared": "4.0.522",
45
+ "@remotion/studio-server": "4.0.522",
46
+ "@remotion/studio": "4.0.522",
47
47
  "dotenv": "17.3.1",
48
48
  "minimist": "1.2.6",
49
49
  "prompts": "2.4.2",
50
50
  "semver": "7.5.3",
51
- "remotion": "4.0.521"
51
+ "remotion": "4.0.522"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": ">=16.8.0",
@@ -60,14 +60,14 @@
60
60
  "@types/prettier": "2.7.2",
61
61
  "@types/semver": "7.5.3",
62
62
  "@types/node": "20.12.14",
63
- "@remotion/zod-types": "4.0.521",
64
- "@remotion/tailwind-v4": "4.0.521",
65
- "@remotion/enable-scss": "4.0.521",
66
- "@remotion/skia": "4.0.521",
63
+ "@remotion/zod-types": "4.0.522",
64
+ "@remotion/tailwind-v4": "4.0.522",
65
+ "@remotion/enable-scss": "4.0.522",
66
+ "@remotion/skia": "4.0.522",
67
67
  "react": "19.2.3",
68
68
  "react-dom": "19.2.3",
69
69
  "zod": "4.5.4",
70
- "@remotion/eslint-config-internal": "4.0.521",
70
+ "@remotion/eslint-config-internal": "4.0.522",
71
71
  "eslint": "9.19.0",
72
72
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
73
73
  },