@nodaro/cli 1.28.0 → 1.29.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 CHANGED
@@ -152,11 +152,12 @@ nodaro voice design --description "..." --text "..." --watch
152
152
  nodaro voice remix --description "..." --text "..." --watch
153
153
  nodaro voice dub --audio <url> --target-language es --watch
154
154
 
155
- # Media — social-video import, trim, save, metadata probe
155
+ # Media — social-video import, trim, split into parts, save, metadata probe
156
156
  nodaro media download <url> [--max-height 720] [--section 30-90] --watch
157
157
  nodaro media metadata <url>
158
158
  nodaro media trim-video --video <url> --start 12 --end 48 --watch
159
159
  nodaro media trim-audio --video <url> --format wav --watch
160
+ nodaro media split-media --video <url> --chunk-duration 60 --min-part-duration 20 --watch
160
161
  nodaro media still-to-video --image <url> --audio <url> --motion ken-burns --watch
161
162
  nodaro media slideshow --images <url1> <url2> <url3> --audio <url> --transition dissolve --watch
162
163
  nodaro media save <url> [--type video] --watch
@@ -192,7 +193,7 @@ shows the shape, not every option.
192
193
  | Run a published app (with curated inputs/outputs) | `nodaro apps run <slug> --input k=v` |
193
194
  | Run a single node directly (one-shot, no DAG) | `nodaro nodes run <type> --param k=v` |
194
195
 
195
- The `nodes run` path is the SDK / CLI equivalent of the MCP server's verb tools (`generate_image`, `generate_video`, etc.) — the route convention is `POST /v1/<type>` for every generation node, so any node listed by `nodaro nodes list` can be invoked with `nodaro nodes run`.
196
+ The `nodes run` path is the SDK / CLI equivalent of the MCP server's verb tools (`generate_image`, `generate_video`, etc.) — it posts to the node's route (`POST /v1/<type>` for most node types; the SDK reference's `nodes.run` section lists the ones with a route of their own, such as `llm-chat` and the `suno-*` nodes), so any node listed by `nodaro nodes list` that runs on its own can be invoked with `nodaro nodes run`. A node type with no route of its own (`modify-image`, `paint-mask`, …) fails before calling the API, naming what to run instead.
196
197
 
197
198
  ### Param syntax
198
199
 
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ var require_package = __commonJS({
29
29
  "package.json"(exports$1, module) {
30
30
  module.exports = {
31
31
  name: "@nodaro/cli",
32
- version: "1.28.0",
32
+ version: "1.29.0",
33
33
  description: "Command-line interface for Nodaro \u2014 list and run workflows, inspect jobs and executions, manage projects from the terminal.",
34
34
  type: "module",
35
35
  license: "Apache-2.0",
@@ -70,11 +70,11 @@ var require_package = __commonJS({
70
70
  "@inquirer/confirm": "^6.0.12",
71
71
  "@inquirer/input": "^5.0.12",
72
72
  "@inquirer/select": "^5.1.4",
73
- "@nodaro/sdk": "^2.23.0",
74
- "@nodaro/shared": "^3.28.0",
73
+ "@nodaro/sdk": "^2.26.0",
74
+ "@nodaro/shared": "^3.31.0",
75
75
  commander: "^12.1.0",
76
76
  picocolors: "^1.1.1",
77
- "@nodaro/prompts": "^1.36.0"
77
+ "@nodaro/prompts": "^1.37.1"
78
78
  },
79
79
  devDependencies: {
80
80
  tsup: "^8.5.0",
@@ -398,7 +398,7 @@ function saveWorkspace(profileName, workspaceId) {
398
398
  }
399
399
 
400
400
  // src/client.ts
401
- var CLI_VERSION = "1.28.0" ;
401
+ var CLI_VERSION = "1.29.0" ;
402
402
  function buildClient(profileName) {
403
403
  const { name, profile } = getProfile(profileName);
404
404
  if (!profile) {
@@ -1304,6 +1304,7 @@ Examples:
1304
1304
  $ echo '{"prompt":"hi","provider":"flux"}' > body.json
1305
1305
  $ nodaro nodes run generate-image --params-file body.json --watch
1306
1306
  $ nodaro nodes run text-to-speech --param text="And so it begins." --param previousText="The night before, nobody slept." --param nextText="By noon the harbour was empty." --watch
1307
+ $ nodaro nodes run video-depth --param videoUrl=https://cdn.example/clip.mp4 --param colormap=turbo --watch
1307
1308
 
1308
1309
  Structured references (the editor's wired-reference shape) \u2014 let a {image:N} prompt
1309
1310
  token bind a labeled reference, assembled server-side into @image_N (same as the
@@ -2550,6 +2551,50 @@ Example:
2550
2551
  }
2551
2552
  }
2552
2553
  );
2554
+ cmd.command("split-media").description("cut a video and/or an audio file into parts between a minimum and a maximum length (frame/sample-exact)").option("--video <url>", "video URL to split").option("--audio <url>", "audio URL to split (split on its own when --video is given too)").requiredOption("--chunk-duration <sec>", "longest a part may be, in seconds (at least 1)", parseFloat).option("--min-part-duration <sec>", "shortest a part may be, in seconds (default 4, never above --chunk-duration)", parseFloat).option("--format <fmt>", "audio parts format: mp3 (default), wav, or aac").option("--watch", "poll until the job completes").option("--poll-interval <ms>", "watch poll interval in ms", (v) => parseInt(v, 10), 2e3).option("--profile <name>").option("--json").addHelpText("after", `
2555
+ The parts are on the finished job's output_data: videoUrls[] / audioUrls[], chunkCount, partDurationsSec[].
2556
+
2557
+ Examples:
2558
+ $ nodaro media split-media --video https://.../talk.mp4 --chunk-duration 60 --watch
2559
+ $ nodaro media split-media --audio https://.../episode.mp3 --chunk-duration 300 --min-part-duration 120 --format wav --watch`).action(
2560
+ async (opts) => {
2561
+ try {
2562
+ if (!opts.video && !opts.audio) {
2563
+ warn("Provide --video <url>, --audio <url>, or both");
2564
+ process.exit(1);
2565
+ }
2566
+ if (!Number.isFinite(opts.chunkDuration) || opts.chunkDuration < 1) {
2567
+ warn("--chunk-duration must be a number of seconds, at least 1");
2568
+ process.exit(1);
2569
+ }
2570
+ if (opts.minPartDuration !== void 0) {
2571
+ if (!Number.isFinite(opts.minPartDuration) || opts.minPartDuration < 0) {
2572
+ warn("--min-part-duration must be a number of seconds, 0 or more");
2573
+ process.exit(1);
2574
+ }
2575
+ if (opts.minPartDuration > opts.chunkDuration) {
2576
+ warn("--min-part-duration must not be longer than --chunk-duration");
2577
+ process.exit(1);
2578
+ }
2579
+ }
2580
+ if (opts.format && !["mp3", "wav", "aac"].includes(opts.format)) {
2581
+ warn(`--format must be mp3, wav, or aac (got "${opts.format}")`);
2582
+ process.exit(1);
2583
+ }
2584
+ const client = buildClient(opts.profile);
2585
+ const result = await client.media.splitMedia({
2586
+ ...opts.video ? { videoUrl: opts.video } : {},
2587
+ ...opts.audio ? { audioUrl: opts.audio } : {},
2588
+ chunkDuration: opts.chunkDuration,
2589
+ ...opts.minPartDuration !== void 0 ? { minPartDuration: opts.minPartDuration } : {},
2590
+ ...opts.format ? { audioFormat: opts.format } : {}
2591
+ });
2592
+ await reportQueuedJob(result, () => client.jobs.get(result.jobId), { ...opts, note: "split into chunks" });
2593
+ } catch (err) {
2594
+ handleError(err);
2595
+ }
2596
+ }
2597
+ );
2553
2598
  cmd.command("add-captions <videoUrl>").description(
2554
2599
  "burn captions into a video \u2014 static subtitles, or a kinetic word-highlight / karaoke / tiktok-words / word-pop / bouncy render"
2555
2600
  ).option("--text <text>", "the caption text \u2014 spaced evenly across the video when no word timings are given").option(