clipbait 1.8.0 → 1.9.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 +3 -0
- package/index.js +25 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,6 +56,9 @@ Seven tools are available to any agent:
|
|
|
56
56
|
| `start_live_autoclip` | Auto-clip a **live** Twitch stream continuously (`channelUrl`, optional `cadenceMin`). Pro plan. |
|
|
57
57
|
| `probe_video` | Get a video's duration before clipping (`url`). |
|
|
58
58
|
| `download_clip` | Save a finished clip to your `~/Downloads/` folder and return the path (`jobId`, `clipIndex` 1-based). Max 500 MB. |
|
|
59
|
+
| `list_social_accounts` | Show connected accounts. Posting is X/Twitter only today (TikTok, Facebook, Instagram coming soon). |
|
|
60
|
+
| `schedule_post` | Schedule a clip to post on X at a future time (`clipUrl`, `platforms: ["x"]`, `scheduledTime`, `caption`). |
|
|
61
|
+
| `list_scheduled_posts` / `cancel_scheduled_post` | Review or cancel scheduled posts. |
|
|
59
62
|
|
|
60
63
|
## Terminal usage
|
|
61
64
|
|
package/index.js
CHANGED
|
@@ -107,14 +107,18 @@ argument-hint: <video-url> [what you want]
|
|
|
107
107
|
---
|
|
108
108
|
You have the \`clipbait\` MCP tools connected. The user's request: $ARGUMENTS
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
1.
|
|
112
|
-
2.
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
3. Call \`generate_clips\`, then poll \`get_job\` with the returned jobId every 30 seconds until status is "complete". Report progress between polls.
|
|
116
|
-
4. When complete, list each finished clip as a numbered list:
|
|
117
|
-
5. Then offer
|
|
110
|
+
Guide them like a friendly assistant, conversationally and fast:
|
|
111
|
+
1. Need a video URL — if none was given, ask for one (YouTube, Twitch VOD, Rumble, or Ganjing World).
|
|
112
|
+
2. Set params for \`generate_clips\` from their intent (offer the choice if unclear, don't over-ask):
|
|
113
|
+
- aspect ratio: 9:16 (vertical / TikTok / Reels) is the default; 16:9 for YouTube / landscape.
|
|
114
|
+
- number of clips: use a number if they mention one (1–20), otherwise 9.
|
|
115
|
+
3. Call \`generate_clips\`, then poll \`get_job\` with the returned jobId every ~30 seconds until status is "complete". Report progress between polls.
|
|
116
|
+
4. When complete, list each finished clip as a numbered list: hook and URL.
|
|
117
|
+
5. Then offer next steps and act on them by calling the tools:
|
|
118
|
+
- \`download_clip\` — save a clip to ~/Downloads.
|
|
119
|
+
- Post to X (Twitter) — currently the only supported platform (TikTok, Facebook, Instagram coming soon). Call \`list_social_accounts\` to confirm X is connected, then ask when to post (offer Today / Tomorrow / This weekend / a specific time) and the caption (offer to draft one). Show the plan (clip · time · caption) and CONFIRM before calling \`schedule_post\` for each clip. Use \`list_scheduled_posts\` / \`cancel_scheduled_post\` to review or undo.
|
|
120
|
+
- Regenerate at a different aspect ratio, pull more clips, or \`probe_video\` another URL.
|
|
121
|
+
Keep it snappy. Don't ask for confirmation to start clipping unless the URL is missing — but always confirm before posting to social.
|
|
118
122
|
`;
|
|
119
123
|
|
|
120
124
|
// Claude Desktop config path per-OS.
|
|
@@ -275,6 +279,19 @@ async function runMcpServer() {
|
|
|
275
279
|
} catch (e) { return fail(e); }
|
|
276
280
|
});
|
|
277
281
|
|
|
282
|
+
server.tool("list_social_accounts", "List connected social accounts. Posting is currently supported on X (Twitter) only — TikTok, Facebook, Instagram coming soon.", {},
|
|
283
|
+
async () => { try { const d = await api("GET", "/auth/social/status"); const x = d?.twitter?.connected; return ok(`X (Twitter): ${x ? `connected${d.twitter.username ? ` as @${d.twitter.username}` : ""}` : "not connected — connect at https://app.clipbait.ai/me"}.\nTikTok, Facebook, Instagram: coming soon.`); } catch (e) { return fail(e); } });
|
|
284
|
+
|
|
285
|
+
server.tool("schedule_post", "Schedule a finished clip to post on X (Twitter) at a future time. Get clip URLs from get_job first; confirm X is connected via list_social_accounts. NOTE: only X posting is live today — TikTok, Facebook, Instagram coming soon.",
|
|
286
|
+
{ clipUrl: z.string(), platforms: z.array(z.enum(["x"])).min(1).describe("only \"x\" supported today"), scheduledTime: z.string().describe("Future ISO 8601 time"), caption: z.string().optional(), clipTitle: z.string().optional(), clipJobId: z.string().optional(), clipIndex: z.number().int().optional() },
|
|
287
|
+
async (a) => { try { const d = await api("POST", "/scheduled-posts", { clipUrl: a.clipUrl, platforms: a.platforms, scheduledTime: a.scheduledTime, caption: a.caption || "", clipTitle: a.clipTitle, clipJobId: a.clipJobId, clipIndex: a.clipIndex }); return ok(`Scheduled to ${a.platforms.join(", ")} for ${a.scheduledTime} (post ${d.scheduledPost?._id || "?"}).`); } catch (e) { return fail(e); } });
|
|
288
|
+
|
|
289
|
+
server.tool("list_scheduled_posts", "List the user's scheduled/posted social posts.", { status: z.enum(["pending", "posted", "failed", "cancelled"]).optional() },
|
|
290
|
+
async (a) => { try { const d = await api("GET", "/scheduled-posts" + (a.status ? `?status=${a.status}` : "")); const posts = (d.posts || []).slice(0, 20).map((p) => `${p._id} · ${p.status} · ${(p.platforms || []).map((x) => x.name).join(",")} · ${new Date(p.scheduledTime).toISOString()} · ${p.clipTitle || ""}`).join("\n"); return ok(posts || "No scheduled posts."); } catch (e) { return fail(e); } });
|
|
291
|
+
|
|
292
|
+
server.tool("cancel_scheduled_post", "Cancel a scheduled post before it goes live.", { postId: z.string() },
|
|
293
|
+
async (a) => { try { await api("DELETE", "/scheduled-posts/" + a.postId); return ok(`Cancelled scheduled post ${a.postId}.`); } catch (e) { return fail(e); } });
|
|
294
|
+
|
|
278
295
|
await server.connect(new StdioServerTransport());
|
|
279
296
|
}
|
|
280
297
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clipbait",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Clipbait CLI + MCP server — turn any video into viral clips, and auto-clip live streams, from your terminal or any AI agent.",
|
|
5
5
|
"bin": { "clipbait": "index.js" },
|
|
6
6
|
"type": "commonjs",
|