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,195 @@
|
|
|
1
|
+
# `bl memory` 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 memory add` | Add memory from messages or custom content |
|
|
13
|
+
| `bl memory delete` | Delete a memory node |
|
|
14
|
+
| `bl memory list` | List memory nodes for a user |
|
|
15
|
+
| `bl memory profile create` | Create a user profile schema for memory profiling |
|
|
16
|
+
| `bl memory profile get` | Get user profile by schema ID and user ID |
|
|
17
|
+
| `bl memory search` | Search memory nodes by query or messages |
|
|
18
|
+
| `bl memory update` | Update a memory node content |
|
|
19
|
+
|
|
20
|
+
## Command details
|
|
21
|
+
|
|
22
|
+
### `bl memory add`
|
|
23
|
+
|
|
24
|
+
| Field | Value |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| **Name** | `memory add` |
|
|
27
|
+
| **Description** | Add memory from messages or custom content |
|
|
28
|
+
| **Usage** | `bl memory add --user-id <id> [--messages <json>] [--content <text>] [flags]` |
|
|
29
|
+
|
|
30
|
+
#### Options
|
|
31
|
+
|
|
32
|
+
| Flag | Type | Required | Description |
|
|
33
|
+
| --- | --- | --- | --- |
|
|
34
|
+
| `--user-id <id>` | string | yes | User ID (required) |
|
|
35
|
+
| `--messages <json>` | string | no | Messages JSON array: [{"role":"user","content":"..."},...] |
|
|
36
|
+
| `--content <text>` | string | no | Custom content text to memorize |
|
|
37
|
+
| `--profile-schema <id>` | string | no | Profile schema ID for user profiling |
|
|
38
|
+
| `--memory-library-id <id>` | string | no | Memory library ID (isolate memory space) |
|
|
39
|
+
|
|
40
|
+
#### Examples
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
bl memory add --user-id user1 --content "用户喜欢Python编程"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
bl memory add --user-id user1 --messages '[{"role":"user","content":"我喜欢旅行"}]'
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
bl memory add --user-id user1 --content "住在北京" --profile-schema schema_xxx
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### `bl memory delete`
|
|
55
|
+
|
|
56
|
+
| Field | Value |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| **Name** | `memory delete` |
|
|
59
|
+
| **Description** | Delete a memory node |
|
|
60
|
+
| **Usage** | `bl memory delete --node-id <id> --user-id <id>` |
|
|
61
|
+
|
|
62
|
+
#### Options
|
|
63
|
+
|
|
64
|
+
| Flag | Type | Required | Description |
|
|
65
|
+
| --- | --- | --- | --- |
|
|
66
|
+
| `--node-id <id>` | string | yes | Memory node ID (required) |
|
|
67
|
+
| `--user-id <id>` | string | yes | User ID (required) |
|
|
68
|
+
| `--memory-library-id <id>` | string | no | Memory library ID (non-default library) |
|
|
69
|
+
|
|
70
|
+
#### Examples
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
bl memory delete --node-id node_xxx --user-id user1
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### `bl memory list`
|
|
77
|
+
|
|
78
|
+
| Field | Value |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| **Name** | `memory list` |
|
|
81
|
+
| **Description** | List memory nodes for a user |
|
|
82
|
+
| **Usage** | `bl memory list --user-id <id> [flags]` |
|
|
83
|
+
|
|
84
|
+
#### Options
|
|
85
|
+
|
|
86
|
+
| Flag | Type | Required | Description |
|
|
87
|
+
| --- | --- | --- | --- |
|
|
88
|
+
| `--user-id <id>` | string | yes | User ID (required) |
|
|
89
|
+
| `--page-size <n>` | number | no | Results per page (default: 10) |
|
|
90
|
+
| `--page <n>` | number | no | Page number (default: 1) |
|
|
91
|
+
| `--memory-library-id <id>` | string | no | Memory library ID |
|
|
92
|
+
|
|
93
|
+
#### Examples
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
bl memory list --user-id user1
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
bl memory list --user-id user1 --page-size 20 --page 2
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### `bl memory profile create`
|
|
104
|
+
|
|
105
|
+
| Field | Value |
|
|
106
|
+
| --- | --- |
|
|
107
|
+
| **Name** | `memory profile create` |
|
|
108
|
+
| **Description** | Create a user profile schema for memory profiling |
|
|
109
|
+
| **Usage** | `bl memory profile create --name <name> --attributes <json> [flags]` |
|
|
110
|
+
|
|
111
|
+
#### Options
|
|
112
|
+
|
|
113
|
+
| Flag | Type | Required | Description |
|
|
114
|
+
| --- | --- | --- | --- |
|
|
115
|
+
| `--name <name>` | string | yes | Schema name (required) |
|
|
116
|
+
| `--description <text>` | string | no | Schema description |
|
|
117
|
+
| `--attributes <json>` | string | yes | Attributes JSON array: [{"name":"age","description":"年龄"}] |
|
|
118
|
+
|
|
119
|
+
#### Examples
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
bl memory profile create --name "user_basic" --attributes '[{"name":"age","description":"年龄"},{"name":"hobby","description":"爱好"}]'
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### `bl memory profile get`
|
|
126
|
+
|
|
127
|
+
| Field | Value |
|
|
128
|
+
| --- | --- |
|
|
129
|
+
| **Name** | `memory profile get` |
|
|
130
|
+
| **Description** | Get user profile by schema ID and user ID |
|
|
131
|
+
| **Usage** | `bl memory profile get --schema-id <id> --user-id <id>` |
|
|
132
|
+
|
|
133
|
+
#### Options
|
|
134
|
+
|
|
135
|
+
| Flag | Type | Required | Description |
|
|
136
|
+
| --- | --- | --- | --- |
|
|
137
|
+
| `--schema-id <id>` | string | yes | Profile schema ID (required) |
|
|
138
|
+
| `--user-id <id>` | string | yes | User ID (required) |
|
|
139
|
+
|
|
140
|
+
#### Examples
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
bl memory profile get --schema-id schema_xxx --user-id user1
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### `bl memory search`
|
|
147
|
+
|
|
148
|
+
| Field | Value |
|
|
149
|
+
| --- | --- |
|
|
150
|
+
| **Name** | `memory search` |
|
|
151
|
+
| **Description** | Search memory nodes by query or messages |
|
|
152
|
+
| **Usage** | `bl memory search --user-id <id> [--query <text>] [flags]` |
|
|
153
|
+
|
|
154
|
+
#### Options
|
|
155
|
+
|
|
156
|
+
| Flag | Type | Required | Description |
|
|
157
|
+
| --- | --- | --- | --- |
|
|
158
|
+
| `--user-id <id>` | string | yes | User ID (required) |
|
|
159
|
+
| `--query <text>` | string | no | Search query text |
|
|
160
|
+
| `--messages <json>` | string | no | Messages JSON array for context-based search |
|
|
161
|
+
| `--top-k <n>` | number | no | Number of results to return (default: 10) |
|
|
162
|
+
| `--memory-library-id <id>` | string | no | Memory library ID |
|
|
163
|
+
|
|
164
|
+
#### Examples
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
bl memory search --user-id user1 --query "编程偏好"
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
bl memory search --user-id user1 --messages '[{"role":"user","content":"推荐一本书"}]' --top-k 5
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### `bl memory update`
|
|
175
|
+
|
|
176
|
+
| Field | Value |
|
|
177
|
+
| --- | --- |
|
|
178
|
+
| **Name** | `memory update` |
|
|
179
|
+
| **Description** | Update a memory node content |
|
|
180
|
+
| **Usage** | `bl memory update --node-id <id> --user-id <id> --content <text>` |
|
|
181
|
+
|
|
182
|
+
#### Options
|
|
183
|
+
|
|
184
|
+
| Flag | Type | Required | Description |
|
|
185
|
+
| --- | --- | --- | --- |
|
|
186
|
+
| `--node-id <id>` | string | yes | Memory node ID (required) |
|
|
187
|
+
| `--user-id <id>` | string | yes | User ID (required) |
|
|
188
|
+
| `--content <text>` | string | yes | New content for the memory node (required) |
|
|
189
|
+
| `--memory-library-id <id>` | string | no | Memory library ID (non-default library) |
|
|
190
|
+
|
|
191
|
+
#### Examples
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
bl memory update --node-id node_xxx --user-id user1 --content "更新后的记忆内容"
|
|
195
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# `bl model` 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 model list` | List available foundation models |
|
|
13
|
+
|
|
14
|
+
## Command details
|
|
15
|
+
|
|
16
|
+
### `bl model list`
|
|
17
|
+
|
|
18
|
+
| Field | Value |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| **Name** | `model list` |
|
|
21
|
+
| **Description** | List available foundation models |
|
|
22
|
+
| **Usage** | `bl model list [flags]` |
|
|
23
|
+
|
|
24
|
+
#### Options
|
|
25
|
+
|
|
26
|
+
| Flag | Type | Required | Description |
|
|
27
|
+
| --- | --- | --- | --- |
|
|
28
|
+
| `--name <name>` | string | no | Filter by model name (keyword search) |
|
|
29
|
+
| `--page <n>` | number | no | Page number (default: 1) |
|
|
30
|
+
| `--page-size <n>` | number | no | Results per page (default: 50) |
|
|
31
|
+
| `--provider <name>` | array | no | Filter by model provider (repeatable) |
|
|
32
|
+
| `--capability <name>` | array | no | Filter by capability (repeatable) |
|
|
33
|
+
| `--region <region>` | string | no | API region (default: cn-beijing) |
|
|
34
|
+
|
|
35
|
+
#### Examples
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
bl model list
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
bl model list --name qwen
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
bl model list --page-size 20
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
bl model list --output json
|
|
51
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# `bl omni` 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 omni` | Multimodal chat with text + audio output (Qwen-Omni) |
|
|
13
|
+
|
|
14
|
+
## Command details
|
|
15
|
+
|
|
16
|
+
### `bl omni`
|
|
17
|
+
|
|
18
|
+
| Field | Value |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| **Name** | `omni` |
|
|
21
|
+
| **Description** | Multimodal chat with text + audio output (Qwen-Omni) |
|
|
22
|
+
| **Usage** | `bl omni --message <text> [flags]` |
|
|
23
|
+
| **API docs** | [/model-studio/qwen-omni](https://help.aliyun.com/zh/model-studio/model-studio/qwen-omni) |
|
|
24
|
+
|
|
25
|
+
#### Options
|
|
26
|
+
|
|
27
|
+
| Flag | Type | Required | Description |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
29
|
+
| `--message <text>` | array | yes | Message text (repeatable, prefix role: to set role) |
|
|
30
|
+
| `--model <model>` | string | no | Model ID (default: qwen3.5-omni-plus) |
|
|
31
|
+
| `--system <text>` | string | no | System prompt |
|
|
32
|
+
| `--image <url>` | array | no | Image URL or local file (repeatable) |
|
|
33
|
+
| `--audio <url>` | array | no | Audio URL or local file (repeatable) |
|
|
34
|
+
| `--video <url>` | array | no | Video file URL / local path, or comma-separated frame URLs |
|
|
35
|
+
| `--voice <voice>` | string | no | Output voice (default: Cherry). Options: Chelsie, Cherry, Ethan, Serena, Tina |
|
|
36
|
+
| `--audio-format <fmt>` | string | no | Audio output format (default: wav) |
|
|
37
|
+
| `--audio-out <path>` | string | no | Save audio to file (default: auto-generate) |
|
|
38
|
+
| `--text-only` | boolean | no | Output text only, no audio generation |
|
|
39
|
+
| `--max-tokens <n>` | number | no | Maximum tokens to generate |
|
|
40
|
+
| `--temperature <n>` | number | no | Sampling temperature (0.0, 2.0] |
|
|
41
|
+
|
|
42
|
+
#### Examples
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
bl omni --message "你好,你是谁?"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
bl omni --message "描述这张图片" --image ./photo.jpg
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
bl omni --message "这段音频在说什么?" --audio https://example.com/audio.wav
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
bl omni --message "总结这个视频" --video https://example.com/video.mp4
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
bl omni --message "这个视频讲了什么" --video ./local-video.mp4 --text-only
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
bl omni --message "用四川话回答:今天天气怎么样" --voice Serena
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
bl omni --message "Hello" --text-only --output json
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
bl omni --message "朗读这段话" --audio-out greeting.wav
|
|
74
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# `bl search` 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 search web` | Search the web using DashScope MCP WebSearch service |
|
|
13
|
+
|
|
14
|
+
## Command details
|
|
15
|
+
|
|
16
|
+
### `bl search web`
|
|
17
|
+
|
|
18
|
+
| Field | Value |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| **Name** | `search web` |
|
|
21
|
+
| **Description** | Search the web using DashScope MCP WebSearch service |
|
|
22
|
+
| **Usage** | `bl search web --query <text> [flags]` |
|
|
23
|
+
|
|
24
|
+
#### Options
|
|
25
|
+
|
|
26
|
+
| Flag | Type | Required | Description |
|
|
27
|
+
| --- | --- | --- | --- |
|
|
28
|
+
| `--query <text>` | string | yes | Search query text |
|
|
29
|
+
| `--count <n>` | number | no | Number of search results (default: 10) |
|
|
30
|
+
| `--list-tools` | boolean | no | List available MCP tools and exit |
|
|
31
|
+
|
|
32
|
+
#### Examples
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
bl search web --query "阿里云百炼最新功能"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
bl search web --query "TypeScript 5.9 new features" --count 5
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
bl search web --query "今日新闻"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
bl search web --list-tools
|
|
48
|
+
```
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# `bl speech` 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 speech recognize` | Recognize speech from audio files (FunAudio-ASR) |
|
|
13
|
+
| `bl speech synthesize` | Synthesize speech from text (CosyVoice TTS) |
|
|
14
|
+
|
|
15
|
+
## Command details
|
|
16
|
+
|
|
17
|
+
### `bl speech recognize`
|
|
18
|
+
|
|
19
|
+
| Field | Value |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| **Name** | `speech recognize` |
|
|
22
|
+
| **Description** | Recognize speech from audio files (FunAudio-ASR) |
|
|
23
|
+
| **Usage** | `bl speech recognize --url <audio-url> [flags]` |
|
|
24
|
+
| **API docs** | [/developer-reference/recording-file-recognition](https://help.aliyun.com/zh/model-studio/developer-reference/recording-file-recognition) |
|
|
25
|
+
|
|
26
|
+
#### Options
|
|
27
|
+
|
|
28
|
+
| Flag | Type | Required | Description |
|
|
29
|
+
| --- | --- | --- | --- |
|
|
30
|
+
| `--url <url>` | array | yes | Audio file URL or local file path (repeatable, max 100) |
|
|
31
|
+
| `--model <model>` | string | no | Model ID (default: fun-asr) |
|
|
32
|
+
| `--language <lang>` | string | no | Language hint (e.g. zh, en, ja) |
|
|
33
|
+
| `--diarization` | boolean | no | Enable automatic speaker diarization |
|
|
34
|
+
| `--speaker-count <n>` | number | no | Expected number of speakers (requires --diarization) |
|
|
35
|
+
| `--vocabulary-id <id>` | string | no | Hot-word vocabulary ID for improved accuracy |
|
|
36
|
+
| `--channel-id <n>` | number | no | Audio channel ID (default: 0) |
|
|
37
|
+
| `--out <path>` | string | no | Save full transcription result to JSON file |
|
|
38
|
+
| `--no-wait` | boolean | no | Return task ID immediately without polling |
|
|
39
|
+
| `--poll-interval <seconds>` | number | no | Polling interval in seconds (default: 2) |
|
|
40
|
+
|
|
41
|
+
#### Examples
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
bl speech recognize --url https://example.com/audio.mp3
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
bl speech recognize --url https://example.com/a.mp3 --url https://example.com/b.mp3
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
bl speech recognize --url https://example.com/meeting.wav --diarization --speaker-count 3
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
bl speech recognize --url https://example.com/audio.mp3 --language zh
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
bl speech recognize --url https://example.com/audio.mp3 --vocabulary-id vocab-abc123
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
bl speech recognize --url https://example.com/audio.mp3 --out result.json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
bl speech recognize --url https://example.com/audio.mp3 --no-wait --quiet
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### `bl speech synthesize`
|
|
72
|
+
|
|
73
|
+
| Field | Value |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| **Name** | `speech synthesize` |
|
|
76
|
+
| **Description** | Synthesize speech from text (CosyVoice TTS) |
|
|
77
|
+
| **Usage** | `bl speech synthesize --text <text> [flags]` |
|
|
78
|
+
| **API docs** | [/developer-reference/cosyvoice](https://help.aliyun.com/zh/model-studio/developer-reference/cosyvoice) |
|
|
79
|
+
|
|
80
|
+
#### Options
|
|
81
|
+
|
|
82
|
+
| Flag | Type | Required | Description |
|
|
83
|
+
| --- | --- | --- | --- |
|
|
84
|
+
| `--text <text>` | string | yes | Text to synthesize into speech |
|
|
85
|
+
| `--text-file <path>` | string | no | Read text from a file instead of --text |
|
|
86
|
+
| `--model <model>` | string | no | Model ID (default: cosyvoice-v3-flash). System voices available for cosyvoice-v3-flash |
|
|
87
|
+
| `--voice <voice>` | string | no | Voice ID. Use --list-voices to see system voices for cosyvoice-v3-flash; for v3.5-flash provide a clone/design voice ID |
|
|
88
|
+
| `--list-voices` | boolean | no | List available system voices for the selected model and exit |
|
|
89
|
+
| `--format <format>` | string | no | Audio format: mp3, pcm, wav, opus (default: mp3) |
|
|
90
|
+
| `--sample-rate <rate>` | string | no | Audio sample rate in Hz (e.g. 24000) |
|
|
91
|
+
| `--volume <volume>` | string | no | Volume 0-100 (default: 50) |
|
|
92
|
+
| `--rate <rate>` | string | no | Speech rate 0.5-2.0 (default: 1.0) |
|
|
93
|
+
| `--pitch <pitch>` | string | no | Pitch multiplier 0.5-2.0 (default: 1.0) |
|
|
94
|
+
| `--seed <seed>` | string | no | Random seed 0-65535 for reproducible synthesis |
|
|
95
|
+
| `--language <lang>` | string | no | Language hint (e.g. zh, en, ja, ko, fr, de) |
|
|
96
|
+
| `--instruction <text>` | string | no | Natural language instruction to control speech style (e.g. "请用温柔的语调") |
|
|
97
|
+
| `--enable-ssml` | boolean | no | Enable SSML markup parsing in input text |
|
|
98
|
+
| `--out <path>` | string | no | Save audio to file (default: auto-generate in temp dir) |
|
|
99
|
+
| `--stream` | boolean | no | Stream raw PCM audio to stdout (pipe to player) |
|
|
100
|
+
|
|
101
|
+
#### Examples
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
bl speech synthesize --list-voices --model cosyvoice-v3-flash
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
bl speech synthesize --text "你好,我是千问" --voice <voice_id>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
bl speech synthesize --text "Hello world" --voice <voice_id> --language en
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
bl speech synthesize --text-file script.txt --out speech.wav --voice <voice_id>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
bl speech synthesize --text "今天天气真好" --voice <voice_id> --instruction "请用温柔的语调说话"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
bl speech synthesize --text "Hello" --voice <voice_id> --format wav --sample-rate 24000
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Stream to audio player (macOS)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
bl speech synthesize --text "你好" --voice <voice_id> --stream | afplay -
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Pipe to ffplay
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
bl speech synthesize --text "Hello" --voice <voice_id> --stream | ffplay -nodisp -autoexit -f s16le -ar 24000 -ac 1 -
|
|
141
|
+
```
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# `bl text` 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 text chat` | Send a chat completion (OpenAI compatible, DashScope) |
|
|
13
|
+
|
|
14
|
+
## Command details
|
|
15
|
+
|
|
16
|
+
### `bl text chat`
|
|
17
|
+
|
|
18
|
+
| Field | Value |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| **Name** | `text chat` |
|
|
21
|
+
| **Description** | Send a chat completion (OpenAI compatible, DashScope) |
|
|
22
|
+
| **Usage** | `bl text chat --message <text> [flags]` |
|
|
23
|
+
| **API docs** | [/compatibility-of-openai-with-dashscope](https://help.aliyun.com/zh/model-studio/compatibility-of-openai-with-dashscope) |
|
|
24
|
+
|
|
25
|
+
#### Options
|
|
26
|
+
|
|
27
|
+
| Flag | Type | Required | Description |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
29
|
+
| `--model <model>` | string | no | Model ID (default: qwen3.6-plus) |
|
|
30
|
+
| `--message <text>` | array | yes | Message text (repeatable, prefix role: to set role) |
|
|
31
|
+
| `--messages-file <path>` | string | no | JSON file with messages array (use - for stdin) |
|
|
32
|
+
| `--system <text>` | string | no | System prompt |
|
|
33
|
+
| `--max-tokens <n>` | number | no | Maximum tokens to generate (default: 4096) |
|
|
34
|
+
| `--temperature <n>` | number | no | Sampling temperature (0.0, 2.0] |
|
|
35
|
+
| `--top-p <n>` | number | no | Nucleus sampling threshold |
|
|
36
|
+
| `--stream` | boolean | no | Stream response tokens (default: on in TTY) |
|
|
37
|
+
| `--tool <json-or-path>` | array | no | Tool definition as JSON or file path (repeatable) |
|
|
38
|
+
| `--enable-thinking` | boolean | no | Enable thinking/reasoning mode (for qwen3/qwq models) |
|
|
39
|
+
| `--thinking-budget <n>` | number | no | Max tokens for thinking (default: 4096) |
|
|
40
|
+
|
|
41
|
+
#### Examples
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
bl text chat --message "What is Qwen?"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
bl text chat --model qwen-max --system "You are a coding assistant." --message "Write fizzbuzz in Python"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
bl text chat --message "Hello" --message "assistant:Hi!" --message "How are you?"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
cat conversation.json | bl text chat --messages-file - --stream
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
bl text chat --message "Hello" --output json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
bl text chat --model qwq-plus --message "Solve 1+1" --enable-thinking
|
|
65
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `bl update` 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 update` | Update bl to the latest version |
|
|
13
|
+
|
|
14
|
+
## Command details
|
|
15
|
+
|
|
16
|
+
### `bl update`
|
|
17
|
+
|
|
18
|
+
| Field | Value |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| **Name** | `update` |
|
|
21
|
+
| **Description** | Update bl to the latest version |
|
|
22
|
+
| **Usage** | `bl update` |
|
|
23
|
+
|
|
24
|
+
#### Options
|
|
25
|
+
|
|
26
|
+
_No command-specific options._
|
|
27
|
+
|
|
28
|
+
#### Examples
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
bl update
|
|
32
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# `bl usage` 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 usage free` | Query free-tier quota for a model |
|
|
13
|
+
|
|
14
|
+
## Command details
|
|
15
|
+
|
|
16
|
+
### `bl usage free`
|
|
17
|
+
|
|
18
|
+
| Field | Value |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| **Name** | `usage free` |
|
|
21
|
+
| **Description** | Query free-tier quota for a model |
|
|
22
|
+
| **Usage** | `bl usage free --model <model> [flags]` |
|
|
23
|
+
|
|
24
|
+
#### Options
|
|
25
|
+
|
|
26
|
+
| Flag | Type | Required | Description |
|
|
27
|
+
| --- | --- | --- | --- |
|
|
28
|
+
| `--model <model>` | string | yes | Model name to query (e.g. qwen3-max, qwen-turbo) |
|
|
29
|
+
| `--region <region>` | string | no | API region (default: cn-beijing) |
|
|
30
|
+
|
|
31
|
+
#### Examples
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
bl usage free --model qwen3-max
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
bl usage free --model qwen-turbo --output json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
bl usage free --model qwen3-max --region cn-beijing
|
|
43
|
+
```
|