🎥 Make videos programmatically with React
`npx remotionb` command
Jonny Burger0866c69cfd6a
diff --git a/packages/cli-autocomplete/src/source.ts b/packages/cli-autocomplete/src/source.tsindex 7b3bd9ab6c..d41012645f 100644--- a/packages/cli-autocomplete/src/source.ts+++ b/packages/cli-autocomplete/src/source.ts@@ -499,7 +499,7 @@ const benchmarkOptions: Fig.Option[] = uniqueOptions();const completionSpec: Fig.Spec = {- name: "remotion",+ name: ["remotion", "remotionb"],description: "Create videos programmatically in React",subcommands: [{diff --git a/packages/cli/package.json b/packages/cli/package.jsonindex cea3fd64c7..c400a2c719 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -5,7 +5,8 @@"main": "dist/index.js","sideEffects": false,"bin": {- "remotion": "remotion-cli.js"+ "remotion": "remotion-cli.js",+ "remotionb": "remotionb-cli.js"},"scripts": {"formatting": "prettier src --check",diff --git a/packages/cli/remotionb-cli.js b/packages/cli/remotionb-cli.jsnew file mode 100755index 0000000000..f7297e05ec--- /dev/null+++ b/packages/cli/remotionb-cli.js@@ -0,0 +1,13 @@+#!/usr/bin/env bun+const dotenv = require('dotenv');+dotenv.config();+const {cli} = require('./dist/index');++// Just like "remotion", but it uses Bun+cli()+ .then(() => process.exit(0))+ .catch((err) => {+ // eslint-disable-next-line no-console+ console.error(err);+ process.exit(1);+ });diff --git a/packages/docs/docs/cli/cli.md b/packages/docs/docs/cli/cli.mdxsimilarity index 53%rename from packages/docs/docs/cli/cli.mdrename to packages/docs/docs/cli/cli.mdxindex 993829d654..236b035ede 100644--- a/packages/docs/docs/cli/cli.md+++ b/packages/docs/docs/cli/cli.mdx@@ -5,21 +5,43 @@ sidebar_label: CLI referenceid: cli----import {AngleChangelog} from '../../components/AngleChangelog';-import {TableOfContents} from '../../components/TableOfContents/cli';+import { AngleChangelog } from "../../components/AngleChangelog";+import { TableOfContents } from "../../components/TableOfContents/cli";## How to useYou can run the CLI by installing `@remotion/cli` and running:- `npx remotion` inside a npm project-- `yarn remotion` inside a yarn project+- `yarn remotion` inside a Yarn project- `pnpm exec remotion` inside a pnpm project.- `bunx remotion` inside a Bun projectFor brevity, in the documentation we always say `npx remotion`.-- Inside an npm script, you don't need the `npx` prefix.+Inside an npm script, you don't need the `npx` prefix:++```json title="package.json"+{+ "scripts": {+ "render": "remotion render"+ }+}+```++### Using Bun<AvailableFrom v="4.0.118" />++By default, the `npx remotion` command is being executed using Node.+Even `bunx remotion` is using Node, unless you add the `--bun` flag.+To use Bun, replace `remotion` with `remotionb`.++```json title="package.json"+{+ "scripts": {+ "render": "remotionb render"+ }+}+```## Commands@@ -35,7 +57,8 @@ npx remotion render --codec=vp8 HelloWorld out/video.webm## Fig.io autocompletion-Install [Fig](https://fig.io) (macOS only) to add Remotion autocomplete to your terminal. Type `npx remotion` to start get suggestions.+Install [Fig](https://fig.io) (macOS only) to add Remotion autocomplete to your terminal.+Type `npx remotion` to start getting suggestions.## See also