bailian-cli 0.1.2 → 1.0.0
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/LICENSE +14 -14
- package/dist/bailian.d.mts +3 -0
- package/dist/bailian.mjs +178 -366
- package/package.json +38 -32
- package/scripts/postinstall.js +78 -124
- package/skill/SKILL.md +112 -820
- 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/README.md +0 -291
- package/scripts/preuninstall.js +0 -69
- package/skill/BAILIAN_API_DOC_REFER.md +0 -970
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# `bl app` 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 app call` | Call a Bailian application (agent or workflow) |
|
|
13
|
+
| `bl app list` | List Bailian applications |
|
|
14
|
+
|
|
15
|
+
## Command details
|
|
16
|
+
|
|
17
|
+
### `bl app call`
|
|
18
|
+
|
|
19
|
+
| Field | Value |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| **Name** | `app call` |
|
|
22
|
+
| **Description** | Call a Bailian application (agent or workflow) |
|
|
23
|
+
| **Usage** | `bl app call --app-id <id> --prompt <text> [flags]` |
|
|
24
|
+
|
|
25
|
+
#### Options
|
|
26
|
+
|
|
27
|
+
| Flag | Type | Required | Description |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
29
|
+
| `--app-id <id>` | string | yes | Application ID (required) |
|
|
30
|
+
| `--prompt <text>` | string | yes | Input prompt text |
|
|
31
|
+
| `--image <url>` | array | no | Image URL(s) to pass to the app (repeatable) |
|
|
32
|
+
| `--file-id <id>` | array | no | Pre-uploaded file ID(s) (repeatable) |
|
|
33
|
+
| `--session-id <id>` | string | no | Session ID for multi-turn conversation |
|
|
34
|
+
| `--stream` | boolean | no | Stream response (default: on in TTY) |
|
|
35
|
+
| `--pipeline-ids <ids>` | string | no | Knowledge base pipeline IDs (comma-separated) |
|
|
36
|
+
| `--memory-id <id>` | string | no | Memory ID for long-term memory |
|
|
37
|
+
| `--biz-params <json>` | string | no | Business parameters JSON (workflow variables) |
|
|
38
|
+
| `--has-thoughts` | boolean | no | Show agent thinking process |
|
|
39
|
+
|
|
40
|
+
#### Examples
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
bl app call --app-id abc123 --prompt "你好"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
bl app call --app-id abc123 --prompt "描述这张图片" --image https://example.com/photo.jpg
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
bl app call --app-id abc123 --prompt "分析图片" --image img1.jpg --image img2.jpg
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
bl app call --app-id abc123 --prompt "继续" --session-id sess_xxx --stream
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
bl app call --app-id abc123 --prompt "搜索资料" --pipeline-ids pipe1,pipe2
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
bl app call --app-id abc123 --prompt "开始" --biz-params '{"key":"value"}'
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### `bl app list`
|
|
67
|
+
|
|
68
|
+
| Field | Value |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| **Name** | `app list` |
|
|
71
|
+
| **Description** | List Bailian applications |
|
|
72
|
+
| **Usage** | `bl app list [flags]` |
|
|
73
|
+
|
|
74
|
+
#### Options
|
|
75
|
+
|
|
76
|
+
| Flag | Type | Required | Description |
|
|
77
|
+
| --- | --- | --- | --- |
|
|
78
|
+
| `--name <name>` | string | no | Filter by app name (keyword search) |
|
|
79
|
+
| `--page <n>` | number | no | Page number (default: 1) |
|
|
80
|
+
| `--page-size <n>` | number | no | Results per page (default: 30) |
|
|
81
|
+
| `--region <region>` | string | no | API region (default: cn-beijing) |
|
|
82
|
+
|
|
83
|
+
#### Examples
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
bl app list
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
bl app list --name 客服
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
bl app list --page 2 --page-size 10
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
bl app list --output json
|
|
99
|
+
```
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# `bl auth` 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 auth login` | Authenticate with API key |
|
|
13
|
+
| `bl auth logout` | Clear stored credentials |
|
|
14
|
+
| `bl auth status` | Show current authentication state |
|
|
15
|
+
|
|
16
|
+
## Command details
|
|
17
|
+
|
|
18
|
+
### `bl auth login`
|
|
19
|
+
|
|
20
|
+
| Field | Value |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| **Name** | `auth login` |
|
|
23
|
+
| **Description** | Authenticate with API key |
|
|
24
|
+
| **Usage** | `bl auth login --api-key <key> \| bl auth login --console` |
|
|
25
|
+
|
|
26
|
+
#### Options
|
|
27
|
+
|
|
28
|
+
| Flag | Type | Required | Description |
|
|
29
|
+
| --- | --- | --- | --- |
|
|
30
|
+
| `--api-key <key>` | string | no | DashScope API key to store |
|
|
31
|
+
| `--console` | boolean | no | Sign in via browser; opens the console login URL in your default browser |
|
|
32
|
+
|
|
33
|
+
#### Examples
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
bl auth login --api-key sk-xxxxx
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
bl auth login --console
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### `bl auth logout`
|
|
44
|
+
|
|
45
|
+
| Field | Value |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| **Name** | `auth logout` |
|
|
48
|
+
| **Description** | Clear stored credentials |
|
|
49
|
+
| **Usage** | `bl auth logout [--console] [--yes] [--dry-run]` |
|
|
50
|
+
|
|
51
|
+
#### Options
|
|
52
|
+
|
|
53
|
+
| Flag | Type | Required | Description |
|
|
54
|
+
| --- | --- | --- | --- |
|
|
55
|
+
| `--console` | boolean | no | Only clear the console access_token, keep api_key intact |
|
|
56
|
+
| `--yes` | boolean | no | Skip confirmation prompt |
|
|
57
|
+
|
|
58
|
+
#### Examples
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
bl auth logout
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
bl auth logout --console
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
bl auth logout --dry-run
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
bl auth logout --yes
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### `bl auth status`
|
|
77
|
+
|
|
78
|
+
| Field | Value |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| **Name** | `auth status` |
|
|
81
|
+
| **Description** | Show current authentication state |
|
|
82
|
+
| **Usage** | `bl auth status` |
|
|
83
|
+
|
|
84
|
+
#### Options
|
|
85
|
+
|
|
86
|
+
_No command-specific options._
|
|
87
|
+
|
|
88
|
+
#### Examples
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
bl auth status
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
bl auth status --output json
|
|
96
|
+
```
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# `bl config` 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 config export-schema` | Export all (or one) CLI command(s) as Anthropic/OpenAI-compatible JSON tool schemas |
|
|
13
|
+
| `bl config set` | Set a config value |
|
|
14
|
+
| `bl config show` | Display current configuration |
|
|
15
|
+
|
|
16
|
+
## Command details
|
|
17
|
+
|
|
18
|
+
### `bl config export-schema`
|
|
19
|
+
|
|
20
|
+
| Field | Value |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| **Name** | `config export-schema` |
|
|
23
|
+
| **Description** | Export all (or one) CLI command(s) as Anthropic/OpenAI-compatible JSON tool schemas |
|
|
24
|
+
| **Usage** | `bl config export-schema [--command "<name>"]` |
|
|
25
|
+
|
|
26
|
+
#### Options
|
|
27
|
+
|
|
28
|
+
| Flag | Type | Required | Description |
|
|
29
|
+
| --- | --- | --- | --- |
|
|
30
|
+
| `--command <name>` | string | no | Export schema for a specific command only (e.g. "image generate") |
|
|
31
|
+
|
|
32
|
+
#### Examples
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
bl config export-schema
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
bl config export-schema --command "video generate"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### `bl config set`
|
|
43
|
+
|
|
44
|
+
| Field | Value |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| **Name** | `config set` |
|
|
47
|
+
| **Description** | Set a config value |
|
|
48
|
+
| **Usage** | `bl config set --key <key> --value <value>` |
|
|
49
|
+
|
|
50
|
+
#### Options
|
|
51
|
+
|
|
52
|
+
| Flag | Type | Required | Description |
|
|
53
|
+
| --- | --- | --- | --- |
|
|
54
|
+
| `--key <key>` | string | no | Config key (region, base_url, output, output_dir, timeout, api_key, access_token, default_*_model, access_key_id, access_key_secret, workspace_id) |
|
|
55
|
+
| `--value <value>` | string | no | Value to set |
|
|
56
|
+
|
|
57
|
+
#### Examples
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
bl config set --key output --value json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
bl config set --key timeout --value 600
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
bl config set --key base_url --value https://dashscope.aliyuncs.com
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### `bl config show`
|
|
72
|
+
|
|
73
|
+
| Field | Value |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| **Name** | `config show` |
|
|
76
|
+
| **Description** | Display current configuration |
|
|
77
|
+
| **Usage** | `bl config show` |
|
|
78
|
+
|
|
79
|
+
#### Options
|
|
80
|
+
|
|
81
|
+
_No command-specific options._
|
|
82
|
+
|
|
83
|
+
#### Examples
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
bl config show
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
bl config show --output json
|
|
91
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `bl console` 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 console call` | Call a Bailian console API via the CLI gateway |
|
|
13
|
+
|
|
14
|
+
## Command details
|
|
15
|
+
|
|
16
|
+
### `bl console call`
|
|
17
|
+
|
|
18
|
+
| Field | Value |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| **Name** | `console call` |
|
|
21
|
+
| **Description** | Call a Bailian console API via the CLI gateway |
|
|
22
|
+
| **Usage** | `bl console call --api <api> --data <json> [flags]` |
|
|
23
|
+
|
|
24
|
+
#### Options
|
|
25
|
+
|
|
26
|
+
| Flag | Type | Required | Description |
|
|
27
|
+
| --- | --- | --- | --- |
|
|
28
|
+
| `--api <api>` | string | yes | API name (e.g. zeldaEasy.broadscope-bailian.memory-library.getLibraries) |
|
|
29
|
+
| `--data <json>` | string | yes | Request data as JSON string |
|
|
30
|
+
| `--region <region>` | string | no | API region (default: cn-beijing) |
|
|
31
|
+
|
|
32
|
+
#### Examples
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
bl console call --api zeldaEasy.broadscope-bailian.freeTrial.queryFreeTierQuota --data '{"queryFreeTierQuotaRequest":{"models":["qwen3-max"]}}'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
bl console call --api some.api.name --data '{"key":"value"}' --region cn-beijing
|
|
40
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# `bl file` 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 file upload` | Upload a local file to DashScope temporary storage (48h) |
|
|
13
|
+
|
|
14
|
+
## Command details
|
|
15
|
+
|
|
16
|
+
### `bl file upload`
|
|
17
|
+
|
|
18
|
+
| Field | Value |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| **Name** | `file upload` |
|
|
21
|
+
| **Description** | Upload a local file to DashScope temporary storage (48h) |
|
|
22
|
+
| **Usage** | `bl file upload --file <path> --model <model>` |
|
|
23
|
+
| **API docs** | [/developer-reference/get-temporary-file-url](https://help.aliyun.com/zh/model-studio/developer-reference/get-temporary-file-url) |
|
|
24
|
+
|
|
25
|
+
#### Options
|
|
26
|
+
|
|
27
|
+
| Flag | Type | Required | Description |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
29
|
+
| `--file <path>` | string | yes | Local file to upload (image, video, audio) |
|
|
30
|
+
| `--model <model>` | string | yes | Target model name (file is bound to this model) |
|
|
31
|
+
|
|
32
|
+
#### Examples
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
bl file upload --file photo.jpg --model qwen-vl-max
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
bl file upload --file video.mp4 --model wan2.1-t2v-plus
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
bl file upload --file audio.wav --model qwen3-asr-flash
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
bl file upload --file cat.png --model qwen-image-2.0
|
|
48
|
+
```
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# `bl image` 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 image edit` | Edit an existing image with text instructions (Qwen-Image) |
|
|
13
|
+
| `bl image generate` | Generate images (Qwen-Image / wan2.x) |
|
|
14
|
+
|
|
15
|
+
## Command details
|
|
16
|
+
|
|
17
|
+
### `bl image edit`
|
|
18
|
+
|
|
19
|
+
| Field | Value |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| **Name** | `image edit` |
|
|
22
|
+
| **Description** | Edit an existing image with text instructions (Qwen-Image) |
|
|
23
|
+
| **Usage** | `bl image edit --image <url> --prompt <text> [flags]` |
|
|
24
|
+
| **API docs** | [/developer-reference/qwen-image-edit-api](https://help.aliyun.com/zh/model-studio/developer-reference/qwen-image-edit-api) |
|
|
25
|
+
|
|
26
|
+
#### Options
|
|
27
|
+
|
|
28
|
+
| Flag | Type | Required | Description |
|
|
29
|
+
| --- | --- | --- | --- |
|
|
30
|
+
| `--image <url>` | array | yes | Source image URL or local file path (repeatable for multi-image merge) |
|
|
31
|
+
| `--prompt <text>` | string | yes | Edit instruction text |
|
|
32
|
+
| `--model <model>` | string | no | Model ID (default: qwen-image-2.0) |
|
|
33
|
+
| `--size <W*H>` | string | no | Output image size: ratio (3:4, 16:9) or pixels (2048*2048) |
|
|
34
|
+
| `--n <count>` | number | no | Number of images (default: 1, max: 6) |
|
|
35
|
+
| `--seed <n>` | number | no | Random seed for reproducible results |
|
|
36
|
+
| `--negative-prompt <text>` | string | no | Negative prompt to exclude unwanted content |
|
|
37
|
+
| `--prompt-extend` | boolean | no | Enable prompt smart rewrite (default: true) |
|
|
38
|
+
| `--no-prompt-extend` | boolean | no | Disable prompt extend |
|
|
39
|
+
| `--watermark` | boolean | no | Add watermark to output images |
|
|
40
|
+
| `--out-dir <dir>` | string | no | Download images to directory |
|
|
41
|
+
| `--out-prefix <prefix>` | string | no | Filename prefix (default: edited) |
|
|
42
|
+
|
|
43
|
+
#### Examples
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
bl image edit --image ./photo.png --prompt "把背景换成海滩"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
bl image edit --image https://example.com/logo.png --prompt "Change color to blue" --n 3
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
bl image edit --image ./a.png --image ./b.png --prompt "把两张图合并成一张拼图"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
bl image edit --image https://example.com/photo.png --prompt "Remove the person" --model qwen-image-2.0-pro
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### `bl image generate`
|
|
62
|
+
|
|
63
|
+
| Field | Value |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| **Name** | `image generate` |
|
|
66
|
+
| **Description** | Generate images (Qwen-Image / wan2.x) |
|
|
67
|
+
| **Usage** | `bl image generate --prompt <text> [flags]` |
|
|
68
|
+
| **API docs** | [/best-practice/wanx/text-to-image](https://help.aliyun.com/zh/model-studio/best-practice/wanx/text-to-image) |
|
|
69
|
+
|
|
70
|
+
#### Options
|
|
71
|
+
|
|
72
|
+
| Flag | Type | Required | Description |
|
|
73
|
+
| --- | --- | --- | --- |
|
|
74
|
+
| `--prompt <text>` | string | yes | Image description |
|
|
75
|
+
| `--model <model>` | string | no | Model ID (default: qwen-image-2.0) |
|
|
76
|
+
| `--size <W*H>` | string | no | Image size: ratio (3:4, 16:9, 1:1) or pixels (2048*2048) |
|
|
77
|
+
| `--n <count>` | number | no | Number of images per request (default: 1, max: 6) |
|
|
78
|
+
| `--seed <n>` | number | no | Random seed for reproducible generation |
|
|
79
|
+
| `--negative-prompt <text>` | string | no | Negative prompt to exclude unwanted content |
|
|
80
|
+
| `--prompt-extend` | boolean | no | Automatically extend prompt for better results (default: true for qwen-image) |
|
|
81
|
+
| `--no-prompt-extend` | boolean | no | Disable prompt extend |
|
|
82
|
+
| `--watermark` | boolean | no | Add watermark to generated images |
|
|
83
|
+
| `--no-wait` | boolean | no | Return task ID immediately without waiting (async models only) |
|
|
84
|
+
| `--out-dir <dir>` | string | no | Download images to directory |
|
|
85
|
+
| `--out-prefix <prefix>` | string | no | Filename prefix (default: image) |
|
|
86
|
+
| `--poll-interval <seconds>` | number | no | Polling interval when waiting (default: 3) |
|
|
87
|
+
|
|
88
|
+
#### Examples
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
bl image generate --prompt "一只穿太空服的猫在火星上"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
bl image generate --prompt "Logo design" --n 3 --out-dir ./generated/
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
bl image generate --prompt "Mountain landscape" --size 2688*1536
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
bl image generate --prompt "A castle" --seed 42 --no-prompt-extend
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
bl image generate --prompt "sunset" --model wan2.6-t2i --no-wait --quiet
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
bl image generate --prompt "Pro quality" --model qwen-image-2.0-pro
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
bl image generate --prompt "Product shots" --n 2 --concurrent 3 # 6 images in parallel
|
|
116
|
+
```
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# bailian-cli (`bl`) command reference
|
|
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
|
+
Command **details** are in sibling `<group>.md` files in this directory.
|
|
7
|
+
Use this index for the full quick index and global flags.
|
|
8
|
+
|
|
9
|
+
## Quick index
|
|
10
|
+
|
|
11
|
+
| Command | Description | Detail |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| `bl app call` | Call a Bailian application (agent or workflow) | [app.md](app.md) |
|
|
14
|
+
| `bl app list` | List Bailian applications | [app.md](app.md) |
|
|
15
|
+
| `bl auth login` | Authenticate with API key | [auth.md](auth.md) |
|
|
16
|
+
| `bl auth logout` | Clear stored credentials | [auth.md](auth.md) |
|
|
17
|
+
| `bl auth status` | Show current authentication state | [auth.md](auth.md) |
|
|
18
|
+
| `bl config export-schema` | Export all (or one) CLI command(s) as Anthropic/OpenAI-compatible JSON tool schemas | [config.md](config.md) |
|
|
19
|
+
| `bl config set` | Set a config value | [config.md](config.md) |
|
|
20
|
+
| `bl config show` | Display current configuration | [config.md](config.md) |
|
|
21
|
+
| `bl console call` | Call a Bailian console API via the CLI gateway | [console.md](console.md) |
|
|
22
|
+
| `bl file upload` | Upload a local file to DashScope temporary storage (48h) | [file.md](file.md) |
|
|
23
|
+
| `bl image edit` | Edit an existing image with text instructions (Qwen-Image) | [image.md](image.md) |
|
|
24
|
+
| `bl image generate` | Generate images (Qwen-Image / wan2.x) | [image.md](image.md) |
|
|
25
|
+
| `bl knowledge retrieve` | Retrieve from a Bailian knowledge base (requires AK/SK) | [knowledge.md](knowledge.md) |
|
|
26
|
+
| `bl memory add` | Add memory from messages or custom content | [memory.md](memory.md) |
|
|
27
|
+
| `bl memory delete` | Delete a memory node | [memory.md](memory.md) |
|
|
28
|
+
| `bl memory list` | List memory nodes for a user | [memory.md](memory.md) |
|
|
29
|
+
| `bl memory profile create` | Create a user profile schema for memory profiling | [memory.md](memory.md) |
|
|
30
|
+
| `bl memory profile get` | Get user profile by schema ID and user ID | [memory.md](memory.md) |
|
|
31
|
+
| `bl memory search` | Search memory nodes by query or messages | [memory.md](memory.md) |
|
|
32
|
+
| `bl memory update` | Update a memory node content | [memory.md](memory.md) |
|
|
33
|
+
| `bl model list` | List available foundation models | [model.md](model.md) |
|
|
34
|
+
| `bl omni` | Multimodal chat with text + audio output (Qwen-Omni) | [omni.md](omni.md) |
|
|
35
|
+
| `bl search web` | Search the web using DashScope MCP WebSearch service | [search.md](search.md) |
|
|
36
|
+
| `bl speech recognize` | Recognize speech from audio files (FunAudio-ASR) | [speech.md](speech.md) |
|
|
37
|
+
| `bl speech synthesize` | Synthesize speech from text (CosyVoice TTS) | [speech.md](speech.md) |
|
|
38
|
+
| `bl text chat` | Send a chat completion (OpenAI compatible, DashScope) | [text.md](text.md) |
|
|
39
|
+
| `bl update` | Update bl to the latest version | [update.md](update.md) |
|
|
40
|
+
| `bl usage free` | Query free-tier quota for a model | [usage.md](usage.md) |
|
|
41
|
+
| `bl video download` | Download a completed video by task ID | [video.md](video.md) |
|
|
42
|
+
| `bl video edit` | Edit a video with happyhorse-1.0-video-edit (style transfer, object replacement, etc.) | [video.md](video.md) |
|
|
43
|
+
| `bl video generate` | Generate a video from text or image (happyhorse-1.0-t2v / happyhorse-1.0-i2v / wan2.6-t2v) | [video.md](video.md) |
|
|
44
|
+
| `bl video ref` | Reference-to-video generation (happyhorse-1.0-r2v / wan2.6-r2v): multi-subject, multi-shot with voice | [video.md](video.md) |
|
|
45
|
+
| `bl video task get` | Query async task status | [video.md](video.md) |
|
|
46
|
+
| `bl vision describe` | Describe an image or video using Qwen-VL | [vision.md](vision.md) |
|
|
47
|
+
|
|
48
|
+
## By group
|
|
49
|
+
|
|
50
|
+
| Group | Commands | Reference |
|
|
51
|
+
| --- | --- | --- |
|
|
52
|
+
| `app` | `call`, `list` | [app.md](app.md) |
|
|
53
|
+
| `auth` | `login`, `logout`, `status` | [auth.md](auth.md) |
|
|
54
|
+
| `config` | `export-schema`, `set`, `show` | [config.md](config.md) |
|
|
55
|
+
| `console` | `call` | [console.md](console.md) |
|
|
56
|
+
| `file` | `upload` | [file.md](file.md) |
|
|
57
|
+
| `image` | `edit`, `generate` | [image.md](image.md) |
|
|
58
|
+
| `knowledge` | `retrieve` | [knowledge.md](knowledge.md) |
|
|
59
|
+
| `memory` | `add`, `delete`, `list`, `profile create`, `profile get`, `search`, `update` | [memory.md](memory.md) |
|
|
60
|
+
| `model` | `list` | [model.md](model.md) |
|
|
61
|
+
| `omni` | `(root)` | [omni.md](omni.md) |
|
|
62
|
+
| `search` | `web` | [search.md](search.md) |
|
|
63
|
+
| `speech` | `recognize`, `synthesize` | [speech.md](speech.md) |
|
|
64
|
+
| `text` | `chat` | [text.md](text.md) |
|
|
65
|
+
| `update` | `(root)` | [update.md](update.md) |
|
|
66
|
+
| `usage` | `free` | [usage.md](usage.md) |
|
|
67
|
+
| `video` | `download`, `edit`, `generate`, `ref`, `task get` | [video.md](video.md) |
|
|
68
|
+
| `vision` | `describe` | [vision.md](vision.md) |
|
|
69
|
+
|
|
70
|
+
## Global flags
|
|
71
|
+
|
|
72
|
+
Available on every command (in addition to command-specific options):
|
|
73
|
+
|
|
74
|
+
| Flag | Type | Required | Description |
|
|
75
|
+
| --- | --- | --- | --- |
|
|
76
|
+
| `--api-key <key>` | string | no | API key |
|
|
77
|
+
| `--region <region>` | string | no | API region: cn (default), us, intl |
|
|
78
|
+
| `--base-url <url>` | string | no | API base URL |
|
|
79
|
+
| `--output <format>` | string | no | Output format: text, json, yaml |
|
|
80
|
+
| `--timeout <seconds>` | number | no | Request timeout |
|
|
81
|
+
| `--quiet` | boolean | no | Suppress non-essential output |
|
|
82
|
+
| `--verbose` | boolean | no | Print HTTP request/response details |
|
|
83
|
+
| `--no-color` | boolean | no | Disable ANSI colors |
|
|
84
|
+
| `--dry-run` | boolean | no | Dry run mode |
|
|
85
|
+
| `--non-interactive` | boolean | no | Disable interactive prompts |
|
|
86
|
+
| `--concurrent <n>` | number | no | Run N parallel requests (default: 1) |
|
|
87
|
+
| `--help` | boolean | no | Show help |
|
|
88
|
+
| `--version` | boolean | no | Print version |
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## Notes
|
|
92
|
+
|
|
93
|
+
- Console commands (`app list`, `model list`, `usage free`, `console call`) require `bl auth login --console`.
|
|
94
|
+
- Most API commands use `DASHSCOPE_API_KEY` or `bl auth login --api-key`.
|
|
95
|
+
- Default output: **text** in TTY; **json** when piped. Console list commands default to **yaml** unless `--output` is set.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# `bl knowledge` 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 knowledge retrieve` | Retrieve from a Bailian knowledge base (requires AK/SK) |
|
|
13
|
+
|
|
14
|
+
## Command details
|
|
15
|
+
|
|
16
|
+
### `bl knowledge retrieve`
|
|
17
|
+
|
|
18
|
+
| Field | Value |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| **Name** | `knowledge retrieve` |
|
|
21
|
+
| **Description** | Retrieve from a Bailian knowledge base (requires AK/SK) |
|
|
22
|
+
| **Usage** | `bl knowledge retrieve --index-id <id> --query <text> [flags]` |
|
|
23
|
+
|
|
24
|
+
#### Options
|
|
25
|
+
|
|
26
|
+
| Flag | Type | Required | Description |
|
|
27
|
+
| --- | --- | --- | --- |
|
|
28
|
+
| `--index-id <id>` | string | yes | Knowledge base index ID (required) |
|
|
29
|
+
| `--query <text>` | string | yes | Search query (required) |
|
|
30
|
+
| `--workspace-id <id>` | string | no | Bailian workspace ID (or env BAILIAN_WORKSPACE_ID) |
|
|
31
|
+
| `--top-k <n>` | number | no | Number of results (default: 10) |
|
|
32
|
+
| `--rerank` | boolean | no | Enable rerank |
|
|
33
|
+
| `--rerank-top-n <n>` | number | no | Rerank top N results |
|
|
34
|
+
| `--access-key-id <key>` | string | no | Alibaba Cloud Access Key ID (or env) |
|
|
35
|
+
| `--access-key-secret <key>` | string | no | Alibaba Cloud Access Key Secret (or env) |
|
|
36
|
+
|
|
37
|
+
#### Examples
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
bl knowledge retrieve --index-id idx_xxx --query "如何使用阿里云百炼" --workspace-id ws_xxx
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
bl knowledge retrieve --index-id idx_xxx --query "API限流" --top-k 5 --rerank
|
|
45
|
+
```
|