batchedits 1.3.0 → 1.4.0
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.
- package/README.md +9 -1
- package/dist/cli.js +27 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,8 @@ Needs Node.js 18.17+ and a [BatchEdits](https://batchedits.com) account (7-day f
|
|
|
19
19
|
| `login` / `logout` / `whoami` | Sign in through your browser; check the connection |
|
|
20
20
|
| `styles` | List your styles |
|
|
21
21
|
| `actions` | List editing actions and their settings |
|
|
22
|
-
| `style create <name> [--captions] [--emojis] [--silence] [--repeats] [--crop 9:16] [--zoom] [--clips [n]] [--hook] [--set action.setting=value…]` | Create a style from flags |
|
|
22
|
+
| `style create <name> [--captions] [--emojis] [--silence] [--repeats] [--crop 9:16] [--zoom] [--clips [n]] [--hook] [--hook-clip <id or words>] [--set action.setting=value…]` | Create a style from flags |
|
|
23
|
+
| `hooks [words]` | Find intro clips for a video hook |
|
|
23
24
|
| `style edit <name> [same flags] [--set …] [--remove <action>…] [--name <new>]` | Change a saved style's edits and settings |
|
|
24
25
|
| `upload <files or folders…>` | Upload up to 50 videos, print their ids |
|
|
25
26
|
| `process <ids…> --style <name> [--yes]` | Edit videos (1 credit each, 1 per AI clip) |
|
|
@@ -35,6 +36,13 @@ Every command has `--help` with an example, and `--json` for machine-readable ou
|
|
|
35
36
|
|
|
36
37
|
### Hooks
|
|
37
38
|
|
|
39
|
+
`--hook-clip` plays a short intro clip (a video hook) before every video. Find one 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:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
batchedits hooks surprise reaction
|
|
43
|
+
batchedits style create "Intro" --captions --hook --hook-clip 727
|
|
44
|
+
```
|
|
45
|
+
|
|
38
46
|
`--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):
|
|
39
47
|
|
|
40
48
|
```bash
|
package/dist/cli.js
CHANGED
|
@@ -369,7 +369,7 @@ var SET_HELP = [
|
|
|
369
369
|
" --set <action.setting=value> Any setting from `batchedits actions` (repeatable). Adds the edit if missing.",
|
|
370
370
|
" captions.position=top|center|bottom captions.fontColor=#FFFFFF captions.highlightColor=#FF6B00",
|
|
371
371
|
" captions.fontSize=64 silence.silentThreshold=0.06 zoom.zoomPercent=125 clips.maxSeconds=60",
|
|
372
|
-
" hook.position=top|center|bottom hook.y=0.3 hook.duration=auto|3 hook.source=ai|manual hook.backgroundColor=#FF6B00"
|
|
372
|
+
" hook.position=top|center|bottom hook.y=0.3 hook.duration=auto|3 hook.source=ai|manual hook.animation=fade|pop|none hook.backgroundColor=#FF6B00"
|
|
373
373
|
].join("\n");
|
|
374
374
|
var actionName = (raw) => ACTION_ALIASES[raw.trim().toLowerCase()] ?? raw.trim().toLowerCase();
|
|
375
375
|
var list = (v) => Array.isArray(v) ? v : typeof v === "string" ? [v] : [];
|
|
@@ -387,7 +387,13 @@ function applyFlagActions(actions, flags) {
|
|
|
387
387
|
if (flags.captions || flags.emojis) out = upsert(out, "add_captions", flags.emojis ? { emojis: true } : void 0);
|
|
388
388
|
if (flags.zoom) out = upsert(out, "punch_zoom");
|
|
389
389
|
if (flags.clips) out = upsert(out, "ai_clips", typeof flags.clips === "string" ? { maxClips: Number(flags.clips) } : void 0);
|
|
390
|
-
|
|
390
|
+
const clip = typeof flags["hook-clip"] === "string" ? flags["hook-clip"].trim() : "";
|
|
391
|
+
if (clip) {
|
|
392
|
+
const pick = /^\d+$/.test(clip) ? { video: { libraryId: Number(clip) } } : { videoQuery: clip };
|
|
393
|
+
out = upsert(out, "hook", { kinds: flags.hook ? ["text", "video"] : ["video"], ...pick });
|
|
394
|
+
} else if (flags.hook) {
|
|
395
|
+
out = upsert(out, "hook");
|
|
396
|
+
}
|
|
391
397
|
return out;
|
|
392
398
|
}
|
|
393
399
|
function parseValue(raw) {
|
|
@@ -536,6 +542,19 @@ var commands = {
|
|
|
536
542
|
return EXIT.OK;
|
|
537
543
|
}
|
|
538
544
|
},
|
|
545
|
+
hooks: {
|
|
546
|
+
summary: "Find intro clips for a video hook",
|
|
547
|
+
usage: "batchedits hooks [words]",
|
|
548
|
+
help: 'Searches the transitional hook library (short vertical intro clips). Without words, lists the newest.\nUse an id with: batchedits style create "Intro" --hook-clip <id>\nExample: batchedits hooks surprise reaction',
|
|
549
|
+
async run({ api, positionals }) {
|
|
550
|
+
const query = positionals.join(" ").trim();
|
|
551
|
+
const res = await api.call("search_hook_clips", query ? { query } : {});
|
|
552
|
+
if (isJson()) printJson({ clips: res.clips });
|
|
553
|
+
else if (res.clips.length === 0) say(res.message);
|
|
554
|
+
else table(res.clips.map((c) => ({ id: String(c.id), seconds: `${c.seconds}s`, title: c.title })), ["id", "seconds", "title"]);
|
|
555
|
+
return EXIT.OK;
|
|
556
|
+
}
|
|
557
|
+
},
|
|
539
558
|
"style create": {
|
|
540
559
|
summary: "Create a style from simple flags",
|
|
541
560
|
usage: "batchedits style create <name> [--captions] [--emojis] [--silence] [--crop 9:16] [--zoom] [--clips [n]] [--repeats] [--hook] [--set action.setting=value\u2026]",
|
|
@@ -549,9 +568,12 @@ var commands = {
|
|
|
549
568
|
" --zoom Zoom in on key moments",
|
|
550
569
|
" --clips [n] Cut long videos into n short clips (default 10; 1 credit per clip)",
|
|
551
570
|
" --hook A text hook at the start of each video (AI writes it, or pass --hooks to run/process)",
|
|
571
|
+
" --hook-clip <id|words> An intro clip before each video, from `batchedits hooks` (an id, or words for the best match).",
|
|
572
|
+
" With --hook too, the text hook is drawn on the clip.",
|
|
552
573
|
SET_HELP,
|
|
553
574
|
'Example: batchedits style create "Shorts" --crop 9:16 --silence --captions --zoom --set captions.position=center',
|
|
554
|
-
'Example: batchedits style create "Hooks" --captions --hook --set hook.position=top --set hook.duration=3'
|
|
575
|
+
'Example: batchedits style create "Hooks" --captions --hook --set hook.position=top --set hook.duration=3',
|
|
576
|
+
'Example: batchedits style create "Intro" --captions --hook --hook-clip "surprise reaction"'
|
|
555
577
|
].join("\n"),
|
|
556
578
|
async run({ api, positionals, flags }) {
|
|
557
579
|
const name = positionals.join(" ").trim();
|
|
@@ -717,7 +739,7 @@ Next: batchedits status ${positionals.join(" ")} --watch`);
|
|
|
717
739
|
};
|
|
718
740
|
|
|
719
741
|
// src/cli.ts
|
|
720
|
-
var VERSION = true ? "1.
|
|
742
|
+
var VERSION = true ? "1.4.0" : "dev";
|
|
721
743
|
var FLAG_OPTIONS = {
|
|
722
744
|
help: { type: "boolean", short: "h" },
|
|
723
745
|
version: { type: "boolean", short: "v" },
|
|
@@ -736,6 +758,7 @@ var FLAG_OPTIONS = {
|
|
|
736
758
|
zoom: { type: "boolean" },
|
|
737
759
|
clips: { type: "string" },
|
|
738
760
|
hook: { type: "boolean" },
|
|
761
|
+
"hook-clip": { type: "string" },
|
|
739
762
|
hooks: { type: "string" },
|
|
740
763
|
set: { type: "string", multiple: true },
|
|
741
764
|
remove: { type: "string", multiple: true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "batchedits",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "BatchEdits CLI, SDK and React widgets: edit up to 50 videos at once from your terminal or AI agent (Claude Code, OpenClaw, Hermes)",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|