videodraft 0.2.0 → 0.2.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 CHANGED
@@ -30,18 +30,9 @@ export VIDEODRAFT_API_KEY=vd_mcp_… # headless / CI — no login command neede
30
30
 
31
31
  Credentials are stored in `~/.config/videodraft/config.json` (0600). `videodraft logout` revokes and clears them.
32
32
 
33
- ## The pipeline
33
+ ## Asset generation first
34
34
 
35
- ```bash
36
- videodraft credits # know your budget
37
- videodraft create "<idea>" --ar 9:16 # idea → script → visual assets → storyboard
38
- videodraft shots <project> --grid --estimate # preview the cost…
39
- videodraft shots <project> --grid # …then batch-generate every shot image
40
- videodraft produce <project> # voiceovers + captions + production timeline
41
- videodraft export <project> --download final.mp4
42
- ```
43
-
44
- Single assets don't need a project:
35
+ Standalone images, clips and audio are complete deliverables. They do not need a VideoDraft project unless you want to attach them to an existing project or turn them into a multi-scene production.
45
36
 
46
37
  ```bash
47
38
  videodraft generate image "isometric workspace, warm light" --num 4 --download "./out/{job_id}_{index}.{ext}"
@@ -56,6 +47,32 @@ videodraft upscale image ./photo.png --scale 4x --download ./photo-4x.png
56
47
  videodraft avatar create ./founder.jpg --script "$(videodraft avatar script 'our launch' --json | jq -r .script)"
57
48
  ```
58
49
 
50
+ Discover the full asset lane:
51
+
52
+ ```bash
53
+ videodraft tools list
54
+ videodraft tools list --lane assets
55
+ videodraft tools list --lane asset_io
56
+ videodraft models image
57
+ videodraft models video
58
+ videodraft models audio
59
+ ```
60
+
61
+ Asset I/O is part of the asset workflow: `videodraft upload`, `videodraft download`, generation `--download`, and local refs like `--ref ./image.png` make files usable by agents and visible in local workspaces.
62
+
63
+ ## The project pipeline
64
+
65
+ Use projects when the user asks for a story, storyboard, editable web project, timeline, production flow, or exported MP4.
66
+
67
+ ```bash
68
+ videodraft credits # know your budget
69
+ videodraft create "<idea>" --ar 9:16 # idea → script → visual assets → storyboard
70
+ videodraft shots <project> --grid --estimate # preview the cost…
71
+ videodraft shots <project> --grid # …then batch-generate every shot image
72
+ videodraft produce <project> # voiceovers + captions + production timeline
73
+ videodraft export <project> --download final.mp4
74
+ ```
75
+
59
76
  ## Commands
60
77
 
61
78
  | Group | Commands |
@@ -67,7 +84,7 @@ videodraft avatar create ./founder.jpg --script "$(videodraft avatar script 'our
67
84
  | Generate | `generate image/video/voiceover/music/sound-effect/dialogue/voice-changer/dub` `upscale image/video` `avatar script/create/render/get/list` |
68
85
  | Jobs | `status <job>` `wait <job>` `generations` |
69
86
  | Media | `upload <file>` `media list` `describe <url\|file>` `download <url>` |
70
- | Everything else | `tools list` `tools schema <name>` `call <tool> --args '<json>'` |
87
+ | Everything else | `tools list [--lane assets\|asset_io\|project_data\|production]` `tools schema <name>` `call <tool> --args '<json>'` |
71
88
  | Agents | `skills install [--agent claude\|codex\|cursor]` `skills path` |
72
89
  | Utility | `config get/set/path` `completion bash\|zsh` `docs` `--version` |
73
90
 
package/dist/index.js CHANGED
@@ -24,8 +24,8 @@ function readVersionFromDisk() {
24
24
  }
25
25
  }
26
26
  function resolveVersion() {
27
- if ("0.2.0") {
28
- return "0.2.0";
27
+ if ("0.2.1") {
28
+ return "0.2.1";
29
29
  }
30
30
  return readVersionFromDisk();
31
31
  }
@@ -2576,19 +2576,97 @@ function parseKeyValueArgs(pairs) {
2576
2576
  }
2577
2577
  return args;
2578
2578
  }
2579
+ var CATEGORY_ORDER = [
2580
+ "asset_generation",
2581
+ "asset_io",
2582
+ "asset_library",
2583
+ "project_creation",
2584
+ "project_data",
2585
+ "production",
2586
+ "account_models_costs",
2587
+ "jobs",
2588
+ "danger_zone",
2589
+ "raw"
2590
+ ];
2591
+ var LANE_ORDER = [
2592
+ "assets",
2593
+ "asset_io",
2594
+ "projects",
2595
+ "project_data",
2596
+ "production",
2597
+ "library",
2598
+ "account",
2599
+ "danger",
2600
+ "raw"
2601
+ ];
2602
+ function firstSentence(description) {
2603
+ return description.split(/[.!]\s/)[0].slice(0, 90);
2604
+ }
2579
2605
  function registerToolCommands(program) {
2580
2606
  const tools = program.command("tools").description("Inspect the full MCP tool catalog");
2581
- tools.command("list", { isDefault: true }).description("List every available tool").action(async function() {
2607
+ tools.command("list", { isDefault: true }).description("List the grouped VideoDraft tool catalog").option(
2608
+ "--lane <lane>",
2609
+ "filter by lane: assets | asset_io | projects | project_data | production | library | account | danger | raw"
2610
+ ).option(
2611
+ "--category <category>",
2612
+ "filter by category, e.g. asset_generation, asset_io, project_data, or production"
2613
+ ).action(async function() {
2582
2614
  const ctx = buildContext(this);
2583
- const list = await ctx.client.listTools();
2584
- emit(ctx.out, list.map((t) => ({ name: t.name, description: t.description })), (o) => {
2585
- table(
2615
+ const opts = this.opts();
2616
+ if (opts.lane && !LANE_ORDER.includes(opts.lane)) {
2617
+ throw new CliError(
2618
+ `Unknown lane "${opts.lane}". Expected one of: ${LANE_ORDER.join(", ")}`,
2619
+ EXIT.USAGE
2620
+ );
2621
+ }
2622
+ if (opts.category && !CATEGORY_ORDER.includes(opts.category)) {
2623
+ throw new CliError(
2624
+ `Unknown category "${opts.category}". Expected one of: ${CATEGORY_ORDER.join(", ")}`,
2625
+ EXIT.USAGE
2626
+ );
2627
+ }
2628
+ let summary;
2629
+ const catalog = await ctx.client.callTool(
2630
+ "get_tool_catalog",
2631
+ compact({ lane: opts.lane, category: opts.category })
2632
+ );
2633
+ summary = catalog?.tools ?? [];
2634
+ emit(ctx.out, summary, (o) => {
2635
+ const categories = Array.from(
2636
+ new Set(summary.map((tool) => tool.category))
2637
+ ).sort((a, b) => {
2638
+ const ai = CATEGORY_ORDER.indexOf(a);
2639
+ const bi = CATEGORY_ORDER.indexOf(b);
2640
+ return (ai === -1 ? 999 : ai) - (bi === -1 ? 999 : bi) || a.localeCompare(b);
2641
+ });
2642
+ if (categories.length === 0) {
2643
+ table(o, ["name", "type", "risk", "description"], []);
2644
+ }
2645
+ for (const category of categories) {
2646
+ const rows = summary.filter((tool) => tool.category === category);
2647
+ process.stdout.write(`
2648
+ ${fmt.bold(o, category)}
2649
+ `);
2650
+ table(
2651
+ o,
2652
+ ["name", "type", "risk", "description"],
2653
+ rows.map((tool) => [
2654
+ tool.name,
2655
+ tool.subcategory ?? "",
2656
+ tool.risks.join(","),
2657
+ firstSentence(tool.description)
2658
+ ])
2659
+ );
2660
+ }
2661
+ const suffix = opts.lane ? ` in lane "${opts.lane}"` : opts.category ? ` in category "${opts.category}"` : "";
2662
+ note(
2586
2663
  o,
2587
- ["name", "description"],
2588
- list.map((t) => [t.name, t.description.split(/[.!]\s/)[0].slice(0, 90)])
2664
+ fmt.dim(
2665
+ o,
2666
+ `
2667
+ ${summary.length} tools${suffix}. Inspect one: videodraft tools schema <name>`
2668
+ )
2589
2669
  );
2590
- note(o, fmt.dim(o, `
2591
- ${list.length} tools. Inspect one: videodraft tools schema <name>`));
2592
2670
  });
2593
2671
  });
2594
2672
  tools.command("schema <name>").description("Show a tool's description and JSON input schema").action(async function(name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videodraft",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Official VideoDraft CLI — create AI videos, images and audio from your terminal. Agent-friendly: --json everywhere, stable exit codes, async job polling.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -5,7 +5,11 @@ description: Create AI videos, images, voiceovers, music, sound effects, dialogu
5
5
 
6
6
  # VideoDraft
7
7
 
8
- VideoDraft is an AI video creation platform: idea script storyboard (scenes + shot images) → production (voiceover, captions, motion clips, music) → exported MP4. You can drive all of it from this environment.
8
+ VideoDraft is an AI video creation platform where asset generation is the priority lane:
9
+
10
+ - **Asset generation**: standalone images, video clips, voiceovers, music, sound effects, dialogue, voice-changed audio, dubbed media, upscales, and image descriptions. This is the fastest and most important lane. Treat these as complete deliverables when the user asks for assets.
11
+ - **Asset I/O**: upload local files, download outputs, auto-upload local references, and save generated media where the user can see it.
12
+ - **Project production**: idea → script → storyboard (scenes + shot images) → project data → production timeline → exported MP4. Use this only when the user asks for a story, storyboard, editable project, timeline, or final video.
9
13
 
10
14
  ## How to connect
11
15
 
@@ -17,15 +21,18 @@ Two equivalent surfaces (same backend, same credits, same projects):
17
21
  • HEADLESS / CI (no browser): set `VIDEODRAFT_API_KEY=vd_mcp_...` (a token the user mints at https://app.videodraft.ai/mcp-keys).
18
22
  • SECURITY: never ask the user to paste a `vd_mcp_...` token into the chat — use browser `login` or the env var so the token never lands in the transcript.
19
23
  - Every command accepts `--json` (parse this, don't scrape text). Exit codes: 0 ok, 1 error, 2 usage, 3 auth (see Auth above), 4 insufficient credits (→ tell the user, don't retry).
20
- - Full API access: `videodraft tools list`, `videodraft tools schema <name>`, `videodraft call <tool> --args '<json>'`.
24
+ - Tool discovery: start with `videodraft tools list` for the grouped catalog, then narrow with `videodraft tools list --lane assets`, `--lane asset_io`, `--lane project_data`, or `--lane production`.
25
+ - Asset lane: `videodraft generate image|video|voiceover|music|sound-effect|dialogue|voice-changer|dub`, `videodraft upload`, and `videodraft download`.
26
+ - Full API access: `videodraft tools schema <name>`, `videodraft call <tool> --args '<json>'`.
21
27
  2. **MCP connector**: if VideoDraft MCP tools (e.g. `generate_storyboard_from_idea`) are available, call them directly — the CLI's curated commands map 1:1 onto these tools.
22
28
 
23
- ## First decision: asset or video?
29
+ ## First decision: asset or project?
24
30
 
25
- - **One standalone asset** (a single image, clip, voiceover, music track, sound effect, dialogue track, voice-changed file, or dubbed media file, no story): generate it directly. Do NOT create a project.
31
+ - **One standalone asset** (image, clip, voiceover, music track, sound effect, dialogue track, voice-changed file, dubbed media file, upscale, or description): generate it directly. Do NOT create a project.
26
32
  - `videodraft generate image "a red fox in snow, cinematic" --ar 16:9 --download ./out/`
27
33
  - `videodraft generate video "slow dolly over a misty lake" --model google-veo3.1 --duration 6 --download ./out/`
28
- - **A video / ad / explainer / anything multi-scene**: create a project so the work stays organized, editable in the web app, and exportable.
34
+ - **A small set of related assets**: still stay in the asset lane. Use an AI Studio session if you need to group related generations, but do not make a storyboard/project unless the user asks for one.
35
+ - **A multi-scene video / ad / explainer, storyboard, timeline, or final exported video**: create a project so the work stays organized, editable in the web app, and exportable.
29
36
  - `videodraft create "30s launch video for our espresso machine" --ar 9:16`
30
37
  - **Just a script** (no video asked for): `videodraft create "..." --script-only`. Stop at the script — do not build a storyboard the user didn't ask for.
31
38
  - **Iterating on existing work**: find it first (`videodraft projects list`) and reuse that project. Never create a new project to change an existing one.