@facelessad/cli 1.0.2 → 1.1.1
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 +59 -0
- package/index.js +27 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,6 +27,65 @@ stops on it immediately instead of polling forever. For long-running
|
|
|
27
27
|
builds a webhook is still the better tool — a stuck shell is a stuck CI
|
|
28
28
|
job. See https://facelessad.com/developers → Webhooks.
|
|
29
29
|
|
|
30
|
+
## Getting the finished video
|
|
31
|
+
|
|
32
|
+
`--wait` tells you when the video is done, but it never prints the video URL.
|
|
33
|
+
Three ways to get the file:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
facelessad download 103 --out ad.mp4 # saves into the CURRENT directory
|
|
37
|
+
facelessad status 103 --json | jq -r .url # the raw link, valid ~1 hour
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The third is the browser: every video made through the CLI also appears in My
|
|
41
|
+
Files at facelessad.com.
|
|
42
|
+
|
|
43
|
+
Since 1.1.1 `download` prints the full path and the file size, and fails
|
|
44
|
+
loudly on an empty file instead of reporting success. The link is signed and
|
|
45
|
+
expires in about an hour — the video itself does not, so ask for the status
|
|
46
|
+
again to get a fresh one.
|
|
47
|
+
|
|
48
|
+
## Custom style (1.1.0)
|
|
49
|
+
|
|
50
|
+
Most tools accept a look of your own instead of one of the built-in styles.
|
|
51
|
+
`facelessad tools` marks which ones (`supports.customStyle`):
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
facelessad create --tool motion-graphics --url https://your-product.com \
|
|
55
|
+
--style custom \
|
|
56
|
+
--custom-style "Retro terminal — phosphor green on near-black, scan lines, chunky mono type" --wait
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
What to describe depends on what the tool builds. Animated Ad, Character,
|
|
60
|
+
Music Video, Inspiration, Motivational and Slideshow render images, so
|
|
61
|
+
describe the illustration or cinematic style. Motion Graphics, SaaS UI Ad,
|
|
62
|
+
Text Animation and Video Banner generate their graphics as code, so describe
|
|
63
|
+
typography, palette and motion. Crude Drawings has no custom style.
|
|
64
|
+
|
|
65
|
+
Product Showcase builds both — cinematic clips animated from your real
|
|
66
|
+
product photo, and text graphics drawn in code on top — so it takes two
|
|
67
|
+
descriptions:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
facelessad create --tool product-showcase --product-image https://.../bottle.jpg \
|
|
71
|
+
--text "A steel bottle that keeps drinks cold for 24 hours" \
|
|
72
|
+
--style custom \
|
|
73
|
+
--custom-style "Frozen tundra — cracked ice, pale blue rim light, slow orbiting camera" \
|
|
74
|
+
--custom-graphics-style "Deep navy typography, thin white hairlines — the video reads light" --wait
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Leave `--custom-graphics-style` out and it is written for you from the first
|
|
78
|
+
description.
|
|
79
|
+
|
|
80
|
+
Your text is expanded into a full style specification before the video is
|
|
81
|
+
built. `facelessad status <id> --json` returns the expanded text as
|
|
82
|
+
`customStyle`; feed it back with `--no-refine-style` to give a whole
|
|
83
|
+
campaign one identical look.
|
|
84
|
+
|
|
85
|
+
`--style-hint` is now an alias: with no `--style`, it is treated exactly like
|
|
86
|
+
`--custom-style`. Before 1.1.0 it only reached the script writer and could
|
|
87
|
+
not change how the video looked.
|
|
88
|
+
|
|
30
89
|
## Flag spellings (1.0.1)
|
|
31
90
|
|
|
32
91
|
Both spellings are accepted, because the older ones appeared on the
|
package/index.js
CHANGED
|
@@ -111,6 +111,10 @@ if (flags['no-music'] === true) { flags.music = 'false'; delete flags['no-music'
|
|
|
111
111
|
*/
|
|
112
112
|
const KNOWN_FLAGS = new Set([
|
|
113
113
|
'tool', 'url', 'text', 'duration', 'aspect', 'language', 'style', 'style-hint',
|
|
114
|
+
// 1.1.0 (§673): custom style. --style custom yksin ei riita — palvelin
|
|
115
|
+
// vastaa custom_style_required, ja se on tarkoitus: tyylin sisalto ON
|
|
116
|
+
// kayttajan teksti.
|
|
117
|
+
'custom-style', 'custom-graphics-style', 'no-refine-style',
|
|
114
118
|
'structure', 'hook', 'video-mode', 'brand-color', 'brand-name', 'cta', 'name',
|
|
115
119
|
'voice', 'gender', 'no-voice', 'music', 'sfx', 'captions', 'product-image',
|
|
116
120
|
'no-brand-kit', 'no-winners', 'brand-kit',
|
|
@@ -220,6 +224,13 @@ function buildBody() {
|
|
|
220
224
|
set('language', flags.language !== undefined ? String(flags.language) : undefined);
|
|
221
225
|
set('style', flags.style !== undefined ? String(flags.style) : undefined);
|
|
222
226
|
set('style_hint', flags['style-hint'] !== undefined ? String(flags['style-hint']) : undefined);
|
|
227
|
+
// 1.1.0 (§673): oma tyyli. --custom-style on ainoa lippu joka oikeasti
|
|
228
|
+
// vaihtaa videon ilmeen; --style-hint on nykyaan sen alias silloin kun
|
|
229
|
+
// --style on antamatta. --custom-graphics-style koskee vain
|
|
230
|
+
// product-showcasea (video + sen paalle koodilla piirretyt grafiikat).
|
|
231
|
+
set('custom_style', flags['custom-style'] !== undefined ? String(flags['custom-style']) : undefined);
|
|
232
|
+
set('custom_graphics_style', flags['custom-graphics-style'] !== undefined ? String(flags['custom-graphics-style']) : undefined);
|
|
233
|
+
if (flags['no-refine-style'] === true) body.custom_style_refine = false;
|
|
223
234
|
set('ad_structure', flags.structure !== undefined ? String(flags.structure) : undefined);
|
|
224
235
|
set('hook_formula', flags.hook !== undefined ? String(flags.hook) : undefined);
|
|
225
236
|
set('video_mode', flags['video-mode'] !== undefined ? String(flags['video-mode']) : undefined);
|
|
@@ -371,8 +382,18 @@ const commands = {
|
|
|
371
382
|
const file = String(flags.out || ('facelessad-' + id + '.mp4'));
|
|
372
383
|
const res = await fetch(d.url);
|
|
373
384
|
if (!res.ok) die('Download failed: HTTP ' + res.status, 'download_failed');
|
|
374
|
-
|
|
375
|
-
|
|
385
|
+
const buf = Buffer.from(await res.arrayBuffer());
|
|
386
|
+
// 1.1.1: tyhjä tiedosto tulosti ennen saman "Saved" kuin onnistunut lataus.
|
|
387
|
+
if (!buf.length) die('Download produced an empty file — the link may have expired. Run `facelessad status ' + id + '` and try again.', 'empty_download');
|
|
388
|
+
fs.writeFileSync(file, buf);
|
|
389
|
+
// 1.1.1: pelkkä tiedostonimi ei kertonut MIHIN tallennettiin. Tiedosto
|
|
390
|
+
// menee työhakemistoon, ei Downloadsiin, ja käyttäjä jäi etsimään sitä
|
|
391
|
+
// (omistajan raportti 12.8.2026). Absoluuttinen polku ja koko ääneen.
|
|
392
|
+
const full = path.resolve(file);
|
|
393
|
+
const mb = buf.length / (1024 * 1024);
|
|
394
|
+
const size = mb >= 1 ? mb.toFixed(1) + ' MB' : Math.max(1, Math.round(buf.length / 1024)) + ' kB';
|
|
395
|
+
out({ ok: true, file, path: full, bytes: buf.length },
|
|
396
|
+
'Saved ' + full + dim(' (' + size + ')'));
|
|
376
397
|
},
|
|
377
398
|
|
|
378
399
|
async help() {
|
|
@@ -388,10 +409,13 @@ Commands:
|
|
|
388
409
|
create --tool <id> ... Create a video (returns an id immediately)
|
|
389
410
|
status <id> [--wait] Status; --wait polls until done
|
|
390
411
|
list [--limit --offset] Your videos, newest first
|
|
391
|
-
download <id> [--out file] Save the finished mp4
|
|
412
|
+
download <id> [--out file] Save the finished mp4 into the current directory
|
|
392
413
|
|
|
393
414
|
Create flags:
|
|
394
415
|
--tool --url --text --duration --aspect --language --style --style-hint
|
|
416
|
+
--custom-style "<look you want>" (with --style custom; see facelessad tools)
|
|
417
|
+
--custom-graphics-style "<...>" (product-showcase only)
|
|
418
|
+
--no-refine-style (use your text verbatim, don't expand it)
|
|
395
419
|
--structure --hook --video-mode --brand-color --brand-name --cta --name
|
|
396
420
|
--voice --gender --no-voice --music --sfx --captions --product-image
|
|
397
421
|
--no-brand-kit --no-winners --brand-kit <id> (see: facelessad brands)
|