@felores/kie-cli 0.1.0 → 0.1.2

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/dist/index.js +23 -11
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -150,7 +150,7 @@ var ElevenLabsSoundEffectsSchema = z.object({
150
150
  var ByteDanceSeedanceVideoSchema = z.object({
151
151
  prompt: z.string().min(3).max(2e4).describe("Text prompt for video generation (3-20000 characters)"),
152
152
  // Mode: standard (seedance-2) or fast (seedance-2-fast)
153
- mode: z.enum(["standard", "fast"]).default("standard").optional().describe("Generation mode \u2014 standard (seedance-2, higher quality) or fast (seedance-2-fast, iterative workflows)"),
153
+ mode: z.enum(["standard", "fast"]).default("standard").optional().describe("Generation mode: standard (seedance-2, higher quality) or fast (seedance-2-fast, iterative workflows)"),
154
154
  // Frame control
155
155
  first_frame_url: z.string().url().optional().describe("URL of image to use as the first frame (optional)"),
156
156
  last_frame_url: z.string().url().optional().describe("URL of image to use as the last frame (optional)"),
@@ -160,7 +160,7 @@ var ByteDanceSeedanceVideoSchema = z.object({
160
160
  reference_audio_urls: z.array(z.string().url()).max(3).optional().describe("Reference audio for sound-guided generation (up to 3)"),
161
161
  // Output settings
162
162
  aspect_ratio: z.enum(["1:1", "9:16", "16:9", "4:3", "3:4", "21:9", "9:21", "adaptive"]).default("16:9").optional().describe("Aspect ratio of the generated video"),
163
- resolution: z.enum(["480p", "720p"]).default("720p").optional().describe("Video resolution \u2014 480p for faster, 720p for balance"),
163
+ resolution: z.enum(["480p", "720p"]).default("720p").optional().describe("Video resolution: 480p for faster, 720p for balance"),
164
164
  duration: z.number().int().min(4).max(15).default(5).optional().describe("Duration of video in seconds (4-15)"),
165
165
  // Audio & safety
166
166
  generate_audio: z.boolean().default(true).optional().describe("Generate native audio for the video"),
@@ -1447,7 +1447,7 @@ var TaskDatabase = class {
1447
1447
  import { z as z2 } from "zod";
1448
1448
  var bytedanceSeedanceVideoTool = {
1449
1449
  name: "bytedance_seedance_video",
1450
- description: "Generate videos with ByteDance Seedance 2.0 \u2014 multimodal inputs (image/video/audio references), native audio generation, standard and fast modes",
1450
+ description: "Generate videos with ByteDance Seedance 2.0: multimodal inputs (image/video/audio references), native audio generation, standard and fast modes",
1451
1451
  category: "video",
1452
1452
  schema: ByteDanceSeedanceVideoSchema,
1453
1453
  async run(args, ctx) {
@@ -1510,14 +1510,14 @@ var bytedanceSeedanceVideoTool = {
1510
1510
  if (error instanceof z2.ZodError) {
1511
1511
  return ctx.formatError("bytedance_seedance_video", error, {
1512
1512
  prompt: "Required: Text prompt for video generation (3-20000 characters)",
1513
- mode: 'Optional: Generation mode \u2014 "standard" or "fast" (default: standard)',
1513
+ mode: 'Optional: Generation mode: "standard" or "fast" (default: standard)',
1514
1514
  first_frame_url: "Optional: URL of image to use as first frame",
1515
1515
  last_frame_url: "Optional: URL of image to use as last frame",
1516
1516
  reference_image_urls: "Optional: Reference images for style guidance (up to 9)",
1517
1517
  reference_video_urls: "Optional: Reference videos for motion guidance (up to 3)",
1518
1518
  reference_audio_urls: "Optional: Reference audio for sound-guided generation (up to 3)",
1519
1519
  aspect_ratio: "Optional: Video aspect ratio (default: 16:9)",
1520
- resolution: 'Optional: Video resolution \u2014 "480p" or "720p" (default: 720p)',
1520
+ resolution: 'Optional: Video resolution: "480p" or "720p" (default: 720p)',
1521
1521
  duration: "Optional: Video duration in seconds 4-15 (default: 5)",
1522
1522
  generate_audio: "Optional: Generate native audio (default: true)",
1523
1523
  web_search: "Optional: Enable web search for prompt enhancement (default: false)",
@@ -1778,12 +1778,14 @@ var flux2ImageTool = {
1778
1778
  const hasInputUrls = !!request.input_urls && request.input_urls.length > 0;
1779
1779
  const modelType = request.model_type || "pro";
1780
1780
  const modeDescription = hasInputUrls ? `image-to-image (${modelType})` : `text-to-image (${modelType})`;
1781
- if (response.data?.taskId) {
1781
+ if (response.code === 200 && response.data?.taskId) {
1782
1782
  await ctx.db.createTask({
1783
1783
  task_id: response.data.taskId,
1784
1784
  api_type: "flux2-image",
1785
1785
  status: "pending"
1786
1786
  });
1787
+ } else {
1788
+ throw new Error(response.msg || "Failed to create Flux 2 image task");
1787
1789
  }
1788
1790
  return {
1789
1791
  content: [
@@ -2383,12 +2385,14 @@ var hailuoVideoTool = {
2383
2385
  } else {
2384
2386
  modeDescription = `v${version} text-to-video (${request.quality || "standard"} quality)`;
2385
2387
  }
2386
- if (response.data?.taskId) {
2388
+ if (response.code === 200 && response.data?.taskId) {
2387
2389
  await ctx.db.createTask({
2388
2390
  task_id: response.data.taskId,
2389
2391
  api_type: "hailuo",
2390
2392
  status: "pending"
2391
2393
  });
2394
+ } else {
2395
+ throw new Error(response.msg || "Failed to create Hailuo video task");
2392
2396
  }
2393
2397
  return {
2394
2398
  content: [
@@ -2726,12 +2730,14 @@ var klingVideoTool = {
2726
2730
  const response = await ctx.client.generateKlingVideo(request);
2727
2731
  const hasImages = !!request.image_urls && request.image_urls.length > 0;
2728
2732
  const modeDescription = request.multi_shots ? "Kling 3.0 multi-shot" : hasImages ? "Kling 3.0 image-to-video" : "Kling 3.0 text-to-video";
2729
- if (response.data?.taskId) {
2733
+ if (response.code === 200 && response.data?.taskId) {
2730
2734
  await ctx.db.createTask({
2731
2735
  task_id: response.data.taskId,
2732
2736
  api_type: "kling-3.0-video",
2733
2737
  status: "pending"
2734
2738
  });
2739
+ } else {
2740
+ throw new Error(response.msg || "Failed to create Kling 3.0 video task");
2735
2741
  }
2736
2742
  return {
2737
2743
  content: [
@@ -2961,13 +2967,15 @@ var nanoBananaImageTool = {
2961
2967
  const isEdit = !!request.image_input && request.image_input.length > 0;
2962
2968
  const apiType = isEdit ? "nano-banana-edit" : "nano-banana-image";
2963
2969
  const modeDescription = isEdit ? "edit" : "generate";
2964
- if (response.data?.taskId) {
2970
+ if (response.code === 200 && response.data?.taskId) {
2965
2971
  await ctx.db.createTask({
2966
2972
  task_id: response.data.taskId,
2967
2973
  api_type: apiType,
2968
2974
  status: "pending",
2969
2975
  result_url: response.data.imageUrl
2970
2976
  });
2977
+ } else {
2978
+ throw new Error(response.msg || "Failed to create Nano Banana image task");
2971
2979
  }
2972
2980
  return {
2973
2981
  content: [
@@ -3354,12 +3362,14 @@ var veo3GenerateVideoTool = {
3354
3362
  const request = Veo3GenerateSchema.parse(args);
3355
3363
  request.callBackUrl = ctx.getCallbackUrl(request.callBackUrl);
3356
3364
  const response = await ctx.client.generateVeo3Video(request);
3357
- if (response.data?.taskId) {
3365
+ if (response.code === 200 && response.data?.taskId) {
3358
3366
  await ctx.db.createTask({
3359
3367
  task_id: response.data.taskId,
3360
3368
  api_type: "veo3",
3361
3369
  status: "pending"
3362
3370
  });
3371
+ } else {
3372
+ throw new Error(response.msg || "Failed to create Veo3 video task");
3363
3373
  }
3364
3374
  return {
3365
3375
  content: [
@@ -3436,12 +3446,14 @@ var wanAnimateTool = {
3436
3446
  request.callBackUrl = ctx.getCallbackUrl(request.callBackUrl);
3437
3447
  const response = await ctx.client.generateWanAnimate(request);
3438
3448
  const modeDescription = request.mode === "replace" ? "character replacement" : "animation";
3439
- if (response.data?.taskId) {
3449
+ if (response.code === 200 && response.data?.taskId) {
3440
3450
  await ctx.db.createTask({
3441
3451
  task_id: response.data.taskId,
3442
3452
  api_type: "wan-animate",
3443
3453
  status: "pending"
3444
3454
  });
3455
+ } else {
3456
+ throw new Error(response.msg || "Failed to create Wan Animate task");
3445
3457
  }
3446
3458
  return {
3447
3459
  content: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felores/kie-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Standalone CLI for Kie.ai APIs: generate images, video, music and speech from the terminal. Same models as the Kie.ai MCP server, no MCP client required.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -29,11 +29,11 @@
29
29
  "license": "MIT",
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "git+https://github.com/felores/kie-ai-mcp-server.git"
32
+ "url": "git+https://github.com/felores/kie-cli-mcp.git"
33
33
  },
34
- "homepage": "https://github.com/felores/kie-ai-mcp-server#readme",
34
+ "homepage": "https://github.com/felores/kie-cli-mcp#readme",
35
35
  "bugs": {
36
- "url": "https://github.com/felores/kie-ai-mcp-server/issues"
36
+ "url": "https://github.com/felores/kie-cli-mcp/issues"
37
37
  },
38
38
  "publishConfig": {
39
39
  "registry": "https://registry.npmjs.org/",