agentreel 0.1.4 → 0.1.6

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.
Files changed (2) hide show
  1. package/bin/agentreel.mjs +20 -33
  2. package/package.json +1 -1
package/bin/agentreel.mjs CHANGED
@@ -306,17 +306,8 @@ async function renderVideo(props, output, musicPath) {
306
306
 
307
307
  // ── Upload + Share ──────────────────────────────────────────
308
308
 
309
- async function uploadVideo(filePath) {
310
- try {
311
- const result = execFileSync("curl", [
312
- "-s",
313
- "-H", "Authorization: Client-ID 546c25a59c58ad7",
314
- "-F", `video=@${filePath}`,
315
- "https://api.imgur.com/3/upload",
316
- ], { timeout: 120000 });
317
- const data = JSON.parse(result.toString());
318
- if (data.data?.link) return data.data.link;
319
- } catch { /* fall through */ }
309
+ // Video upload placeholder — will add agentreel.dev hosting later
310
+ async function uploadVideo(_filePath) {
320
311
  return null;
321
312
  }
322
313
 
@@ -347,29 +338,25 @@ function askYesNo(question) {
347
338
  });
348
339
  }
349
340
 
350
- async function shareFlow(outputPath, title) {
341
+ async function shareFlow(outputPath, title, prompt) {
351
342
  const shouldShare = await askYesNo("Share to Twitter? [Y/n] ");
352
343
  if (!shouldShare) return;
353
344
 
354
- console.error("Uploading video...");
355
- const url = await uploadVideo(outputPath);
356
-
357
- if (url) {
358
- const text = `${title}\n\nMade with agentreel`;
359
- openShareURL(url, text);
360
- } else {
361
- // No upload worked open Twitter with just the text, user attaches video manually
362
- console.error("Could not auto-upload. Opening Twitter — drag your video into the tweet.");
363
- const text = `${title}\n\nMade with agentreel`;
364
- const tweetText = encodeURIComponent(text);
365
- const intentURL = `https://twitter.com/intent/tweet?text=${tweetText}`;
366
- const cmd = process.platform === "darwin" ? "open" : "xdg-open";
367
- try {
368
- execFileSync(cmd, [intentURL], { stdio: "ignore" });
369
- } catch {
370
- console.error(` Tweet link: ${intentURL}`);
371
- }
372
- console.error(` Video: ${resolve(outputPath)}`);
345
+ // Use prompt for tweet text if available, otherwise title
346
+ const tweetBody = prompt || title;
347
+
348
+ const text = `${tweetBody}\n\nMade with agentreel`;
349
+ const tweetText = encodeURIComponent(text);
350
+ const intentURL = `https://twitter.com/intent/tweet?text=${tweetText}`;
351
+
352
+ console.error(`\n Opening Twitterattach your video to the tweet.`);
353
+ console.error(` Video: ${resolve(outputPath)}\n`);
354
+
355
+ const openCmd = process.platform === "darwin" ? "open" : "xdg-open";
356
+ try {
357
+ execFileSync(openCmd, [intentURL], { stdio: "ignore" });
358
+ } catch {
359
+ console.error(` Link: ${intentURL}`);
373
360
  }
374
361
  }
375
362
 
@@ -430,7 +417,7 @@ async function main() {
430
417
  }, output, flags.music);
431
418
 
432
419
  if (!noShare) {
433
- await shareFlow(resolve(output), videoTitle);
420
+ await shareFlow(resolve(output), videoTitle, prompt);
434
421
  }
435
422
  return;
436
423
  }
@@ -461,7 +448,7 @@ async function main() {
461
448
  }, output, flags.music);
462
449
 
463
450
  if (!noShare) {
464
- await shareFlow(resolve(output), videoTitle);
451
+ await shareFlow(resolve(output), videoTitle, prompt);
465
452
  }
466
453
  return;
467
454
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentreel",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Turn Claude Code sessions into viral demo videos",
5
5
  "bin": {
6
6
  "agentreel": "./bin/agentreel.mjs"