@nodaro/cli 1.5.0 → 1.7.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
@@ -69,7 +69,7 @@ nodaro auth logout # delete the saved profile
69
69
  Switch between staging / prod / local instances with `--profile`:
70
70
 
71
71
  ```bash
72
- nodaro auth login --profile prod --base-url https://api.nodaro.ai
72
+ nodaro auth login --profile prod --base-url https://app.nodaro.ai
73
73
  nodaro auth login --profile staging --base-url https://next.nodaro.ai
74
74
  nodaro auth login --profile local --base-url http://localhost:8000
75
75
 
@@ -230,7 +230,7 @@ npm install @nodaro/sdk
230
230
  import { createClient, StaticTokenAuth } from "@nodaro/sdk"
231
231
 
232
232
  const nodaro = createClient({
233
- baseUrl: "https://api.nodaro.ai",
233
+ baseUrl: "https://app.nodaro.ai",
234
234
  auth: new StaticTokenAuth(process.env.NODARO_TOKEN!),
235
235
  })
236
236
 
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.5.0",
32
+ version: "1.7.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": "^1.8.0",
74
- "@nodaro/shared": "^1.14.0",
73
+ "@nodaro/sdk": "^1.11.0",
74
+ "@nodaro/shared": "^1.23.0",
75
75
  commander: "^12.1.0",
76
76
  picocolors: "^1.1.1",
77
- "@nodaro/prompts": "^1.4.0"
77
+ "@nodaro/prompts": "^1.5.0"
78
78
  },
79
79
  devDependencies: {
80
80
  tsup: "^8.5.0",
@@ -1509,14 +1509,17 @@ function commonWizardFields(opts) {
1509
1509
  aspectRatio: opts.aspectRatio,
1510
1510
  duration: opts.duration,
1511
1511
  llmModel: opts.llmModel,
1512
- reasoningEffort: opts.reasoningEffort
1512
+ reasoningEffort: opts.reasoningEffort,
1513
+ advancedMode: opts.advanced,
1514
+ temperature: opts.temperature,
1515
+ maxTokens: opts.maxTokens
1513
1516
  };
1514
1517
  }
1515
1518
  function promptCommand() {
1516
1519
  const cmd = new Command("prompt").description(
1517
1520
  "AI prompt wizard \u2014 analyze, generate, and enhance prompts for generation nodes"
1518
1521
  );
1519
- cmd.command("wizard").description("interactive: answer guided questions and get an optimized prompt").option("--node-type <type>", "target node type (omit for an interactive picker)").option("--prompt <text>", "your rough idea (optional)").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--profile <name>").action(async (opts) => {
1522
+ cmd.command("wizard").description("interactive: answer guided questions and get an optimized prompt").option("--node-type <type>", "target node type (omit for an interactive picker)").option("--prompt <text>", "your rough idea (optional)").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--advanced", "Gemini models only: run on the provider's own API so --temperature/--max-tokens/the full reasoning range apply. Bills one credit tier up.").option("--temperature <n>", "Sampling temperature (only with --advanced)", parseFloat).option("--max-tokens <n>", "Output token cap (only with --advanced)", (v) => parseInt(v, 10)).option("--profile <name>").action(async (opts) => {
1520
1523
  try {
1521
1524
  if (!isInteractive()) {
1522
1525
  warn("`prompt wizard` needs an interactive terminal \u2014 use `prompt analyze` + `prompt generate`, or `prompt enhance`, in scripts.");
@@ -1566,7 +1569,7 @@ function promptCommand() {
1566
1569
  handleError(err);
1567
1570
  }
1568
1571
  });
1569
- cmd.command("analyze").description("return guided questions for a rough prompt idea").requiredOption("--node-type <type>").option("--prompt <text>").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--profile <name>").option("--json").action(async (opts) => {
1572
+ cmd.command("analyze").description("return guided questions for a rough prompt idea").requiredOption("--node-type <type>").option("--prompt <text>").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--advanced", "Gemini models only: run on the provider's own API so --temperature/--max-tokens/the full reasoning range apply. Bills one credit tier up.").option("--temperature <n>", "Sampling temperature (only with --advanced)", parseFloat).option("--max-tokens <n>", "Output token cap (only with --advanced)", (v) => parseInt(v, 10)).option("--profile <name>").option("--json").action(async (opts) => {
1570
1573
  try {
1571
1574
  const client = buildClient(opts.profile);
1572
1575
  const { jobId, questions } = await client.promptHelper.analyze({
@@ -1591,7 +1594,7 @@ function promptCommand() {
1591
1594
  handleError(err);
1592
1595
  }
1593
1596
  });
1594
- cmd.command("generate").description("build an optimized prompt from --selection category=value flags").requiredOption("--node-type <type>").option("--selection <pairs...>", "category=value (repeat); custom answers are wizard-only", collectVariadic).option("--original-prompt <text>").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--profile <name>").option("--json").action(async (opts) => {
1597
+ cmd.command("generate").description("build an optimized prompt from --selection category=value flags").requiredOption("--node-type <type>").option("--selection <pairs...>", "category=value (repeat); custom answers are wizard-only", collectVariadic).option("--original-prompt <text>").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--advanced", "Gemini models only: run on the provider's own API so --temperature/--max-tokens/the full reasoning range apply. Bills one credit tier up.").option("--temperature <n>", "Sampling temperature (only with --advanced)", parseFloat).option("--max-tokens <n>", "Output token cap (only with --advanced)", (v) => parseInt(v, 10)).option("--profile <name>").option("--json").action(async (opts) => {
1595
1598
  try {
1596
1599
  const client = buildClient(opts.profile);
1597
1600
  const selections = parseSelectionPairs(opts.selection);
@@ -1611,7 +1614,7 @@ function promptCommand() {
1611
1614
  handleError(err);
1612
1615
  }
1613
1616
  });
1614
- cmd.command("enhance").description("rewrite a rough idea into one optimized prompt (no questions)").requiredOption("--node-type <type>").option("--prompt <text>").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--profile <name>").option("--json").action(async (opts) => {
1617
+ cmd.command("enhance").description("rewrite a rough idea into one optimized prompt (no questions)").requiredOption("--node-type <type>").option("--prompt <text>").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--advanced", "Gemini models only: run on the provider's own API so --temperature/--max-tokens/the full reasoning range apply. Bills one credit tier up.").option("--temperature <n>", "Sampling temperature (only with --advanced)", parseFloat).option("--max-tokens <n>", "Output token cap (only with --advanced)", (v) => parseInt(v, 10)).option("--profile <name>").option("--json").action(async (opts) => {
1615
1618
  try {
1616
1619
  const client = buildClient(opts.profile);
1617
1620
  const result = await client.promptHelper.enhance({
@@ -2074,7 +2077,7 @@ function parseSection(raw) {
2074
2077
  }
2075
2078
  function mediaCommand() {
2076
2079
  const cmd = new Command("media").description(
2077
- "media ingestion \u2014 pull a social video into storage, trim video/audio, save a URL to storage, probe metadata"
2080
+ "media ingestion + compositing \u2014 pull a social video into storage, trim video/audio, collage images, save a URL to storage, probe metadata"
2078
2081
  );
2079
2082
  cmd.command("download <url>").description("download a social video (YouTube / TikTok / Instagram / X / Facebook) into your storage").option("--max-height <px>", "cap the resolution (e.g. 720); omit for best available", (v) => parseInt(v, 10)).option("--section <a-b>", 'fetch ONLY this time range in seconds (e.g. "30-90"); the cut lands on keyframes, so pad and trim after').option("--watch", "stream the download's live progress until it completes").option("--profile <name>").option("--json").addHelpText("after", `
2080
2083
  Examples:
@@ -2198,6 +2201,56 @@ Example:
2198
2201
  }
2199
2202
  }
2200
2203
  );
2204
+ cmd.command("collage <imageUrls...>").description("composite 2\u201330 images into ONE large 2K/4K collage (smart justified layout \u2014 no cropping \u2014 or uniform grid)").option(
2205
+ "--sizes <list>",
2206
+ "comma-separated per-image size hints aligned with the images: 0 auto (default), 1 big (~2\xD7 linear), 2 medium, 3 small (~\xBD). Relative \u2014 smart layout only"
2207
+ ).option("--layout <layout>", "smart (default \u2014 justified rows, output height floats) or grid (uniform letterboxed cells)").option("--resolution <res>", "long-edge resolution: 2K or 4K (default 4K)").option("--aspect-ratio <W:H>", 'output canvas ratio, e.g. "4:3" (exact in grid; a target shape in smart)').option("--gap <px>", "gap between images + outer margin in px (default 24)", (v) => parseInt(v, 10)).option("--background-color <hex>", "background shown in the gaps, #RRGGBB").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", `
2208
+ Examples:
2209
+ $ nodaro media collage https://x/a.png https://x/b.png https://x/c.png --watch
2210
+ $ nodaro media collage https://x/hero.png https://x/b.png https://x/c.png --sizes 1,3,3 --aspect-ratio 16:9 --watch
2211
+
2212
+ --sizes aligns by position: "1,3,3" renders the first image big and the other
2213
+ two small. Hints are relative \u2014 all-equal hints change nothing, and the grid
2214
+ layout ignores them.`).action(
2215
+ async (imageUrls, opts) => {
2216
+ try {
2217
+ if (imageUrls.length < 2) {
2218
+ warn(`Provide at least 2 image URLs (got ${imageUrls.length})`);
2219
+ process.exit(1);
2220
+ }
2221
+ if (opts.layout && !["smart", "grid"].includes(opts.layout)) {
2222
+ warn(`--layout must be smart or grid (got "${opts.layout}")`);
2223
+ process.exit(1);
2224
+ }
2225
+ if (opts.resolution && !["2K", "4K"].includes(opts.resolution)) {
2226
+ warn(`--resolution must be 2K or 4K (got "${opts.resolution}")`);
2227
+ process.exit(1);
2228
+ }
2229
+ let imageSizes;
2230
+ if (opts.sizes !== void 0) {
2231
+ const parsed = opts.sizes.split(",").map((s) => parseInt(s.trim(), 10));
2232
+ if (parsed.some((n) => !Number.isInteger(n) || n < 0 || n > 3) || parsed.length > imageUrls.length) {
2233
+ warn(`--sizes must be comma-separated 0\u20133 hints, at most one per image (got "${opts.sizes}")`);
2234
+ process.exit(1);
2235
+ }
2236
+ imageSizes = parsed;
2237
+ }
2238
+ const client = buildClient(opts.profile);
2239
+ const result = await client.media.imageCollage({
2240
+ imageUrls,
2241
+ ...imageSizes ? { imageSizes } : {},
2242
+ ...opts.layout ? { layout: opts.layout } : {},
2243
+ ...opts.resolution ? { resolution: opts.resolution } : {},
2244
+ ...opts.aspectRatio ? { aspectRatio: opts.aspectRatio } : {},
2245
+ ...opts.gap !== void 0 ? { gap: opts.gap } : {},
2246
+ ...opts.backgroundColor ? { backgroundColor: opts.backgroundColor } : {}
2247
+ });
2248
+ await reportQueuedJob(result, () => client.jobs.get(result.jobId), { ...opts, note: "image collage" });
2249
+ } catch (err) {
2250
+ handleError(err);
2251
+ }
2252
+ }
2253
+ );
2201
2254
  cmd.command("save <url>").description("copy an external media URL into your Nodaro storage (server-side fetch)").option("--filename <name>", "filename to store it under").option("--type <type>", "media type hint: image, video, or audio").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").action(
2202
2255
  async (url, opts) => {
2203
2256
  try {