zerocut-cli 0.1.2 → 0.2.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 CHANGED
@@ -110,7 +110,7 @@ zerocut config --ott <token> --region <cn|us> # non-interactive
110
110
  - Options:
111
111
  - `--prompt <prompt>` (required)
112
112
  - `--duration <seconds>` (integer 1–16; when `--sourceVideo` is set, must be 3–10)
113
- - `--model <model>` (enum: `zerocut3.0|seedance-1.5-pro|vidu|vidu-pro|viduq3|viduq3-turbo|kling|kling-v3|wan|wan-flash|sora2|sora2-pro|veo3.1|veo3.1-pro`; default `vidu`)
113
+ - `--model <model>` (enum: `zerocut3.0|zerocut3.0-pro|zerocut3.0-pro-fast|seedance-1.5-pro|vidu|vidu-pro|viduq3|viduq3-turbo|kling|kling-v3|wan|wan-flash|sora2|sora2-pro|veo3.1|veo3.1-pro`; default `vidu`)
114
114
  - `--sourceVideo <video>` (base video path/url for edit mode)
115
115
  - `--seed <seed>`
116
116
  - `--firstFrame <image>`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zerocut-cli",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "description": "ZeroCut CLI: AI assistant CLI for creating and editing images/audio/video",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -38,7 +38,7 @@
38
38
  "typescript-eslint": "^8.54.0"
39
39
  },
40
40
  "dependencies": {
41
- "cerevox": "^4.22.0",
41
+ "cerevox": "^4.29.3",
42
42
  "commander": "^14.0.3",
43
43
  "inquirer": "^13.2.2"
44
44
  },
@@ -26,10 +26,14 @@ function resolveResultUrl(result: unknown): string | undefined {
26
26
  }
27
27
 
28
28
  export function register(program: Command): void {
29
+ const avatarModels = ["zerocut-avatar-1.0", "zerocut-avatar-1.5"] as const;
30
+ const mvModels = ["zerocut-mv-1.0"] as const;
29
31
  const parent = program.command("video").description("Create a new video; requires --prompt");
30
32
 
31
33
  const allowedTypes = [
32
34
  "zerocut3.0",
35
+ "zerocut3.0-pro",
36
+ "zerocut3.0-pro-fast",
33
37
  "seedance-1.5-pro",
34
38
  "vidu",
35
39
  "vidu-pro",
@@ -43,6 +47,8 @@ export function register(program: Command): void {
43
47
  "sora2-pro",
44
48
  "veo3.1",
45
49
  "veo3.1-pro",
50
+ ...avatarModels,
51
+ ...mvModels,
46
52
  ] as const;
47
53
 
48
54
  async function videoCreateAction(
@@ -86,10 +92,21 @@ export function register(program: Command): void {
86
92
  const durationStr = typeof opts.duration === "string" ? opts.duration.trim() : undefined;
87
93
  const sourceVideo = typeof opts.sourceVideo === "string" ? opts.sourceVideo.trim() : undefined;
88
94
  let duration: number = 0;
95
+ const durationRange = ((): { min: number; max: number } => {
96
+ if ((avatarModels as readonly string[]).includes(model)) {
97
+ return { min: 5, max: 240 };
98
+ }
99
+ if ((mvModels as readonly string[]).includes(model)) {
100
+ return { min: 1, max: 240 };
101
+ }
102
+ return { min: 1, max: 16 };
103
+ })();
89
104
  if (durationStr) {
90
105
  const n = Number.parseInt(durationStr, 10);
91
- if (!Number.isFinite(n) || n < 1 || n > 16) {
92
- process.stderr.write("Invalid value for --duration: must be integer 1-16\n");
106
+ if (!Number.isFinite(n) || n < durationRange.min || n > durationRange.max) {
107
+ process.stderr.write(
108
+ `Invalid value for --duration: model ${model} supports integer ${durationRange.min}-${durationRange.max}\n`
109
+ );
93
110
  process.exitCode = 1;
94
111
  return;
95
112
  }
@@ -137,7 +154,7 @@ export function register(program: Command): void {
137
154
  }
138
155
  const res = await session.ai.generateVideo({
139
156
  prompt,
140
- model: model as (typeof allowedTypes)[number],
157
+ model: model as unknown as Parameters<typeof session.ai.generateVideo>[0]["model"],
141
158
  duration: duration || undefined,
142
159
  resolution: opts.resolution,
143
160
  aspect_ratio: aspectRatio,
@@ -154,6 +171,7 @@ export function register(program: Command): void {
154
171
  ]
155
172
  : undefined,
156
173
  onProgress: createProgressSpinner("inferencing"),
174
+ timeout: 7_200_000,
157
175
  });
158
176
  const initialUrl = resolveResultUrl(res);
159
177
  try {
@@ -192,7 +210,10 @@ export function register(program: Command): void {
192
210
  // default action on `zerocut video`
193
211
  parent
194
212
  .option("--prompt <prompt>", "Text prompt for video generation (required)")
195
- .option("--duration <duration>", "Video duration in seconds (1-16)")
213
+ .option(
214
+ "--duration <duration>",
215
+ "Video duration in seconds (default models: 1-16, avatar: 5-240, mv: 1-240)"
216
+ )
196
217
  .option("--model <model>", `Video model: ${allowedTypes.join("|")} (default: vidu)`)
197
218
  .option("--sourceVideo <video>", "Base video path/url for edit mode (requires --duration 3-10)")
198
219
  .option("--seed <seed>", "Random seed")
@@ -211,7 +232,10 @@ export function register(program: Command): void {
211
232
  .command("create")
212
233
  .description("Create a new video; requires --prompt")
213
234
  .option("--prompt <prompt>", "Text prompt for video generation (required)")
214
- .option("--duration <duration>", "Video duration in seconds (1-16)")
235
+ .option(
236
+ "--duration <duration>",
237
+ "Video duration in seconds (default models: 1-16, avatar: 5-240, mv: 1-240)"
238
+ )
215
239
  .option("--model <model>", `Video model: ${allowedTypes.join("|")} (default: vidu)`)
216
240
  .option("--sourceVideo <video>", "Base video path/url for edit mode (requires --duration 3-10)")
217
241
  .option("--seed <seed>", "Random seed")
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  name: "zerocut-cli-tools"
3
3
  description: "Use ZeroCut CLI media and document tools. Invoke when user needs generate media, run ffmpeg/pandoc, sync resources, or save outputs."
4
+ homepage: "https://github.com/liubei-ai/zerocut-cli"
5
+ source: "https://github.com/liubei-ai/zerocut-cli"
6
+ requires_binaries:
7
+ - "zerocut-cli"
8
+ - "npx"
4
9
  ---
5
10
 
6
11
  # ZeroCut CLI Tools
@@ -26,6 +31,32 @@ Invoke this skill when the user asks to:
26
31
  - sync local/remote resources into sandbox
27
32
  - save generated results to local output files
28
33
 
34
+ ## Runtime Requirements
35
+
36
+ - Runtime expects `zerocut-cli` to be available in current environment.
37
+ - If `zerocut-cli` is unavailable, use one of:
38
+ - `pnpm dlx zerocut-cli help`
39
+ - `pnpm add -g zerocut-cli && zerocut-cli help`
40
+ - `npx zerocut-cli help`
41
+ - This skill is instruction-only and relies on the installed CLI binary for actual enforcement.
42
+
43
+ ## Safety Boundaries
44
+
45
+ - Only sync files or URLs that user explicitly requests for the current task.
46
+ - Never auto-discover, crawl, or fetch unrelated remote URLs.
47
+ - Treat remote resources as untrusted input and pass through CLI validation.
48
+ - Never sync secrets, key files, token files, or unrelated private directories.
49
+ - Keep all output writes in user-requested path or current working directory naming rules.
50
+ - Do not bypass CLI command guards; ffmpeg/pandoc restrictions are enforced by the CLI implementation.
51
+
52
+ ## Credentials And Data Transfer
53
+
54
+ - Required credential is `apiKey` in local ZeroCut config.
55
+ - If `apiKey` is missing, stop immediately and request OTT token exchange.
56
+ - `TOS` in this document means object storage used by ZeroCut backend for media URLs.
57
+ - No extra credential beyond ZeroCut config is required for normal media sync/download flows.
58
+ - Do not send data to any external service other than endpoints used by configured ZeroCut session.
59
+
29
60
  ## Required Pre-Check
30
61
 
31
62
  Before every task, the agent must check configuration first:
@@ -91,7 +122,7 @@ Options:
91
122
 
92
123
  - `--prompt <prompt>` required
93
124
  - `--model <model>`
94
- - `--duration <seconds>` integer in 1-16
125
+ - `--duration <seconds>` model-dependent integer
95
126
  - `--sourceVideo <video>` base video for edit mode
96
127
  - `--seed <seed>`
97
128
  - `--firstFrame <image>`
@@ -106,15 +137,18 @@ Options:
106
137
  Validation rules:
107
138
 
108
139
  - `--prompt` must be non-empty
109
- - `--model` allowed: `zerocut3.0|seedance-1.5-pro|vidu|vidu-pro|viduq3|viduq3-turbo|kling|kling-v3|wan|wan-flash|sora2|sora2-pro|veo3.1|veo3.1-pro`
110
- - `--duration` must be integer in `1-16`
140
+ - `--model` allowed: `zerocut3.0|zerocut3.0-pro|zerocut3.0-pro-fast|seedance-1.5-pro|vidu|vidu-pro|viduq3|viduq3-turbo|kling|kling-v3|wan|wan-flash|sora2|sora2-pro|veo3.1|veo3.1-pro|zerocut-avatar-1.0|zerocut-avatar-1.5|zerocut-mv-1.0`
141
+ - `--duration` must follow model range:
142
+ - default models: `1-16`
143
+ - `zerocut-avatar-1.0` / `zerocut-avatar-1.5`: `5-240`
144
+ - `zerocut-mv-1.0`: `1-240`
111
145
  - `--aspectRatio` allowed: `9:16|16:9|1:1`
112
146
  - unless user specifies aspect ratio, default to `16:9`
113
147
  - unless user specifies resolution, default to `720p`
114
148
 
115
149
  Long video guidance:
116
150
 
117
- - if required duration is over 16s, split into multiple video generations (each 1-16s)
151
+ - for default models, if required duration is over 16s, split into multiple generations (each 1-16s)
118
152
  - then concatenate clips with ffmpeg
119
153
  - example:
120
154