makaron-cli 0.9.0 → 0.10.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
@@ -218,10 +218,11 @@ npx makaron-cli analyze --video input.mp4 "describe the key actions and pacing"
218
218
 
219
219
  # 3a. Submit image-to-video rendering (images must be public URLs from step 1 or uploaded)
220
220
  npx makaron-cli video create --script "Shot 1 (5s): <<<image_1>>> ..." --image https://...jpg --duration 5 --model kling
221
+ npx makaron-cli video create --script "Shot 1 (5s): <<<image_1>>> slow cinematic push-in with native ambience" --image https://...jpg --duration 5 --model grok
221
222
 
222
223
  # 3b. Edit a video from a local file or public URL
223
- npx makaron-cli video create --script "make it funny" --video input.mp4 --duration 5 --model seedance
224
- npx makaron-cli video create --script "make it warmer and cinematic" --video https://example.com/input.mp4 --duration 5 --model seedance
224
+ npx makaron-cli video create --script "make it funny" --video input.mp4 --duration 5 --model seedance-fast
225
+ npx makaron-cli video create --script "make it warmer and cinematic" --video https://example.com/input.mp4 --duration 5 --model seedance --video-resolution 1080p
225
226
 
226
227
  # 4. Check status
227
228
  npx makaron-cli video status <taskId>
@@ -233,9 +234,9 @@ For project/timeline video editing, use:
233
234
  npx makaron-cli chat --project <id|auto> --video input.mp4 -b "make it funny"
234
235
  ```
235
236
 
236
- Options for `video create`: `--script "..."`, `--script-file <path>`, `--image <url>` (repeatable, up to 7), `--video <file|url>`, `--duration <seconds>`, `--aspect 9:16|16:9|1:1`, `--model kling|seedance`. SeeDance accepts integer output duration 4-15s (default 5s); Kling supports 5-15s.
237
+ Options for `video create`: `--script "..."`, `--script-file <path>`, `--image <url>` (repeatable, up to 7), `--video <file|url>`, `--duration <seconds>`, `--aspect 9:16|16:9|1:1`, `--model seedance-fast|seedance|kling|grok`, `--video-resolution auto|480p|720p|1080p|4k`. Default model is `seedance-fast`. SeeDance accepts integer output duration 4-15s (default 5s); Kling supports 5-15s; Grok 1.5 supports 1-15s single-image-to-video only. For `--model grok`, forced `--aspect` is ignored to avoid xAI stretching the source image; pad/create the image at the target shape first or use another model.
237
238
 
238
- Video edit model behavior: `--model kling --video` uses Kling base/direct edit internally; `--model seedance --video` uses the Seedance video-reference path and requires target <=15s, <=50MB, width/height 300-6000px, aspect ratio 0.4-2.5, and frame pixels 409,600-2,086,876. Tiny metadata padding up to 15.5s is accepted and output duration is clamped to 15s.
239
+ Video edit model behavior: `--model kling --video` uses Kling base/direct edit internally; `--model seedance-fast --video` or `--model seedance --video` uses the SeeDance video-reference path and requires target <=15s, <=50MB, width/height 300-6000px, aspect ratio 0.4-2.5, and frame pixels 409,600-2,086,876. Tiny metadata padding up to 15.5s is accepted and output duration is clamped to 15s. Grok does not support video references.
239
240
 
240
241
  ### `music` — Music generation
241
242
 
@@ -350,7 +351,7 @@ send_message "All done!"
350
351
  - One project = one conversation thread. All history is preserved.
351
352
  - One run at a time per project. New message interrupts previous run.
352
353
  - Multi-image: `create --image a.jpg --image b.jpg` or `chat --image ref.jpg`.
353
- - Videos take 2-5 minutes to render. Use `responses get <runId> --wait --json` for the default customer-service path.
354
+ - Most videos take 3-5 minutes; Grok is usually around 30-40 seconds. Use `responses get <runId> --wait --json` for the default customer-service path.
354
355
  - Music takes ~60 seconds. Appears in output when done.
355
356
  - Images are typically ready in 15-30 seconds.
356
357
  - stdout is always machine-readable JSON/text. Human-friendly logs go to stderr.
package/bin/makaron.mjs CHANGED
@@ -274,7 +274,8 @@ Options:
274
274
  --image <file|url> Attach a reference image or screenshot. Repeatable.
275
275
  --video <file|url> Attach a video to the project timeline. Repeatable.
276
276
  --model <name> Preferred image/model route.
277
- --video-model <name> Preferred video model.
277
+ --video-model <name> Preferred video model: seedance-fast, seedance, kling, or grok.
278
+ --video-resolution <res> Video resolution: auto, 480p, 720p, 1080p, or 4k.
278
279
  --background, -b Submit and print a runId.
279
280
  --json Output structured JSON.
280
281
  --stream Legacy live SSE stream.
@@ -441,6 +442,7 @@ async function submitRun(baseUrl, headers, projectId, prompt, opts = {}) {
441
442
  const body = { projectId, prompt };
442
443
  if (opts.preferredModel) body.preferredModel = opts.preferredModel;
443
444
  if (opts.videoModel) body.videoModel = opts.videoModel;
445
+ if (opts.videoResolution) body.videoResolution = opts.videoResolution;
444
446
  if (opts.currentSnapshotIndex != null) body.currentSnapshotIndex = opts.currentSnapshotIndex;
445
447
  if (opts.isNsfw) body.isNsfw = opts.isNsfw;
446
448
 
@@ -1113,12 +1115,12 @@ function printHelp(topic, subtopic) {
1113
1115
  console.log('Usage: makaron analyze --video <file|url> ["question"]');
1114
1116
  } else if (topic === 'video') {
1115
1117
  if (subtopic === 'script') console.log('Usage: makaron video script --image <file> [--image <file>] [--lang en|zh] "direction"');
1116
- else if (subtopic === 'create') console.log('Usage: makaron video create --script "..." (--image <url> | --video <public-url>) [--duration 10] [--aspect 9:16] [--model kling|seedance] [--keep-original-sound]');
1118
+ else if (subtopic === 'create') console.log('Usage: makaron video create --script "..." (--image <url> | --video <public-url>) [--duration 10] [--aspect 9:16] [--model seedance-fast|seedance|kling|grok] [--video-resolution auto|480p|720p|1080p|4k] [--keep-original-sound]');
1117
1119
  else if (subtopic === 'status') console.log('Usage: makaron video status <taskId> | --snapshot <snapshotId> [--wait]');
1118
1120
  else console.log(`Video commands:
1119
1121
  video script --image <file> [--image <file>] "direction" Write video script
1120
1122
  video create --script "..." --image <url> [--duration 10] Submit video task
1121
- video create --script "..." --video <public-url> [--model kling|seedance] Edit a video (standalone)
1123
+ video create --script "..." --video <public-url> [--model seedance-fast|seedance|kling] Edit a video (standalone; Grok does not support video refs)
1122
1124
  video status <taskId> Check video status
1123
1125
  video status --snapshot <snapshotId> [--wait] Check v2 video snapshot
1124
1126
  `);
@@ -1197,6 +1199,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
1197
1199
  let jsonOutput = false;
1198
1200
  let activeSkill = undefined;
1199
1201
  let videoModel = undefined;
1202
+ let videoResolution = undefined;
1200
1203
  let preferredModel = undefined;
1201
1204
  for (let i = 1; i < args.length; i++) {
1202
1205
  if (args[i] === '--project' && args[i + 1]) projectId = args[++i];
@@ -1207,6 +1210,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
1207
1210
  else if (args[i] === '--background' || args[i] === '-b') background = true;
1208
1211
  else if (args[i] === '--json') jsonOutput = true;
1209
1212
  else if (args[i] === '--video-model' && args[i + 1]) videoModel = args[++i];
1213
+ else if (args[i] === '--video-resolution' && args[i + 1]) videoResolution = args[++i];
1210
1214
  else if (args[i] === '--model' && args[i + 1]) preferredModel = args[++i];
1211
1215
  else promptParts.push(args[i]);
1212
1216
  }
@@ -1352,7 +1356,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
1352
1356
  for (const task of results.musicTasks) await pollMusic(baseUrl, headers, task.taskId);
1353
1357
  } else {
1354
1358
  // Default: fire-and-forget + poll
1355
- const { runId } = await submitRun(baseUrl, headers, projectId, finalPrompt, { videoModel, preferredModel });
1359
+ const { runId } = await submitRun(baseUrl, headers, projectId, finalPrompt, { videoModel, videoResolution, preferredModel });
1356
1360
  if (background) {
1357
1361
  // Just print runId and exit
1358
1362
  if (jsonOutput) {
@@ -1519,7 +1523,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
1519
1523
 
1520
1524
  } else if (sub === 'create') {
1521
1525
  const images = [];
1522
- let script = '', duration = undefined, aspectRatio = undefined, videoModel = undefined, wait = false;
1526
+ let script = '', duration = undefined, aspectRatio = undefined, videoModel = undefined, videoResolution = undefined, wait = false;
1523
1527
  let video = null, keepOriginalSound = false;
1524
1528
  for (let i = 2; i < args.length; i++) {
1525
1529
  if (args[i] === '--image' && args[i + 1]) images.push(args[++i]);
@@ -1529,6 +1533,8 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
1529
1533
  else if (args[i] === '--duration' && args[i + 1]) duration = Number(args[++i]);
1530
1534
  else if (args[i] === '--aspect' && args[i + 1]) aspectRatio = args[++i];
1531
1535
  else if (args[i] === '--model' && args[i + 1]) videoModel = args[++i];
1536
+ else if (args[i] === '--video-resolution' && args[i + 1]) videoResolution = args[++i];
1537
+ else if (args[i] === '--resolution' && args[i + 1]) videoResolution = args[++i];
1532
1538
  else if (args[i] === '--keep-original-sound') keepOriginalSound = true;
1533
1539
  else if (args[i] === '--project') {
1534
1540
  console.error('Usage: video create no longer supports --project. Use: makaron chat --project <id> --video <file|url> "your request"');
@@ -1537,7 +1543,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
1537
1543
  else if (args[i] === '--wait') wait = true;
1538
1544
  }
1539
1545
  if ((!images.length && !video) || !script) {
1540
- console.error('Usage: makaron video create --script "..." (--image <url> | --video <public-url>) [--duration 10] [--aspect 9:16] [--model kling|seedance] [--keep-original-sound]');
1546
+ console.error('Usage: makaron video create --script "..." (--image <url> | --video <public-url>) [--duration 10] [--aspect 9:16] [--model seedance-fast|seedance|kling|grok] [--video-resolution auto|480p|720p|1080p|4k] [--keep-original-sound]');
1541
1547
  process.exit(1);
1542
1548
  }
1543
1549
 
@@ -1548,15 +1554,15 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
1548
1554
 
1549
1555
  let videoUrl = isHttpUrl(video) ? video : null;
1550
1556
  let inputVideoMeta = null;
1551
- const selectedVideoModel = videoModel || 'kling';
1557
+ const selectedVideoModel = videoModel || 'seedance-fast';
1552
1558
  if (videoUrl) {
1553
- process.stderr.write(`📹 Assuming public video URL already matches provider reference limits. Seedance requires ≤${MAX_VIDEO_PROVIDER_REFERENCE_DURATION}s, ≤50MB, sides 300-6000px, frame pixels 409,600-${MAX_VIDEO_FRAME_PIXELS}; Kling requires ≤200MB and ≤2K.\n`);
1559
+ process.stderr.write(`📹 Assuming public video URL already matches provider reference limits. Seedance requires ≤${MAX_VIDEO_PROVIDER_REFERENCE_DURATION}s, ≤50MB, sides 300-6000px, frame pixels 409,600-${MAX_VIDEO_FRAME_PIXELS}; Kling requires ≤200MB and ≤2K. Grok does not support video references.\n`);
1554
1560
  }
1555
1561
  if (video && !videoUrl) {
1556
1562
  const valid = validateVideoFile(video, {
1557
1563
  maxDuration: MAX_VIDEO_PROVIDER_REFERENCE_DURATION,
1558
1564
  durationTolerance: MAX_VIDEO_PROVIDER_REFERENCE_DURATION_TOLERANCE,
1559
- ...(selectedVideoModel === 'seedance' ? {
1565
+ ...(selectedVideoModel === 'seedance' || selectedVideoModel === 'seedance-fast' ? {
1560
1566
  minFramePixels: SEEDANCE_MIN_VIDEO_FRAME_PIXELS,
1561
1567
  minSide: SEEDANCE_MIN_VIDEO_SIDE,
1562
1568
  maxSide: SEEDANCE_MAX_VIDEO_SIDE,
@@ -1574,12 +1580,11 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
1574
1580
  // Standalone MCP tool (no project timeline write)
1575
1581
  process.stderr.write('🎬 Submitting video...\n');
1576
1582
  const vArgs = videoUrl
1577
- ? { videoUrl, editPrompt: script, images, videoModel: selectedVideoModel, referType: selectedVideoModel === 'seedance' ? 'feature' : 'base' }
1578
- : { script, images };
1583
+ ? { videoUrl, editPrompt: script, images, videoModel: selectedVideoModel, videoResolution, referType: (selectedVideoModel === 'seedance' || selectedVideoModel === 'seedance-fast') ? 'feature' : 'base' }
1584
+ : { script, images, videoModel: selectedVideoModel, videoResolution };
1579
1585
  const effectiveDuration = duration || (inputVideoMeta?.duration ? Math.min(MAX_VIDEO_PROVIDER_REFERENCE_DURATION, Math.round(inputVideoMeta.duration)) : undefined);
1580
1586
  if (effectiveDuration) vArgs.duration = effectiveDuration;
1581
1587
  if (aspectRatio) vArgs.aspectRatio = aspectRatio;
1582
- if (videoModel && !videoUrl) vArgs.videoModel = videoModel;
1583
1588
  if (keepOriginalSound && videoUrl) vArgs.keepOriginalSound = true;
1584
1589
  const result = await callMcpTool(baseUrl, headers, videoUrl ? 'makaron_edit_video' : 'makaron_create_video', vArgs);
1585
1590
  const text = result?.content?.find(c => c.type === 'text')?.text;
@@ -1625,7 +1630,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
1625
1630
  console.log(`Video commands:
1626
1631
  video script --image <file> [--image <file>] "direction" Write video script
1627
1632
  video create --script "..." --image <url> [--duration 10] Submit video task
1628
- video create --script "..." --video <public-url> [--model kling|seedance] Edit a video (standalone)
1633
+ video create --script "..." --video <public-url> [--model seedance-fast|seedance|kling] Edit a video (standalone; Grok does not support video refs)
1629
1634
  video status <taskId> Check video status
1630
1635
  video status --snapshot <snapshotId> [--wait] Check v2 video snapshot
1631
1636
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makaron-cli",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Talk to Makaron Agent from the terminal — create projects, edit images, generate videos",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -212,8 +212,8 @@ npx makaron-cli analyze --video input.mp4 "describe the key actions and pacing"
212
212
  npx makaron-cli video create --script "Shot 1 (5s): <<<image_1>>> ..." --image https://...jpg --duration 5 --model kling
213
213
 
214
214
  # 3b. Edit a video from a local file or public URL
215
- npx makaron-cli video create --script "make it funny" --video input.mp4 --duration 5 --model seedance
216
- npx makaron-cli video create --script "make it warmer and cinematic" --video https://example.com/input.mp4 --duration 5 --model seedance
215
+ npx makaron-cli video create --script "make it funny" --video input.mp4 --duration 5 --model seedance-fast
216
+ npx makaron-cli video create --script "make it warmer and cinematic" --video https://example.com/input.mp4 --duration 5 --model seedance --video-resolution 1080p
217
217
 
218
218
  # 4. Check status
219
219
  npx makaron-cli video status <taskId>
@@ -225,9 +225,9 @@ npx makaron-cli video status <taskId>
225
225
  npx makaron-cli chat --project <id|auto> --video input.mp4 -b "make it funny"
226
226
  ```
227
227
 
228
- Options for `video create`: `--script "..."`, `--script-file <path>`, `--image <url>` (repeatable, up to 7), `--video <file|url>`, `--duration <seconds>`, `--aspect 9:16|16:9|1:1`, `--model kling|seedance`. SeeDance accepts integer output duration 4-15s (default 5s); Kling supports 5-15s.
228
+ Options for `video create`: `--script "..."`, `--script-file <path>`, `--image <url>` (repeatable, up to 7), `--video <file|url>`, `--duration <seconds>`, `--aspect 9:16|16:9|1:1`, `--model seedance-fast|seedance|kling|grok`, `--video-resolution auto|480p|720p|1080p|4k`. Default model is `seedance-fast`. SeeDance accepts integer output duration 4-15s (default 5s); Kling supports 5-15s; Grok 1.5 supports 1-15s single-image-to-video only. For `--model grok`, forced `--aspect` is ignored to avoid xAI stretching the source image; pad/create the image at the target shape first or use another model.
229
229
 
230
- Video edit model behavior: `--model kling --video` uses Kling base/direct edit internally; `--model seedance --video` uses the Seedance video-reference path and requires target <=15s, <=50MB, width/height 300-6000px, aspect ratio 0.4-2.5, and frame pixels 409,600-2,086,876. Tiny metadata padding up to 15.5s is accepted and output duration is clamped to 15s.
230
+ Video edit model behavior: `--model kling --video` uses Kling base/direct edit internally; `--model seedance-fast --video` or `--model seedance --video` uses the SeeDance video-reference path and requires target <=15s, <=50MB, width/height 300-6000px, aspect ratio 0.4-2.5, and frame pixels 409,600-2,086,876. Tiny metadata padding up to 15.5s is accepted and output duration is clamped to 15s. Grok does not support video references.
231
231
 
232
232
  ### `music` — Music generation
233
233
 
@@ -339,7 +339,7 @@ send_message "All done!"
339
339
  - One project = one conversation thread. All history is preserved.
340
340
  - One run at a time per project. New message interrupts previous run.
341
341
  - Multi-image: `create --image a.jpg --image b.jpg` or `chat --image ref.jpg`.
342
- - Videos take 2-5 minutes to render. Use `responses get <runId> --wait --json` for the default customer-service path.
342
+ - Most videos take 3-5 minutes; Grok is usually around 30-40 seconds. Use `responses get <runId> --wait --json` for the default customer-service path.
343
343
  - Music takes ~60 seconds. Appears in output when done.
344
344
  - Images are typically ready in 15-30 seconds.
345
345
  - stdout is always machine-readable JSON/text. Human-friendly logs go to stderr.