reelkit-cli 0.1.3 → 0.3.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 +2 -1
- package/package.json +1 -1
- package/skill/SKILL.md +8 -4
- package/skill/reference/clips.md +98 -0
- package/skill/reference/kit.md +8 -0
- package/skill/reference/remotion-composition.md +4 -3
- package/skill/reference/scene-treatments.md +2 -1
- package/src/cli.ts +16 -7
- package/src/commands/assets.ts +334 -15
- package/src/commands/auth.ts +1 -1
- package/src/contract/index.ts +62 -3
- package/src/pipeline/schema.ts +13 -1
- package/src/project/chromakey.ts +51 -0
- package/src/project/manifest.ts +12 -0
- package/src/project/project.ts +1 -1
- package/src/remotion/kit/ClipLayer.tsx +12 -0
- package/src/remotion/kit/KeyedClip.tsx +15 -0
- package/src/remotion/kit/docs.ts +8 -0
- package/src/remotion/kit/index.ts +2 -0
- package/src/testing/conformance.ts +227 -1
- package/src/testing/fake-api.ts +144 -13
package/README.md
CHANGED
|
@@ -53,12 +53,13 @@ reelkit render
|
|
|
53
53
|
| `reelkit whoami` | Account, quota, contributions |
|
|
54
54
|
| `reelkit install` | Install the skill into your coding agents (`--agent <id>`, `--force`) |
|
|
55
55
|
| `reelkit init [name]` | Set up a video project, in a new folder named after it |
|
|
56
|
-
| `reelkit assets upload <file>` | Add one of your own files (private unless `--share`) |
|
|
56
|
+
| `reelkit assets upload <file>` | Add one of your own files (private unless `--share`); `--green` or `--cutout` also makes a transparent copy of a video (`--cutout` sends it to the server) |
|
|
57
57
|
| `reelkit assets search "<query>"` | Search the shared library by meaning; each result shows a match percentage |
|
|
58
58
|
| `reelkit assets pull <id>` | Download a library item (a component lands in `src/`) |
|
|
59
59
|
| `reelkit assets voices` | List narration voices |
|
|
60
60
|
| `reelkit assets voiceover` | Record narration from `plan.json` |
|
|
61
61
|
| `reelkit assets gen image` | Generate a scene's illustration |
|
|
62
|
+
| `reelkit assets gen clip` | Generate a scene's video clip, or a green-screen one keyed to a transparent video, or one with the subject cut out on the server |
|
|
62
63
|
| `reelkit plan check` | Validate `plan.json` |
|
|
63
64
|
| `reelkit check` | Check the composition without rendering |
|
|
64
65
|
| `reelkit preview` | Two test frames per scene |
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -23,13 +23,13 @@ Find out what the video is about and collect what the user has. Ask for nothing
|
|
|
23
23
|
|
|
24
24
|
For each file the user gives, look at it, then register it with a description of what it shows:
|
|
25
25
|
`reelkit assets upload ./logo.png --describe "Acme logo, white wordmark on blue"`
|
|
26
|
-
Add `--footage` for a video the motion design should be laid over. User files stay on this machine.
|
|
26
|
+
Add `--footage` for a video the motion design should be laid over. User files stay on this machine. A video of someone or something on a plain background can be made transparent: `--green` keys a green background locally for free, and `--cutout` removes any background on the server (the video is sent to Reelkit, so ask first; see `reference/clips.md`).
|
|
27
27
|
|
|
28
28
|
### 2. Look
|
|
29
29
|
Read `reference/styles.md` and agree the video's look with the user: one of its looks, or their own. If they already described what they want, match it and confirm in one sentence. Ask anything still open in one message, each question with a default. If any on-screen text will be Hebrew, read `reference/hebrew-rtl.md` now: it changes how words may enter and how lines are written.
|
|
30
30
|
|
|
31
31
|
### 3. Plan
|
|
32
|
-
Read `reference/scriptwriting.md` and `reference/scene-treatments.md
|
|
32
|
+
Read `reference/scriptwriting.md` and `reference/scene-treatments.md` (and `reference/clips.md` if any scene might be a video clip). Write the chosen look into the first scene's `notes`. Run `reelkit assets voices` and choose a voice that fits the idea, audience and language.
|
|
33
33
|
|
|
34
34
|
Write `plan.json`:
|
|
35
35
|
|
|
@@ -47,6 +47,7 @@ Write `plan.json`:
|
|
|
47
47
|
"treatment": "motion-graphic",
|
|
48
48
|
"onScreenText": ["up to three short items"],
|
|
49
49
|
"imagePrompt": null,
|
|
50
|
+
"clipPrompt": null,
|
|
50
51
|
"shareable": false,
|
|
51
52
|
"imageTags": [],
|
|
52
53
|
"userAssetIds": [],
|
|
@@ -57,8 +58,9 @@ Write `plan.json`:
|
|
|
57
58
|
```
|
|
58
59
|
|
|
59
60
|
- 3 to 8 scenes. Scene ids are short, unique, lowercase with dashes.
|
|
60
|
-
- `treatment` is `motion-graphic`, `illustration` or `footage-overlay`. With footage, `mode` is `"footage"` and every scene is `footage-overlay`; otherwise `mode` is `"motion"` and no scene is.
|
|
61
|
+
- `treatment` is `motion-graphic`, `illustration`, `clip` or `footage-overlay`. With footage, `mode` is `"footage"` and every scene is `footage-overlay`; otherwise `mode` is `"motion"` and no scene is.
|
|
61
62
|
- `imagePrompt` is set only for `illustration` scenes, with 3 to 6 `imageTags`. Set `shareable` to true only when the prompt is fully generic: no brand, product, person or detail specific to this user.
|
|
63
|
+
- `clipPrompt` is set only for `clip` scenes (a generated or reused video clip is the scene's picture; the rest of the scene uses `imageTags` and `shareable` as an illustration does). Clips are scarce: most videos have none or one or two.
|
|
62
64
|
- `userAssetIds` lists the ids of the user's files shown in that scene.
|
|
63
65
|
- `pace` is `slow`, `normal` or `fast`.
|
|
64
66
|
|
|
@@ -69,11 +71,13 @@ Run `reelkit plan check`; it prints the estimated length to tell the user. Fix e
|
|
|
69
71
|
### 4. Voice
|
|
70
72
|
`reelkit assets voiceover --all`. It records each scene and prints the real length of the video. If the user wants a different voice, change `voiceId` in `plan.json` and run it again with `--redo`.
|
|
71
73
|
|
|
72
|
-
### 5. Images
|
|
74
|
+
### 5. Images and clips
|
|
73
75
|
Read `reference/asset-reuse.md`. For each illustration scene, search first:
|
|
74
76
|
`reelkit assets search "<what the scene needs>" --kind image`
|
|
75
77
|
Each result starts with a match percentage: how likely it is good enough to reuse. Pull the best result (`reelkit assets pull <id> --scene <sceneId>`) when its match is 60% or more and, reading its description, it fits the scene. Otherwise generate: `reelkit assets gen image --scene <sceneId>`. Never give two scenes the same image.
|
|
76
78
|
|
|
79
|
+
For each clip scene, read `reference/clips.md`, then search `reelkit assets search "<what the clip shows>" --kind clip` and pull a 60% match (`reelkit assets pull <id> --scene <sceneId>`), or generate: `reelkit assets gen clip --scene <sceneId>` (add `--green` for a green-screen subject). It waits for the clip, which takes minutes; check what is left with `reelkit whoami`.
|
|
80
|
+
|
|
77
81
|
### 6. Composition
|
|
78
82
|
Read `reference/kit.md`, `reference/remotion-composition.md`, `reference/motion-design.md` and `reference/captions.md`.
|
|
79
83
|
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clips
|
|
3
|
+
description: Use when a scene might be a generated or reused video clip - B-roll that shows what the narration says, or a green-screen subject placed over your own graphics - including how to write the prompt, what a clip costs and how to layer it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Video clips
|
|
7
|
+
|
|
8
|
+
A clip is a few seconds of generated video. It is the most expensive thing Reelkit makes: it takes minutes and each one uses part of a small monthly allowance. Use it where nothing else carries the point.
|
|
9
|
+
|
|
10
|
+
## Is a clip worth it?
|
|
11
|
+
- Use a clip when the sentence is about something that moves and cannot be drawn well in code or as one still: a person doing something, an animal, weather, a crowd, water, a place seen from a moving camera.
|
|
12
|
+
- Do not use a clip for numbers, lists, steps, UI or anything with text (motion graphics do that better and cost nothing), nor for a concept one illustration shows (a still costs far less).
|
|
13
|
+
- Most videos need none, or one or two. Plan a clip scene with `"treatment": "clip"` and a `clipPrompt`; give it `imageTags` (3 to 6) like an illustration, and set `shareable` by the same rule as images.
|
|
14
|
+
- Check what is left before planning more: `reelkit whoami` shows `Clips: used/limit`, and when it resets. Clips are limited per month. If the allowance is gone, say so to the user and use an illustration or a motion graphic instead; do not work around it.
|
|
15
|
+
|
|
16
|
+
## Search first
|
|
17
|
+
`reelkit assets search "<what the clip shows>" --kind clip`. Each result starts with a match percentage. Pull the best one (`reelkit assets pull <id> --scene <sceneId>`) when it is 60% or more and its description fits the sentence; it is free and instant. Otherwise generate: `reelkit assets gen clip --scene <sceneId>`. Never give two scenes the same clip.
|
|
18
|
+
|
|
19
|
+
## Writing a clip prompt
|
|
20
|
+
- One subject, one action. "A fisherman pulls a net from a grey sea" is a clip; "a fisherman, his family at home, and the market" is three.
|
|
21
|
+
- Say the camera: "slow push-in", "handheld tracking shot", "static wide shot", "slow pan left".
|
|
22
|
+
- Say the light and the mood: "low golden sun", "overcast, soft light", "neon night".
|
|
23
|
+
- No text, letters, logos, signs or screens with content in the picture: the generator draws them wrong. Add the words yourself in the composition.
|
|
24
|
+
- It is 5 seconds by default (`--seconds 10` doubles the cost to the allowance only when the action truly needs it). Describe what happens in 5 seconds, not a story.
|
|
25
|
+
- The scene runs as long as its narration. A clip shorter than the scene holds its last frame, so end the action on a moment that can sit still.
|
|
26
|
+
- Generation takes up to several minutes. The command waits and prints a line every 30 seconds. If it gives up after ten minutes it prints the id and a `reelkit assets gen clip --resume <id> --scene <sceneId>` line: run it; it does not charge again.
|
|
27
|
+
|
|
28
|
+
## B-roll rules
|
|
29
|
+
- The clip shows exactly what the sentence says, at the moment it says it. If the sentence is abstract, the clip is the wrong tool.
|
|
30
|
+
- Never the same clip twice in a video, and no two clip scenes in a row that look alike.
|
|
31
|
+
- Speech never runs more than 3 seconds without something changing on screen: a new clip, a new text beat, a cut to a graphic. A 5-second clip under a 9-second scene needs a text change or a second visual in the middle.
|
|
32
|
+
- Text over a clip must stay legible. Use `<ClipLayer src={urls[s.clipKey]} dim={0.25} />` to darken it, keep headlines in the calm part of the picture, and look at the preview frames for contrast on both the early and the late frame.
|
|
33
|
+
|
|
34
|
+
## Green screen
|
|
35
|
+
A green-screen clip is a subject filmed on a flat pure green background. It is for a person or an object that you place over something of your own: a presenter pointing at the user's screenshot, a character beside your title, a product over a gradient.
|
|
36
|
+
- Generate it with `reelkit assets gen clip --scene <sceneId> --green`. The original is saved as `assets/clip-<sceneId>.mp4` and the green is keyed out locally into `assets/clip-<sceneId>.webm`, a video with a transparent background. The manifest has both: `s.clipKey` and `s.clipKeyedKey`. Use the `.webm`.
|
|
37
|
+
- Prompt it as a subject, not a scene: "A woman in a blue jacket, waist up, waves and then points to her left. Flat, evenly lit, pure green background (#00FF00)." Keep the whole subject inside the frame with room around it; no green anywhere on the subject (clothes, props, eyes); no shadows, floor or reflections on the background; no camera move, because keying a moving frame edge flickers.
|
|
38
|
+
- If the keyed edges look green or ragged in the preview, the prompt was at fault: regenerate once with a flatter green and an evenly lit subject, using `--redo`. A clip left unkeyed (the command says so) is keyed again for free by running the same command again.
|
|
39
|
+
- Layer it above the scene's background and below the captions:
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import { Img } from "remotion";
|
|
43
|
+
import { Captions, KeyedClip, SceneFrame } from "reelkit/kit";
|
|
44
|
+
|
|
45
|
+
<SceneFrame from={s.startFrame} durationInFrames={s.durationFrames}>
|
|
46
|
+
<Img src={urls[s.userAssetKeys[0]]} style={{ width: "100%", height: "100%", objectFit: "cover" }} />
|
|
47
|
+
{s.clipKeyedKey ? <KeyedClip src={urls[s.clipKeyedKey]} x={0.72} y={1} scale={0.7} /> : null}
|
|
48
|
+
<Captions words={s.words} />
|
|
49
|
+
</SceneFrame>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- A green-screen scene still has a `clip` treatment and a `clipPrompt`, with the background and the type in the composition. A library clip with the same use comes keyed too: `reelkit assets pull <id> --scene <sceneId>` writes the `.webm` beside the `.mp4` when the clip is marked green screen.
|
|
53
|
+
- It costs the same as any clip and is harder to get right: at most one or two green-screen clips per video.
|
|
54
|
+
|
|
55
|
+
## Your own green-screen footage
|
|
56
|
+
If the user filmed themselves or a product in front of a green background, register it with `reelkit assets upload ./me.mp4 --green --describe "what it shows"`. The original is kept and a copy with the green made transparent, sound included, is written beside it; the command prints the `urls[...]` path of that copy. The key colour is read from the corners of the frame, so the green does not have to be perfect, but it does have to fill the corners: a video whose corners are not green is refused. For a talking presenter, leave the copy's sound on (`muted={false}`) and do not also play the original.
|
|
57
|
+
|
|
58
|
+
## No green screen: cut the subject out
|
|
59
|
+
Use this when the footage or the clip is not on a green background but the subject has to be layered over something else.
|
|
60
|
+
- If the background is green, use `--green` instead: it is free and runs on this machine. A cutout is the fallback.
|
|
61
|
+
- `reelkit assets upload ./me.mp4 --cutout --describe "what it shows"` sends the video to the Reelkit server, where a GPU model separates the subject, and writes a transparent `.webm` (sound kept) beside the original; the command prints its `urls[...]` path. It takes about a minute. If it times out, the command prints the line that continues it (`--resume <id>`); that neither uploads nor charges again.
|
|
62
|
+
- The video leaves the user's machine, so ask the user before cutting out their footage.
|
|
63
|
+
- At most 20 seconds of video per cutout, counted in whole seconds against a monthly quota; `reelkit whoami` shows what is left.
|
|
64
|
+
- Use the result exactly like a keyed clip: `KeyedClip` with the `.webm`, and the Layers section below applies.
|
|
65
|
+
- Edges are best when the subject is well lit and clearly different from the background. Hair and fast motion can shimmer: check both preview frames.
|
|
66
|
+
- A generated clip can be cut out in one step: `reelkit assets gen clip --scene <sceneId> --cutout` makes the clip as usual, then cuts it out and records it as `s.clipKeyedKey`. If only the cutout fails, run the same command again: it does the cutout without paying for a new clip.
|
|
67
|
+
|
|
68
|
+
## Layers
|
|
69
|
+
A keyed clip is what makes real depth possible: things can sit behind the subject as well as in front. Build every such scene bottom to top, in this order, and keep to it:
|
|
70
|
+
|
|
71
|
+
1. **Background**: a mesh, a picture, the user's screenshot, a clip.
|
|
72
|
+
2. **Behind the subject**: the big title, a chart, a logo. The subject will cover part of it, which is the point: a headline that a person stands in front of reads as being in the room.
|
|
73
|
+
3. **The subject**: the keyed clip.
|
|
74
|
+
4. **In front of the subject**: small labels, a lower third, a callout pointing at what the subject holds.
|
|
75
|
+
5. **Captions**, always last.
|
|
76
|
+
|
|
77
|
+
- Text behind the subject must stay readable with part of it hidden: make it large, keep it to one to three words, and place it so the subject covers the middle or one end, never the first letters of a word.
|
|
78
|
+
- Give the subject a soft contact shadow or a slightly darker patch on the background where it stands, or it floats.
|
|
79
|
+
- Light direction should agree: if the clip is lit from the left, put the brighter side of the background on the left.
|
|
80
|
+
- Keep the subject's size steady across the scene. Move the layers around it, a slow push on the background and a smaller one on the subject, to get depth.
|
|
81
|
+
- Check both preview frames for a green fringe on the edges and for the subject hiding something that must be read.
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
import { AbsoluteFill } from "remotion";
|
|
85
|
+
import { BgMesh, Captions, KeyedClip, SceneFrame, fonts } from "reelkit/kit";
|
|
86
|
+
|
|
87
|
+
<SceneFrame from={s.startFrame} durationInFrames={s.durationFrames}>
|
|
88
|
+
<BgMesh bg="#101014" hero="#C6F135" />
|
|
89
|
+
<AbsoluteFill style={{ alignItems: "center", paddingTop: "18%", fontFamily: fonts.display, fontWeight: 900, fontSize: 260, color: "#ffffff" }}>LAUNCH</AbsoluteFill>
|
|
90
|
+
{s.clipKeyedKey ? <KeyedClip src={urls[s.clipKeyedKey]} x={0.5} y={1} scale={0.85} /> : null}
|
|
91
|
+
<Captions words={s.words} />
|
|
92
|
+
</SceneFrame>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Rules
|
|
96
|
+
- Search before generating, and generate once per scene. Do not regenerate to chase small improvements.
|
|
97
|
+
- `--share` only for a generic clip with nothing specific to this user; the user's own files stay private.
|
|
98
|
+
- Never claim a clip shows something it does not: look at the frames.
|
package/skill/reference/kit.md
CHANGED
|
@@ -34,6 +34,14 @@ FootageLayer { src: string; muted?: boolean; dim?: number }
|
|
|
34
34
|
Full-frame user footage. Place it once, outside the scenes, as the bottom layer. dim (0-1) darkens it for legibility.
|
|
35
35
|
<FootageLayer src={urls[manifest.footageKey]} dim={0.25} />
|
|
36
36
|
|
|
37
|
+
ClipLayer { src: string; muted?: boolean; dim?: number }
|
|
38
|
+
Full-frame generated or library video clip as a scene's picture (treatment "clip"). Place it inside the scene's SceneFrame as the bottom layer, so it starts with the scene. When the scene is longer than the clip it holds the last frame; it never loops. dim (0-1) darkens it for legibility.
|
|
39
|
+
<ClipLayer src={urls[s.clipKey]} dim={0.2} />
|
|
40
|
+
|
|
41
|
+
KeyedClip { src: string; x?: number; y?: number; scale?: number; muted?: boolean }
|
|
42
|
+
A green-screen clip with the green keyed out (the transparent .webm, s.clipKeyedKey). Lay it over your own background or screenshot, below the captions. x and y place its bottom centre as fractions of the frame (default x 0.5, y 1: bottom centre); scale is its width as a fraction of the frame width (default 1). Holds its last frame when the scene is longer.
|
|
43
|
+
<KeyedClip src={urls[s.clipKeyedKey]} x={0.5} y={1} scale={0.8} />
|
|
44
|
+
|
|
37
45
|
BgMesh { bg: string; hero: string; accent?: string }
|
|
38
46
|
The bottom layer of the video: the base colour with two slow-drifting soft colour fields. Use it instead of a flat background.
|
|
39
47
|
<BgMesh bg={palette.bg} hero={palette.hero} accent={palette.accent} />
|
|
@@ -48,7 +48,7 @@ Each `scenes` entry:
|
|
|
48
48
|
- Never hard-code a duration that the manifest already gives. Look scenes up by id when a scene needs bespoke content.
|
|
49
49
|
|
|
50
50
|
## Media
|
|
51
|
-
- Reference media only as `urls[path]`, where `path` is the file's project path, using the paths in the manifest: `s.voiceoverKey`, `s.imageKey`, `s.userAssetKeys`, `manifest.footageKey`. Never hard-code a URL.
|
|
51
|
+
- Reference media only as `urls[path]`, where `path` is the file's project path, using the paths in the manifest: `s.voiceoverKey`, `s.imageKey`, `s.clipKey`, `s.clipKeyedKey`, `s.userAssetKeys`, `manifest.footageKey`. Never hard-code a URL.
|
|
52
52
|
- A scene with narration has `s.voiceoverKey`: give it exactly one `<Voiceover src={urls[s.voiceoverKey]} />` inside its SceneFrame, and `<Captions words={s.words} />` unless the notes say otherwise.
|
|
53
53
|
- Footage mode (`manifest.footageKey` is set): one `<FootageLayer>` at the bottom, outside the scenes.
|
|
54
54
|
- User images: `<Img src={urls[key]} />` from remotion.
|
|
@@ -56,8 +56,9 @@ Each `scenes` entry:
|
|
|
56
56
|
## Layer stack (every video, bottom to top)
|
|
57
57
|
1. Background: `<BgMesh>` from the kit, or `<FootageLayer>` in footage mode. Never a flat solid colour.
|
|
58
58
|
2. Images: `<KenBurnsImage>` inside its scene. Every still image moves; alternate `direction` between consecutive image scenes.
|
|
59
|
-
3.
|
|
60
|
-
4.
|
|
59
|
+
3. Clips: `<ClipLayer>` inside its scene (a clip scene's picture); a green-screen `<KeyedClip>` above the scene's background and below its type and captions. See `reference/clips.md`.
|
|
60
|
+
4. Graphics and type, inside each scene's SceneFrame.
|
|
61
|
+
5. `<Grade>`, then `<Grain>`, then `<Vignette>`, once, at the very top of the video outside the scenes. In footage mode skip Grade.
|
|
61
62
|
|
|
62
63
|
## Shared overlays (optional)
|
|
63
64
|
- The library has ready-made overlay clips (`reelkit assets search "<description>" --kind overlay`): film marks, HUD frames, corner marks. They are white on black and are laid over the video with `<ScreenOverlay>`.
|
|
@@ -5,9 +5,10 @@ description: Use when choosing each scene's visual treatment and writing image p
|
|
|
5
5
|
|
|
6
6
|
# Choosing scene treatments
|
|
7
7
|
|
|
8
|
-
## The
|
|
8
|
+
## The four treatments
|
|
9
9
|
- **motion-graphic** - animated text, numbers, shapes and icons drawn in code. The default. Best for hooks, lists, statistics, steps and calls to action.
|
|
10
10
|
- **illustration** - one generated picture behind the text. Use when a concrete image carries the point better than type (an object, a place, a mood). At most half the scenes; each one costs money.
|
|
11
|
+
- **clip** - a few seconds of generated or reused video as the scene's picture (B-roll), or a green-screen subject over your own graphics. Needs a `clipPrompt`. Rare and costly: see `reference/clips.md` before using it.
|
|
11
12
|
- **footage-overlay** - text and graphics over the user's own video. Required for every scene when footage was supplied, and never used otherwise.
|
|
12
13
|
|
|
13
14
|
## Image prompts (illustration scenes only)
|
package/src/cli.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ApiFailure } from "./api/client";
|
|
3
|
-
import { assetsGenImage, assetsPull, assetsSearch, assetsUpload, assetsVoiceover, assetsVoices } from "./commands/assets";
|
|
3
|
+
import { assetsGenClip, assetsGenImage, assetsPull, assetsSearch, assetsUpload, assetsVoiceover, assetsVoices } from "./commands/assets";
|
|
4
4
|
import { authLogin, authLogout, whoami } from "./commands/auth";
|
|
5
5
|
import { check, preview, render } from "./commands/build";
|
|
6
6
|
import { init } from "./commands/init";
|
|
@@ -67,19 +67,28 @@ program.command("whoami").description("Show your account, quota and contribution
|
|
|
67
67
|
program.command("init [name]").description("Set up a video project (in a new folder named after it, or in this folder)").option("--aspect <aspect>", "9:16, 16:9 or 1:1").action(run(init));
|
|
68
68
|
|
|
69
69
|
const assets = program.command("assets").description("Find, add and generate the files a video needs");
|
|
70
|
-
assets.command("upload <file>").description("Add one of your own files to this project (private unless --share)")
|
|
71
|
-
.option("--describe <text>", "what the file shows").option("--footage", "use this video as the footage to overlay")
|
|
70
|
+
assets.command("upload <file>").description("Add one of your own files to this project (private unless --share; with --cutout the video is sent to the Reelkit server to be processed)")
|
|
71
|
+
.option("--describe <text>", "what the file shows").option("--footage", "use this video as the footage to overlay").option("--green", "the video is a subject on a green background: also make a copy with the green transparent (free, on this machine)")
|
|
72
|
+
.option("--cutout", "remove any background: the video is sent to the Reelkit server to be processed and a copy with a transparent background comes back (up to 20 seconds, counts against a monthly quota)")
|
|
73
|
+
.option("--resume <id>", "with --cutout: keep waiting for a cutout already started, without uploading or paying again")
|
|
72
74
|
.option("--share", "also send it to the shared library").option("--kind <kind>", "library kind when sharing").option("--tags <tags>", "comma-separated tags when sharing")
|
|
73
|
-
.
|
|
75
|
+
// Called with the arguments named: commander adds its own command object last, which must not be taken for the function's test hooks.
|
|
76
|
+
.action(run((ctx, file: string, opts: Parameters<typeof assetsUpload>[2]) => assetsUpload(ctx, file, opts)));
|
|
74
77
|
assets.command("search <query>").description("Search the shared library by meaning; each result shows how well it fits").option("--kind <kind>", "image, overlay, sfx, music, component or clip").option("--limit <n>", "how many results")
|
|
75
78
|
.action(run(assetsSearch));
|
|
76
|
-
assets.command("pull <id>").description("Download a library item into this project").option("--scene <sceneId>", "use it as this scene's image").option("--force", "replace a component file that already exists")
|
|
77
|
-
.action(run(assetsPull));
|
|
79
|
+
assets.command("pull <id>").description("Download a library item into this project").option("--scene <sceneId>", "use it as this scene's image or clip").option("--force", "replace a component file that already exists")
|
|
80
|
+
.action(run((ctx, id, opts) => assetsPull(ctx, id, opts)));
|
|
78
81
|
assets.command("voices").description("List the narration voices").action(run(assetsVoices));
|
|
79
82
|
assets.command("voiceover").description("Record the narration from plan.json").option("--scene <sceneId>", "one scene").option("--all", "every scene").option("--redo", "record again even if it exists")
|
|
80
83
|
.action(run(assetsVoiceover));
|
|
81
|
-
assets.command("gen").description("Generate an asset")
|
|
84
|
+
const gen = assets.command("gen").description("Generate an asset");
|
|
85
|
+
gen.command("image [prompt]").description("Generate a scene's illustration; the prompt defaults to the plan's")
|
|
82
86
|
.requiredOption("--scene <sceneId>", "the scene it is for").option("--redo", "generate a new image even if the scene has one").action(run(assetsGenImage));
|
|
87
|
+
gen.command("clip [prompt]").description("Generate a scene's video clip (takes minutes); the prompt defaults to the plan's clipPrompt")
|
|
88
|
+
.requiredOption("--scene <sceneId>", "the scene it is for").option("--green", "film it on green and key the green out into a transparent .webm")
|
|
89
|
+
.option("--cutout", "make the clip normally, then cut the subject out on the server (the video is sent to the Reelkit server to be processed; counts against a monthly quota)").option("--seconds <n>", "5 or 10 (default 5)")
|
|
90
|
+
.option("--share", "also add it to the shared library (only a generic clip)").option("--redo", "generate a new clip even if the scene has one").option("--resume <id>", "keep waiting for a clip already started, without paying again")
|
|
91
|
+
.action(run((ctx, prompt, opts) => assetsGenClip(ctx, prompt, opts)));
|
|
83
92
|
|
|
84
93
|
program.command("plan").description("Work with plan.json").command("check").description("Validate plan.json and list what to fix or improve").action(run(planCheck));
|
|
85
94
|
|