bailian-cli 1.0.0-beta.0 → 1.0.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 +128 -0
- package/dist/bailian.mjs +141 -174
- package/package.json +7 -7
- package/scripts/postinstall.js +36 -104
- package/skill/SKILL.md +111 -822
- package/skill/reference/app.md +99 -0
- package/skill/reference/auth.md +96 -0
- package/skill/reference/config.md +91 -0
- package/skill/reference/console.md +40 -0
- package/skill/reference/file.md +48 -0
- package/skill/reference/image.md +116 -0
- package/skill/reference/index.md +95 -0
- package/skill/reference/knowledge.md +45 -0
- package/skill/reference/memory.md +195 -0
- package/skill/reference/model.md +51 -0
- package/skill/reference/omni.md +74 -0
- package/skill/reference/search.md +48 -0
- package/skill/reference/speech.md +141 -0
- package/skill/reference/text.md +65 -0
- package/skill/reference/update.md +32 -0
- package/skill/reference/usage.md +43 -0
- package/skill/reference/video.md +207 -0
- package/skill/reference/vision.md +53 -0
- package/scripts/preuninstall.js +0 -69
- package/skill/BAILIAN_API_DOC_REFER.md +0 -1008
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# `bl video` commands
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `packages/cli/src/commands/catalog.ts`. Do not edit by hand.
|
|
4
|
+
> Regenerate: `pnpm --filter bailian-cli run generate:reference` (runs automatically on `build`).
|
|
5
|
+
|
|
6
|
+
Index: [index.md](index.md)
|
|
7
|
+
|
|
8
|
+
## Commands in this group
|
|
9
|
+
|
|
10
|
+
| Command | Description |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| `bl video download` | Download a completed video by task ID |
|
|
13
|
+
| `bl video edit` | Edit a video with happyhorse-1.0-video-edit (style transfer, object replacement, etc.) |
|
|
14
|
+
| `bl video generate` | Generate a video from text or image (happyhorse-1.0-t2v / happyhorse-1.0-i2v / wan2.6-t2v) |
|
|
15
|
+
| `bl video ref` | Reference-to-video generation (happyhorse-1.0-r2v / wan2.6-r2v): multi-subject, multi-shot with voice |
|
|
16
|
+
| `bl video task get` | Query async task status |
|
|
17
|
+
|
|
18
|
+
## Command details
|
|
19
|
+
|
|
20
|
+
### `bl video download`
|
|
21
|
+
|
|
22
|
+
| Field | Value |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| **Name** | `video download` |
|
|
25
|
+
| **Description** | Download a completed video by task ID |
|
|
26
|
+
| **Usage** | `bl video download --task-id <id> --out <path>` |
|
|
27
|
+
|
|
28
|
+
#### Options
|
|
29
|
+
|
|
30
|
+
| Flag | Type | Required | Description |
|
|
31
|
+
| --- | --- | --- | --- |
|
|
32
|
+
| `--task-id <id>` | string | no | Task ID to download from |
|
|
33
|
+
| `--out <path>` | string | no | Output file path |
|
|
34
|
+
|
|
35
|
+
#### Examples
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
bl video download --task-id 3b256896-xxxx --out video.mp4
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
bl video download --task-id 3b256896-xxxx --out video.mp4 --quiet
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### `bl video edit`
|
|
46
|
+
|
|
47
|
+
| Field | Value |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| **Name** | `video edit` |
|
|
50
|
+
| **Description** | Edit a video with happyhorse-1.0-video-edit (style transfer, object replacement, etc.) |
|
|
51
|
+
| **Usage** | `bl video edit --video <url> --prompt <text> [flags]` |
|
|
52
|
+
| **API docs** | [/best-practice/wanx/video-edit](https://help.aliyun.com/zh/model-studio/best-practice/wanx/video-edit) |
|
|
53
|
+
|
|
54
|
+
#### Options
|
|
55
|
+
|
|
56
|
+
| Flag | Type | Required | Description |
|
|
57
|
+
| --- | --- | --- | --- |
|
|
58
|
+
| `--model <model>` | string | no | Model ID (default: happyhorse-1.0-video-edit) |
|
|
59
|
+
| `--video <url>` | string | yes | Input video URL or local file (mp4/mov, 2-10s) |
|
|
60
|
+
| `--prompt <text>` | string | no | Edit instruction (e.g. "将画面转换为黏土风格") |
|
|
61
|
+
| `--ref-image <url>` | string | no | Reference image URL (up to 4, comma-separated) |
|
|
62
|
+
| `--negative-prompt <text>` | string | no | Negative prompt to exclude unwanted content |
|
|
63
|
+
| `--resolution <res>` | string | no | Resolution: 720P or 1080P (default: 1080P) |
|
|
64
|
+
| `--ratio <ratio>` | string | no | Aspect ratio (16:9, 9:16, 1:1, 4:3, 3:4) |
|
|
65
|
+
| `--duration <seconds>` | number | no | Output video duration in seconds (2-10) |
|
|
66
|
+
| `--audio-setting <mode>` | string | no | Audio: auto (default) or origin (keep original) |
|
|
67
|
+
| `--prompt-extend` | boolean | no | Enable prompt intelligent rewriting (default: true) |
|
|
68
|
+
| `--no-prompt-extend` | boolean | no | Disable prompt intelligent rewriting |
|
|
69
|
+
| `--watermark` | boolean | no | Add "AI生成" watermark |
|
|
70
|
+
| `--seed <n>` | number | no | Random seed for reproducible generation |
|
|
71
|
+
| `--download <path>` | string | no | Save video to file on completion |
|
|
72
|
+
| `--no-wait` | boolean | no | Return task ID immediately without waiting |
|
|
73
|
+
| `--async` | boolean | no | Return task ID immediately (agent/CI mode, same as --no-wait) |
|
|
74
|
+
| `--poll-interval <seconds>` | number | no | Polling interval when waiting (default: 15) |
|
|
75
|
+
|
|
76
|
+
#### Examples
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
bl video edit --video https://example.com/input.mp4 --prompt "将整个画面转换为黏土风格"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
bl video edit --video https://example.com/input.mp4 --prompt "替换衣服为图片中的款式" --ref-image https://example.com/clothes.png
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
bl video edit --video https://example.com/input.mp4 --prompt "Convert to anime style" --resolution 720P --download output.mp4
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### `bl video generate`
|
|
91
|
+
|
|
92
|
+
| Field | Value |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| **Name** | `video generate` |
|
|
95
|
+
| **Description** | Generate a video from text or image (happyhorse-1.0-t2v / happyhorse-1.0-i2v / wan2.6-t2v) |
|
|
96
|
+
| **Usage** | `bl video generate --prompt <text> [--image <url>] [flags]` |
|
|
97
|
+
| **API docs** | [/best-practice/wanx/text-to-video](https://help.aliyun.com/zh/model-studio/best-practice/wanx/text-to-video) |
|
|
98
|
+
|
|
99
|
+
#### Options
|
|
100
|
+
|
|
101
|
+
| Flag | Type | Required | Description |
|
|
102
|
+
| --- | --- | --- | --- |
|
|
103
|
+
| `--model <model>` | string | no | Model ID (default: happyhorse-1.0-t2v, or happyhorse-1.0-i2v with --image) |
|
|
104
|
+
| `--prompt <text>` | string | yes | Video description |
|
|
105
|
+
| `--image <url>` | string | no | Input image URL for image-to-video generation |
|
|
106
|
+
| `--negative-prompt <text>` | string | no | Negative prompt to exclude unwanted content |
|
|
107
|
+
| `--resolution <res>` | string | no | Resolution (e.g. 1280*720, 960*960) |
|
|
108
|
+
| `--ratio <ratio>` | string | no | Aspect ratio (e.g. 16:9, 1:1) |
|
|
109
|
+
| `--duration <seconds>` | number | no | Video duration in seconds (default: 5) |
|
|
110
|
+
| `--prompt-extend` | boolean | no | Automatically extend prompt for better results |
|
|
111
|
+
| `--watermark` | boolean | no | Add watermark to generated video |
|
|
112
|
+
| `--seed <n>` | number | no | Random seed for reproducible generation |
|
|
113
|
+
| `--download <path>` | string | no | Save video to file on completion |
|
|
114
|
+
| `--no-wait` | boolean | no | Return task ID immediately without waiting |
|
|
115
|
+
| `--async` | boolean | no | Return task ID immediately (agent/CI mode, same as --no-wait) |
|
|
116
|
+
| `--poll-interval <seconds>` | number | no | Polling interval when waiting (default: 5) |
|
|
117
|
+
|
|
118
|
+
#### Examples
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
bl video generate --prompt "一个人在读书,静态镜头"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
bl video generate --prompt "Ocean waves at sunset." --download sunset.mp4
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
bl video generate --image https://example.com/cat.png --prompt "让画面中的猫动起来"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
bl video generate --prompt "Mountain landscape" --resolution 1280*720 --duration 5
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### `bl video ref`
|
|
137
|
+
|
|
138
|
+
| Field | Value |
|
|
139
|
+
| --- | --- |
|
|
140
|
+
| **Name** | `video ref` |
|
|
141
|
+
| **Description** | Reference-to-video generation (happyhorse-1.0-r2v / wan2.6-r2v): multi-subject, multi-shot with voice |
|
|
142
|
+
| **Usage** | `bl video ref --prompt <text> --image <url>... [--ref-video <url>...] [flags]` |
|
|
143
|
+
| **API docs** | [/best-practice/wanx/video-reference](https://help.aliyun.com/zh/model-studio/best-practice/wanx/video-reference) |
|
|
144
|
+
|
|
145
|
+
#### Options
|
|
146
|
+
|
|
147
|
+
| Flag | Type | Required | Description |
|
|
148
|
+
| --- | --- | --- | --- |
|
|
149
|
+
| `--model <model>` | string | no | Model ID (default: happyhorse-1.0-r2v) |
|
|
150
|
+
| `--prompt <text>` | string | yes | Video description with reference markers (图1, 视频1, etc.) |
|
|
151
|
+
| `--image <url>` | array | no | Reference image URL or local file (repeatable for multiple subjects) |
|
|
152
|
+
| `--ref-video <url>` | array | no | Reference video URL or local file (repeatable) |
|
|
153
|
+
| `--image-voice <url>` | array | no | Voice URL for corresponding image (pairs by position) |
|
|
154
|
+
| `--video-voice <url>` | array | no | Voice URL for corresponding ref-video (pairs by position) |
|
|
155
|
+
| `--resolution <res>` | string | no | Resolution: 720P or 1080P (default: 720P) |
|
|
156
|
+
| `--ratio <ratio>` | string | no | Aspect ratio (16:9, 9:16, 1:1) |
|
|
157
|
+
| `--duration <seconds>` | number | no | Video duration in seconds (2-10, default: 5) |
|
|
158
|
+
| `--prompt-extend` | boolean | no | Enable prompt intelligent rewriting |
|
|
159
|
+
| `--no-prompt-extend` | boolean | no | Disable prompt intelligent rewriting |
|
|
160
|
+
| `--watermark` | boolean | no | Add watermark to generated video |
|
|
161
|
+
| `--seed <n>` | number | no | Random seed for reproducible generation |
|
|
162
|
+
| `--download <path>` | string | no | Save video to file on completion |
|
|
163
|
+
| `--no-wait` | boolean | no | Return task ID immediately without waiting |
|
|
164
|
+
| `--async` | boolean | no | Return task ID immediately (agent/CI mode, same as --no-wait) |
|
|
165
|
+
| `--poll-interval <seconds>` | number | no | Polling interval when waiting (default: 15) |
|
|
166
|
+
|
|
167
|
+
#### Examples
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
bl video ref --prompt "图1在草地上奔跑" --image person.jpg
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
bl video ref --prompt "视频1在弹吉他,图1走过来" --ref-video scene.mp4 --image person.jpg
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
bl video ref --prompt "图1说话" --image person.jpg --image-voice voice.mp3 --resolution 1080P
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
bl video ref --prompt "图1和图2在对话" --image a.jpg --image b.jpg --image-voice va.mp3 --image-voice vb.mp3
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### `bl video task get`
|
|
186
|
+
|
|
187
|
+
| Field | Value |
|
|
188
|
+
| --- | --- |
|
|
189
|
+
| **Name** | `video task get` |
|
|
190
|
+
| **Description** | Query async task status |
|
|
191
|
+
| **Usage** | `bl video task get --task-id <id>` |
|
|
192
|
+
|
|
193
|
+
#### Options
|
|
194
|
+
|
|
195
|
+
| Flag | Type | Required | Description |
|
|
196
|
+
| --- | --- | --- | --- |
|
|
197
|
+
| `--task-id <id>` | string | no | Async task ID |
|
|
198
|
+
|
|
199
|
+
#### Examples
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
bl video task get --task-id 3b256896-3e70-xxxx-xxxx-xxxxxxxxxxxx
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
bl video task get --task-id 3b256896-3e70-xxxx --output json
|
|
207
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# `bl vision` commands
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `packages/cli/src/commands/catalog.ts`. Do not edit by hand.
|
|
4
|
+
> Regenerate: `pnpm --filter bailian-cli run generate:reference` (runs automatically on `build`).
|
|
5
|
+
|
|
6
|
+
Index: [index.md](index.md)
|
|
7
|
+
|
|
8
|
+
## Commands in this group
|
|
9
|
+
|
|
10
|
+
| Command | Description |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| `bl vision describe` | Describe an image or video using Qwen-VL |
|
|
13
|
+
|
|
14
|
+
## Command details
|
|
15
|
+
|
|
16
|
+
### `bl vision describe`
|
|
17
|
+
|
|
18
|
+
| Field | Value |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| **Name** | `vision describe` |
|
|
21
|
+
| **Description** | Describe an image or video using Qwen-VL |
|
|
22
|
+
| **Usage** | `bl vision describe --image <path-or-url> [--video <url>] [--prompt <text>]` |
|
|
23
|
+
|
|
24
|
+
#### Options
|
|
25
|
+
|
|
26
|
+
| Flag | Type | Required | Description |
|
|
27
|
+
| --- | --- | --- | --- |
|
|
28
|
+
| `--image <path-or-url>` | string | no | Local image path or URL |
|
|
29
|
+
| `--video <url>` | array | no | Video file URL or local path (mp4/mov/avi/mkv/webm) |
|
|
30
|
+
| `--prompt <text>` | string | no | Question about the content (default: auto-detected) |
|
|
31
|
+
| `--model <model>` | string | no | Vision model (default: qwen-vl-max) |
|
|
32
|
+
|
|
33
|
+
#### Examples
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
bl vision describe --image photo.jpg
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
bl vision describe --image https://example.com/photo.jpg --prompt "这只狗是什么品种?"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
bl vision describe --video https://example.com/video.mp4 --prompt "总结视频内容"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
bl vision describe --video ./local-video.mp4
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
bl vision describe --image photo.png --prompt "Extract the text" --model qwen-vl-plus
|
|
53
|
+
```
|
package/scripts/preuninstall.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Preuninstall script: remove SKILL.md from all AI coding tools on uninstall.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { existsSync, rmSync, openSync, writeSync, closeSync } from "fs";
|
|
8
|
-
import { join } from "path";
|
|
9
|
-
import { homedir } from "os";
|
|
10
|
-
|
|
11
|
-
const home = homedir();
|
|
12
|
-
|
|
13
|
-
// Write directly to /dev/tty to bypass npm output suppression
|
|
14
|
-
let ttyFd;
|
|
15
|
-
try {
|
|
16
|
-
ttyFd = openSync("/dev/tty", "w");
|
|
17
|
-
} catch {
|
|
18
|
-
ttyFd = null;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function ttyPrint(msg) {
|
|
22
|
-
if (ttyFd != null) {
|
|
23
|
-
writeSync(ttyFd, msg + "\n");
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const dotDirTargets = [
|
|
28
|
-
".qoder",
|
|
29
|
-
".claude",
|
|
30
|
-
".cline",
|
|
31
|
-
".qwen",
|
|
32
|
-
".cursor",
|
|
33
|
-
".windsurf",
|
|
34
|
-
".trae",
|
|
35
|
-
".qoderwork",
|
|
36
|
-
".kiro",
|
|
37
|
-
];
|
|
38
|
-
|
|
39
|
-
const customTargets = [
|
|
40
|
-
{ root: join(home, "Library", "Application Support", "iDingTalk", "wukong"), label: "Wukong" },
|
|
41
|
-
];
|
|
42
|
-
|
|
43
|
-
const targets = [
|
|
44
|
-
...dotDirTargets.map((d) => ({ root: join(home, d), label: d })),
|
|
45
|
-
...customTargets,
|
|
46
|
-
];
|
|
47
|
-
|
|
48
|
-
let removed = 0;
|
|
49
|
-
|
|
50
|
-
for (const { root, label } of targets) {
|
|
51
|
-
try {
|
|
52
|
-
const skillDir = join(root, "skills", "bailian-cli");
|
|
53
|
-
if (!existsSync(skillDir)) continue;
|
|
54
|
-
|
|
55
|
-
rmSync(skillDir, { recursive: true });
|
|
56
|
-
removed++;
|
|
57
|
-
ttyPrint(` \u2717 ${label}`);
|
|
58
|
-
} catch {
|
|
59
|
-
// Silent fail — don't block npm uninstall
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (removed > 0) {
|
|
64
|
-
ttyPrint(`Bailian CLI skill removed from ${removed} AI coding tool(s).`);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (ttyFd != null) {
|
|
68
|
-
closeSync(ttyFd);
|
|
69
|
-
}
|