create-video 4.0.532 → 4.0.534

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 askSkills: () => Promise<boolean>;
1
+ export type SkillsInstallation = 'recommended' | 'choose';
2
+ export declare const askSkills: () => Promise<SkillsInstallation | null>;
@@ -1,25 +1,33 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.askSkills = void 0;
7
4
  const make_link_1 = require("./hyperlinks/make-link");
8
- const prompts_1 = __importDefault(require("./prompts"));
5
+ const prompts_1 = require("./prompts");
9
6
  const askSkills = async () => {
10
7
  const link = (0, make_link_1.makeHyperlink)({
11
8
  text: 'agent skills',
12
9
  url: 'https://remotion.dev/docs/ai/skills',
13
10
  fallback: 'agent skills',
14
11
  });
15
- const { answer } = await (0, prompts_1.default)({
16
- type: 'toggle',
17
- name: 'answer',
12
+ return (await (0, prompts_1.selectAsync)({
18
13
  message: `Add ${link}?`,
19
- initial: true,
20
- active: 'Yes',
21
- inactive: 'No',
22
- });
23
- return answer;
14
+ initial: 0,
15
+ choices: [
16
+ {
17
+ title: 'Install all skills',
18
+ description: 'Includes all Remotion guidance in one skill',
19
+ value: 'recommended',
20
+ },
21
+ {
22
+ title: 'Choose individual skills',
23
+ description: 'Select the skills that fit your project',
24
+ value: 'choose',
25
+ },
26
+ {
27
+ title: 'Skip skill installation',
28
+ value: null,
29
+ },
30
+ ],
31
+ }));
24
32
  };
25
33
  exports.askSkills = askSkills;
@@ -10,7 +10,7 @@ var listOfRemotionPackages = [
10
10
  "@remotion/bundler",
11
11
  "@remotion/browser-bundler",
12
12
  "@remotion/browser-studio",
13
- "@remotion/canvas",
13
+ "@remotion/sdk",
14
14
  "@remotion/claude-code-plugin",
15
15
  "@remotion/cli",
16
16
  "@remotion/cloudrun",
package/dist/help.js CHANGED
@@ -26,9 +26,13 @@ const getCreateVideoHelp = () => {
26
26
  flag: '--yes, -y',
27
27
  description: 'Enable non-interactive mode. Requires a template flag and a directory, unless --tmp is used.',
28
28
  }),
29
+ formatOption({
30
+ flag: '--tailwind',
31
+ description: 'Install TailwindCSS for supported templates.',
32
+ }),
29
33
  formatOption({
30
34
  flag: '--no-tailwind',
31
- description: 'Skip installing TailwindCSS when used with --yes.',
35
+ description: 'Skip TailwindCSS installation (the default).',
32
36
  }),
33
37
  formatOption({
34
38
  flag: '--tmp',
package/dist/init.js CHANGED
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.init = exports.checkGitAvailability = void 0;
7
+ const node_fs_1 = __importDefault(require("node:fs"));
7
8
  const node_path_1 = __importDefault(require("node:path"));
8
9
  const chalk_1 = __importDefault(require("chalk"));
9
10
  const execa_1 = __importDefault(require("execa"));
10
11
  const add_tailwind_1 = require("./add-tailwind");
11
12
  const add_yarn2_support_1 = require("./add-yarn2-support");
12
13
  const ask_skills_1 = require("./ask-skills");
13
- const ask_tailwind_1 = require("./ask-tailwind");
14
14
  const create_public_folder_1 = require("./create-public-folder");
15
15
  const degit_1 = require("./degit");
16
16
  const help_1 = require("./help");
@@ -121,12 +121,8 @@ const init = async () => {
121
121
  const latestRemotionVersionPromise = (0, latest_remotion_version_1.getLatestRemotionVersion)({
122
122
  onError: log_1.Log.warn,
123
123
  });
124
- const shouldOverrideTailwind = selectedTemplate.allowEnableTailwind
125
- ? (0, select_template_1.isYesFlagSelected)()
126
- ? !(0, select_template_1.isNoTailwindFlagSelected)()
127
- : await (0, ask_tailwind_1.askTailwind)()
128
- : false;
129
- const shouldInstallSkills = (0, select_template_1.isYesFlagSelected)() ? false : await (0, ask_skills_1.askSkills)();
124
+ const shouldOverrideTailwind = selectedTemplate.allowEnableTailwind && (0, select_template_1.isTailwindFlagSelected)();
125
+ const skillsInstallation = (0, select_template_1.isYesFlagSelected)() ? null : await (0, ask_skills_1.askSkills)();
130
126
  const pkgManager = (0, pkg_managers_1.selectPackageManager)();
131
127
  const pkgManagerVersion = await (0, pkg_managers_1.getPackageManagerVersionOrNull)(pkgManager);
132
128
  try {
@@ -160,11 +156,30 @@ const init = async () => {
160
156
  pkgManagerVersion,
161
157
  projectRoot,
162
158
  });
159
+ if (pkgManager === 'pnpm') {
160
+ const workspaceFile = node_path_1.default.join(projectRoot, 'pnpm-workspace.yaml');
161
+ if (!node_fs_1.default.existsSync(workspaceFile)) {
162
+ // pnpm 10 reads ignoredBuiltDependencies; pnpm 11 reads allowBuilds.
163
+ node_fs_1.default.writeFileSync(workspaceFile, 'ignoredBuiltDependencies:\n - esbuild\nallowBuilds:\n esbuild: false\n');
164
+ }
165
+ }
166
+ log_1.Log.info('Installing dependencies...');
167
+ let installedDependencies = true;
168
+ try {
169
+ await execa_1.default.command((0, pkg_managers_1.getInstallCommand)(pkgManager), {
170
+ cwd: projectRoot,
171
+ stdio: 'inherit',
172
+ });
173
+ }
174
+ catch (e) {
175
+ installedDependencies = false;
176
+ log_1.Log.error('Error installing dependencies:', e);
177
+ }
163
178
  if (!isInsideGitRepo) {
164
179
  await getGitStatus(projectRoot);
165
180
  }
166
- if (shouldInstallSkills) {
167
- await (0, install_skills_1.installSkills)(projectRoot);
181
+ if (skillsInstallation !== null) {
182
+ await (0, install_skills_1.installSkills)(projectRoot, skillsInstallation);
168
183
  }
169
184
  const relativeToCurrent = node_path_1.default.relative(process.cwd(), projectRoot);
170
185
  const cdToFolder = relativeToCurrent.startsWith('.')
@@ -177,25 +192,21 @@ const init = async () => {
177
192
  if (cdToFolder !== '') {
178
193
  log_1.Log.info(' ' + chalk_1.default.blue(`cd ${cdToFolder}`));
179
194
  }
180
- log_1.Log.info(' ' + chalk_1.default.blue((0, pkg_managers_1.getInstallCommand)(pkgManager)));
195
+ if (!installedDependencies) {
196
+ log_1.Log.info(' ' + chalk_1.default.blue((0, pkg_managers_1.getInstallCommand)(pkgManager)));
197
+ }
181
198
  log_1.Log.info(' ' + chalk_1.default.blue((0, pkg_managers_1.getDevCommand)(pkgManager, selectedTemplate)));
182
199
  log_1.Log.info('');
183
200
  log_1.Log.info('To render a video, run:');
184
201
  log_1.Log.info(' ' + chalk_1.default.blue((0, pkg_managers_1.getRenderCommand)(pkgManager)));
185
202
  log_1.Log.info('');
186
- log_1.Log.info('Links to get you started:');
203
+ log_1.Log.info('See the documentation:');
187
204
  log_1.Log.info(' ' +
188
205
  chalk_1.default.blue((0, make_link_1.makeHyperlink)({
189
206
  text: 'remotion.dev/docs',
190
207
  url: 'https://www.remotion.dev/docs',
191
208
  fallback: 'https://www.remotion.dev/docs',
192
209
  })));
193
- log_1.Log.info(' ' +
194
- chalk_1.default.blue((0, make_link_1.makeHyperlink)({
195
- text: 'remotion.dev/prompts',
196
- url: 'https://www.remotion.dev/prompts',
197
- fallback: 'https://www.remotion.dev/prompts',
198
- })));
199
210
  log_1.Log.info();
200
211
  log_1.Log.info('Remotion is free for teams of up to 3.');
201
212
  log_1.Log.info('Adopting Remotion in your company? Visit ' +
@@ -1 +1,2 @@
1
- export declare const installSkills: (projectRoot: string) => Promise<void>;
1
+ import type { SkillsInstallation } from './ask-skills';
2
+ export declare const installSkills: (projectRoot: string, selection: SkillsInstallation) => Promise<void>;
@@ -4,12 +4,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.installSkills = void 0;
7
+ const node_fs_1 = require("node:fs");
8
+ const node_path_1 = __importDefault(require("node:path"));
7
9
  const execa_1 = __importDefault(require("execa"));
8
10
  const log_1 = require("./log");
9
- const installSkills = async (projectRoot) => {
11
+ const installSkills = async (projectRoot, selection) => {
10
12
  const command = process.platform === 'win32' ? 'npx.cmd' : 'npx';
13
+ const args = [
14
+ '-y',
15
+ '--loglevel=error',
16
+ 'skills@1.7.0',
17
+ 'add',
18
+ 'remotion-dev/skills',
19
+ '--agent',
20
+ 'universal',
21
+ ...(selection === 'recommended'
22
+ ? ['--skill', 'remotion-best-practices', '--yes']
23
+ : []),
24
+ ];
11
25
  try {
12
- await (0, execa_1.default)(command, ['-y', '--loglevel=error', 'skills@1.5.26', 'add', 'remotion-dev/skills'], {
26
+ await (0, execa_1.default)(command, args, {
13
27
  cwd: projectRoot,
14
28
  stdio: 'inherit',
15
29
  });
@@ -17,7 +31,34 @@ const installSkills = async (projectRoot) => {
17
31
  catch (e) {
18
32
  log_1.Log.error('Error installing skills:', e);
19
33
  log_1.Log.error('You can install them manually by running:');
20
- log_1.Log.error(' npx skills add remotion-dev/skills');
34
+ log_1.Log.error(` npx ${args.join(' ')}`);
35
+ return;
36
+ }
37
+ const agentsSkills = node_path_1.default.join(projectRoot, '.agents', 'skills');
38
+ const claudeSkills = node_path_1.default.join(projectRoot, '.claude', 'skills');
39
+ const existing = (0, node_fs_1.lstatSync)(claudeSkills, { throwIfNoEntry: false });
40
+ if (existing) {
41
+ let pointsToAgentsSkills = false;
42
+ if (existing.isSymbolicLink()) {
43
+ try {
44
+ pointsToAgentsSkills =
45
+ (0, node_fs_1.realpathSync)(claudeSkills) === (0, node_fs_1.realpathSync)(agentsSkills);
46
+ }
47
+ catch (_a) {
48
+ // An existing link with a missing target must be preserved.
49
+ }
50
+ }
51
+ if (!pointsToAgentsSkills) {
52
+ log_1.Log.warn('Could not link .claude/skills to .agents/skills because .claude/skills already exists.');
53
+ }
54
+ return;
55
+ }
56
+ try {
57
+ (0, node_fs_1.mkdirSync)(node_path_1.default.dirname(claudeSkills), { recursive: true });
58
+ (0, node_fs_1.symlinkSync)(process.platform === 'win32' ? agentsSkills : '../.agents/skills', claudeSkills, process.platform === 'win32' ? 'junction' : 'dir');
59
+ }
60
+ catch (e) {
61
+ log_1.Log.warn('Could not link .claude/skills to .agents/skills:', e);
21
62
  }
22
63
  };
23
64
  exports.installSkills = installSkills;
@@ -13,7 +13,7 @@ exports.listOfRemotionPackages = [
13
13
  '@remotion/bundler',
14
14
  '@remotion/browser-bundler',
15
15
  '@remotion/browser-studio',
16
- '@remotion/canvas',
16
+ '@remotion/sdk',
17
17
  '@remotion/claude-code-plugin',
18
18
  '@remotion/cli',
19
19
  '@remotion/cloudrun',
@@ -1,7 +1,7 @@
1
1
  import type { Template } from './templates';
2
2
  export type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' | 'nub';
3
3
  export declare const selectPackageManager: () => PackageManager;
4
- export declare const getInstallCommand: (manager: PackageManager) => "bun install" | "npm i --loglevel=error" | "nub install" | "pnpm i" | "yarn" | undefined;
4
+ export declare const getInstallCommand: (manager: PackageManager) => "bun install" | "npm i --loglevel=error" | "nub install" | "pnpm i" | "yarn";
5
5
  export declare const getRunCommand: (manager: PackageManager) => "bun run" | "npm run" | "nub run" | "pnpm run" | "yarn run";
6
6
  export declare const getRenderCommand: (manager: PackageManager) => "bunx remotion render" | "npx remotion render" | "nubx remotion render" | "pnpm exec remotion render" | "yarn remotion render";
7
7
  export declare const getUpgradeCommand: (manager: PackageManager) => "bunx remotion upgrade" | "npx remotion upgrade" | "nubx remotion upgrade" | "pnpm exec remotion upgrade" | "yarn remotion upgrade";
@@ -68,6 +68,7 @@ const getInstallCommand = (manager) => {
68
68
  if (manager === 'nub') {
69
69
  return `nub install`;
70
70
  }
71
+ throw new TypeError('unknown package manager');
71
72
  };
72
73
  exports.getInstallCommand = getInstallCommand;
73
74
  const getStartCommand = (manager) => {
@@ -1,7 +1,7 @@
1
1
  import type { Template } from './templates';
2
2
  export declare const isTmpFlagSelected: () => boolean;
3
3
  export declare const isYesFlagSelected: () => boolean;
4
- export declare const isNoTailwindFlagSelected: () => boolean;
4
+ export declare const isTailwindFlagSelected: () => boolean;
5
5
  export declare const isHelpFlagSelected: () => boolean;
6
6
  export declare const getPositionalArguments: () => string[];
7
7
  export declare const getDirectoryArgument: () => string | null;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.selectTemplate = exports.isFlagSelected = exports.getDirectoryArgument = exports.getPositionalArguments = exports.isHelpFlagSelected = exports.isNoTailwindFlagSelected = exports.isYesFlagSelected = exports.isTmpFlagSelected = void 0;
6
+ exports.selectTemplate = exports.isFlagSelected = exports.getDirectoryArgument = exports.getPositionalArguments = exports.isHelpFlagSelected = exports.isTailwindFlagSelected = exports.isYesFlagSelected = exports.isTmpFlagSelected = void 0;
7
7
  const chalk_1 = __importDefault(require("chalk"));
8
8
  const minimist_1 = __importDefault(require("minimist"));
9
9
  const make_link_1 = require("./hyperlinks/make-link");
@@ -15,7 +15,7 @@ const parsed = (0, minimist_1.default)(process.argv.slice(2), {
15
15
  ...ALL_TEMPLATES.map((f) => f.cliId),
16
16
  'tmp',
17
17
  'yes',
18
- 'no-tailwind',
18
+ 'tailwind',
19
19
  'help',
20
20
  ],
21
21
  string: ['_'],
@@ -25,8 +25,8 @@ const isTmpFlagSelected = () => parsed.tmp;
25
25
  exports.isTmpFlagSelected = isTmpFlagSelected;
26
26
  const isYesFlagSelected = () => parsed.yes;
27
27
  exports.isYesFlagSelected = isYesFlagSelected;
28
- const isNoTailwindFlagSelected = () => parsed.tailwind === false;
29
- exports.isNoTailwindFlagSelected = isNoTailwindFlagSelected;
28
+ const isTailwindFlagSelected = () => parsed.tailwind;
29
+ exports.isTailwindFlagSelected = isTailwindFlagSelected;
30
30
  const isHelpFlagSelected = () => parsed.help;
31
31
  exports.isHelpFlagSelected = isHelpFlagSelected;
32
32
  const getPositionalArguments = () => parsed._;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/create-video"
4
4
  },
5
5
  "name": "create-video",
6
- "version": "4.0.532",
6
+ "version": "4.0.534",
7
7
  "description": "Create a new Remotion project",
8
8
  "main": "dist/index.js",
9
9
  "bin": {
@@ -29,7 +29,7 @@
29
29
  "@types/minimist": "1.2.2",
30
30
  "@types/prompts": "2.4.9",
31
31
  "react": "19.2.3",
32
- "@remotion/eslint-config-internal": "4.0.532",
32
+ "@remotion/eslint-config-internal": "4.0.534",
33
33
  "eslint": "9.19.0",
34
34
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
35
35
  },