batchedits
v1.5.0
Published
BatchEdits CLI, SDK and React widgets: edit up to 50 videos at once from your terminal or AI agent (Claude Code, OpenClaw, Hermes)
Maintainers
Readme
BatchEdits CLI
Edit up to 50 videos at once from your terminal or AI agent (Claude Code, OpenClaw, Hermes, Codex): auto captions in 99+ languages, silence removal, 9:16 crops, zoom on key moments and AI clips from long videos.
npx batchedits login
npx batchedits style create "Shorts" --crop 9:16 --silence --captions --zoom
npx batchedits run ./raw --style "Shorts" --out ./editedrun uploads every video in ./raw, edits them all with your style, waits, and saves the results to ./edited.
Needs Node.js 18.17+ and a BatchEdits account (7-day free trial, $0 today). Full docs: https://batchedits.com/docs/cli
Commands
| Command | What it does |
|---|---|
| login / logout / whoami | Sign in through your browser; check the connection |
| styles | List your styles |
| actions | List editing actions and their settings |
| style create <name> [--captions] [--emojis] [--silence] [--repeats] [--crop 9:16] [--zoom] [--clips [n]] [--hook] [--hook-clip <id or words>] [--broll] [--cta [text]] [--set action.setting=value…] | Create a style from flags |
| hooks [words] | Find intro clips for a video hook |
| style edit <name> [same flags] [--set …] [--remove <action>…] [--name <new>] | Change a saved style's edits and settings |
| upload <files or folders…> | Upload up to 50 videos, print their ids |
| process <ids…> --style <name> [--yes] | Edit videos (1 credit each, 1 per AI clip) |
| status [ids…] [--watch] | Show status, or wait until done |
| download <ids…> [--out dir] | Save finished videos (and their AI clips) |
| run <files or folders…> --style <name> [--out dir] [--hooks file] [--ctas file] [--yes] | All of the above in one go |
Every command has --help with an example, and --json for machine-readable output.
Settings
--set action.setting=value sets anything batchedits actions lists. Short action names: captions, silence, crop, zoom, clips, repeats, hook.
Hooks
--hook-clip plays a short intro clip (a video hook) before every video. --hook-clip ai lets AI pick a different matching clip for each video. To use one clip for all of them, find it with batchedits hooks <words>, then pass its id, or just the words for the best match. With --hook too, the text hook is drawn on the clip:
batchedits hooks surprise reaction
batchedits style create "Intro" --captions --hook --hook-clip ai
batchedits style create "Intro" --captions --hook --hook-clip 727--hook adds a text hook at the start of every video; AI writes each line. To use your own, put one hook per line in a file and pass it with --hooks (line 1 → first video, in upload order; a folder uploads its files A-Z):
batchedits style create "Hooks" --captions --silence --hook --set hook.position=top
batchedits run ./raw --style "Hooks" --hooks hooks.txt --out ./edited --yes--broll cuts away to B-roll while you talk about what it shows. Upload clips in the dashboard's Library and name what each shows ("Me typing on laptop"): AI matches the names to what you say, and stock video from Pexels fills the rest (--set broll.source=mine for only yours). AI decides how many cutaways each video needs.
batchedits style create "Talking head" --silence --broll --captions--cta adds a call to action over the last 3 seconds of every video ("Follow for more" unless you give your own line). For a different line per video, pass a file with --ctas, one per line in upload order. An outro clip played after each video is uploaded once in the dashboard's Call to action settings:
batchedits style create "Ends" --captions --cta "Comment GUIDE and I'll send it"
batchedits run ./raw --style "Ends" --ctas ctas.txt --out ./edited --yesbatchedits style create "Shorts" --crop 9:16 --silence --captions \
--set captions.position=center --set captions.highlightColor=#FF6B00 --set zoom.zoomPercent=125
batchedits style edit "Shorts" --set captions.fontColor=#FFFF00 --remove zoomSign in
batchedits loginopens BatchEdits in your browser to approve the CLI, then stores the login in~/.config/batchedits. The token is never printed, so agents can run commands without seeing it.- On servers and CI, set
BATCHEDITS_API_KEY(Dashboard → Settings → API keys).
Using it from an AI agent
Agents on your machine can run the CLI directly. Add this to the agent's instructions:
Edit videos with `npx batchedits` (run `npx batchedits --help`). List styles with `styles --json`,
then `run <folder> --style "<name>" --out <folder> --yes --json`. Processing uses credits:
confirm with the user before passing --yes. Exit code 5 = needs --yes, 3 = sign in first.For ChatGPT, claude.ai and other remote agents, connect the MCP server: https://batchedits.com/docs/mcp
Exit codes: 0 done · 1 error · 2 usage · 3 sign in needed · 4 some videos failed · 5 needs --yes.
SDK and React widgets
The same package exports an embed SDK and React components for adding a BatchEdits editor to your app:
import { EditWithBatchEditsButton } from "batchedits/react";
<EditWithBatchEditsButton videoUrl="https://example.com/video.mp4" mode="popup" onComplete={(d) => console.log(d.editedVideoUrl)} />import { openModal } from "batchedits";
openModal({ videoUrl: "https://example.com/video.mp4", mode: "popup", onComplete: (data) => console.log(data.editedVideoUrl) });MIT licensed.
