From e1ad22ad0667f3894d032774744a0ec9814cca3b Mon Sep 17 00:00:00 2001 From: "lisheng.lisheng" Date: Tue, 24 Nov 2026 11:41:21 +0800 Subject: [PATCH 1/2] feat(telemetry): add global --biz-source for per-source PV/UV attribution Global flag bizSource on all commands; buildSettings maps it into settings, tracker normalizes (NAME_PATTERN, blank/invalid->unknown) and reports TrackingEvent.bizSource to AEM ext plus dedicated flat column c6 for direct filtering. PV=event count, UV=distinct uid, segment by c6 + command path. Adds core/e2e tests and telemetry-change doc; regenerates skill reference. --- docs/agents/telemetry-change.md | 4 + .../cli/tests/e2e/registry.smoke.e2e.test.ts | 1 + packages/core/src/config/loader.ts | 1 + packages/core/src/config/schema.ts | 2 + packages/core/src/telemetry/caller.ts | 10 + packages/core/src/telemetry/event.ts | 11 + packages/core/src/telemetry/tracker.ts | 3 +- packages/core/src/types/command.ts | 12 + packages/core/tests/config-priority.test.ts | 7 + packages/core/tests/telemetry-caller.test.ts | 12 +- packages/core/tests/telemetry-tracker.test.ts | 76 + skills/bailian-cli/reference/index.md | 23 +- skills/bailian-finetune/reference/index.md | 23 +- skills/bailian-gen/reference/index.md | 23 +- .../bailian-knowledge/reference/knowledge.md | 1350 ++++++++-------- skills/bailian-knowledge/reference/kscli.md | 1399 +++++++++-------- .../bailian-managed-agent/reference/index.md | 23 +- skills/bailian-memory/reference/index.md | 23 +- skills/bailian-sandbox/reference/index.md | 23 +- 19 files changed, 1621 insertions(+), 1405 deletions(-) diff --git a/docs/agents/telemetry-change.md b/docs/agents/telemetry-change.md index e46e0ea4..66508046 100644 --- a/docs/agents/telemetry-change.md +++ b/docs/agents/telemetry-change.md @@ -99,9 +99,12 @@ source-config 只用于百炼 / DashScope API 侧消费,不发送到通用网 - `authMethod` - `callerType`(必填:`agent` | `script` | `unknown`) - `callerName`:`agent` 与 `script` 时发送(缺省/非法 → `"unknown"`);`skillName` / `skillVersion` 仅 `agent` 时可选发送 +- `bizSource`:全局 `--biz-source` 声明的业务来源(可选);经 `normalizeBizSource` 归一化(缺省省略,空白/非法 → `"unknown"`),与 `callerName` 独立;映射到 AEM `c6` 专用扁平列 - 失败时的 `errorMessage`、`exitCode`、`httpStatus`、`requestId` - 安全 allowlist 过滤后的 `params` +`bizSource` 是调用方(skill/agent/产品)通过全局 `--biz-source` 主动声明的来源标签,用于按来源区分命令调用的 PV/UV。它走 `GLOBAL_FLAGS` → `buildSettings` → `settings.bizSource` → `trackCommandExecution` 读取,不经命令自有 flag,也不进 `PARAM_ALLOWLIST`(c1)。归一化复用 caller 的 `NAME_PATTERN`(小写、空格/下划线转连字符, bounded charset)防 PII。AEM 侧除随 `ext` 上报外,另映射到专用扁平列 `c6`(标量字符串),无需 JSON 解析维度配置即可直接按 `c6` 筛选/分组:PV=事件计数,UV=distinct `uid`;按命令路径(如 `flow-agent *`)过滤即得某命令组的来源 PV/UV。`bizSource` 与 `callerType`/`callerName`(宿主归因)是独立维度,不得混用。 + 调用方归因只认本次进程的 `BAILIAN_CALLER_*`(由 `readCaller` 归一化后写入事件): - `BAILIAN_CALLER_TYPE` 为 `agent` / `ai_agent`(大小写不敏感)→ `callerType=agent` @@ -155,6 +158,7 @@ AEM 映射: | `c3` | HTTP status | | `c4` | 错误文案,最多 500 字符 | | `c5` | request ID | +| `c6` | `bizSource` 业务来源(全局 `--biz-source`,归一化标量;专用扁平列,直接筛选/分组) | 远端发送是 best-effort,不得阻塞命令或改变退出码。正常退出最多等待 1 秒,SIGINT 最多等待 500 ms。 diff --git a/packages/cli/tests/e2e/registry.smoke.e2e.test.ts b/packages/cli/tests/e2e/registry.smoke.e2e.test.ts index 42af2e96..c73422e6 100644 --- a/packages/cli/tests/e2e/registry.smoke.e2e.test.ts +++ b/packages/cli/tests/e2e/registry.smoke.e2e.test.ts @@ -70,6 +70,7 @@ describe("e2e: bl registry smoke", () => { expect(stderr).toMatch(/--console-region/); expect(stderr).toMatch(/--console-site/); expect(stderr).toMatch(/--console-switch-agent/); + expect(stderr).toMatch(/--biz-source/); expect(stderr).not.toMatch(/^\s*--region\s/m); }); diff --git a/packages/core/src/config/loader.ts b/packages/core/src/config/loader.ts index 5abbbb07..655b1451 100644 --- a/packages/core/src/config/loader.ts +++ b/packages/core/src/config/loader.ts @@ -338,5 +338,6 @@ export function buildSettings(s: ResolutionSources): Settings { consoleSwitchAgent: flags.consoleSwitchAgent || file.console_switch_agent || undefined, dryRun: flags.dryRun || false, telemetry: env.DO_NOT_TRACK === "1" ? false : (file.telemetry ?? true), + bizSource: flags.bizSource ?? undefined, }; } diff --git a/packages/core/src/config/schema.ts b/packages/core/src/config/schema.ts index c6382030..38b2f11c 100644 --- a/packages/core/src/config/schema.ts +++ b/packages/core/src/config/schema.ts @@ -253,4 +253,6 @@ export interface Settings { quiet: boolean; dryRun: boolean; telemetry: boolean; + /** Per-invocation business source label (--biz-source) for usage analytics; not persisted. */ + bizSource?: string; } diff --git a/packages/core/src/telemetry/caller.ts b/packages/core/src/telemetry/caller.ts index bc6a2791..4bd6c835 100644 --- a/packages/core/src/telemetry/caller.ts +++ b/packages/core/src/telemetry/caller.ts @@ -33,6 +33,16 @@ function normalizeCallerName(raw: string | undefined): string { return NAME_PATTERN.test(normalized) ? normalized : "unknown"; } +/** + * Normalize a caller-declared business source label (--biz-source) to a stable id. + * Absent (undefined) stays undefined so the event omits the field; a present but + * blank/invalid label falls back to `unknown`, mirroring callerName. Reuses the + * caller name pattern to keep the value space bounded and free of PII. + */ +export function normalizeBizSource(raw: string | undefined): string | undefined { + return raw === undefined ? undefined : normalizeCallerName(raw); +} + /** Env-only attribution; no TTY or install-path heuristics. */ export function readCaller(env: NodeJS.ProcessEnv): CallerAttribution { const callerType = readTrimmed(env, CALLER_TYPE_ENV)?.toLowerCase(); diff --git a/packages/core/src/telemetry/event.ts b/packages/core/src/telemetry/event.ts index cb42045d..e752feea 100644 --- a/packages/core/src/telemetry/event.ts +++ b/packages/core/src/telemetry/event.ts @@ -23,6 +23,8 @@ export interface TrackingEvent { callerName?: string; skillName?: string; skillVersion?: string; + /** Caller-declared business source (--biz-source), normalized; reported as AEM c6. */ + bizSource?: string; } export function createTrackingEvent(opts: { @@ -34,6 +36,7 @@ export function createTrackingEvent(opts: { authMethod?: AuthRequirement; params?: Record; caller: CallerAttribution; + bizSource?: string; }): TrackingEvent { const event: TrackingEvent = { command: opts.command, @@ -55,6 +58,10 @@ export function createTrackingEvent(opts: { event.callerName = opts.caller.callerName; } + if (opts.bizSource !== undefined) { + event.bizSource = opts.bizSource; + } + if (opts.authMethod) { event.authMethod = opts.authMethod; } @@ -100,6 +107,10 @@ export function buildRemoteAemOptions(event: TrackingEvent): Record", + description: { + "en-US": + "Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product", + "zh-CN": + "业务来源标识,用于用量统计;调用方/skill 调用命令时建议带上自身名称,以便归因到具体 skill/产品", + }, + }, help: { type: "switch", description: { "en-US": "Show help", "zh-CN": "显示帮助信息" }, diff --git a/packages/core/tests/config-priority.test.ts b/packages/core/tests/config-priority.test.ts index a2371855..b27a32bc 100644 --- a/packages/core/tests/config-priority.test.ts +++ b/packages/core/tests/config-priority.test.ts @@ -33,6 +33,13 @@ function src(s: { const resolve = (s: Parameters[0]): Settings => buildSettings(src(s)); +test("maps --biz-source flag into settings.bizSource (not persisted)", () => { + expect(resolve({ flags: { bizSource: "coze" } }).bizSource).toBe("coze"); + expect(resolve({ flags: {} }).bizSource).toBeUndefined(); + // Explicit empty string is preserved (declared-but-empty), not folded to undefined. + expect(resolve({ flags: { bizSource: "" } }).bizSource).toBe(""); +}); + test("token-plan Profile 预设保持固定", () => { expect(getModelProfilePreset("token-plan")).toEqual({ baseUrl: "https://token-plan.cn-beijing.maas.aliyuncs.com", diff --git a/packages/core/tests/telemetry-caller.test.ts b/packages/core/tests/telemetry-caller.test.ts index ce72fb80..dc5371b4 100644 --- a/packages/core/tests/telemetry-caller.test.ts +++ b/packages/core/tests/telemetry-caller.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vite-plus/test"; -import { readCaller } from "../src/telemetry/caller.ts"; +import { normalizeBizSource, readCaller } from "../src/telemetry/caller.ts"; test.each([ { label: "missing", env: {} }, @@ -62,6 +62,16 @@ test("normalizes callerName and falls back to unknown", () => { }); }); +test("normalizeBizSource keeps absent undefined and normalizes present labels", () => { + expect(normalizeBizSource(undefined)).toBeUndefined(); + expect(normalizeBizSource("Coze")).toBe("coze"); + expect(normalizeBizSource("My Skill")).toBe("my-skill"); + expect(normalizeBizSource("qwen_code")).toBe("qwen-code"); + expect(normalizeBizSource("")).toBe("unknown"); + expect(normalizeBizSource(" ")).toBe("unknown"); + expect(normalizeBizSource("bad/name!")).toBe("unknown"); +}); + test("drops illegal skillName and only keeps version when skillName is valid", () => { expect( readCaller({ diff --git a/packages/core/tests/telemetry-tracker.test.ts b/packages/core/tests/telemetry-tracker.test.ts index a5e5cab5..05d11b4f 100644 --- a/packages/core/tests/telemetry-tracker.test.ts +++ b/packages/core/tests/telemetry-tracker.test.ts @@ -312,3 +312,79 @@ test("does not call sinks when telemetry is disabled", async () => { expect(sinkMocks.localSink).not.toHaveBeenCalled(); expect(sinkMocks.remoteSink).not.toHaveBeenCalled(); }); + +test("reports bizSource as a structured field and dedicated AEM c6 column", () => { + const event = createTrackingEvent({ + command: "flow-agent create", + durationMs: 1, + success: true, + identity, + caller: unknownCaller, + bizSource: "coze", + }); + expect(event.bizSource).toBe("coze"); + const opts = buildRemoteAemOptions(event); + expect(opts.c6).toBe("coze"); + expect(opts.ext).toMatchObject({ bizSource: "coze" }); +}); + +test("omits bizSource and c6 when no source is declared", () => { + const event = createTrackingEvent({ + command: "flow-agent create", + durationMs: 1, + success: true, + identity, + caller: unknownCaller, + }); + expect(event.bizSource).toBeUndefined(); + const opts = buildRemoteAemOptions(event); + expect(opts).not.toHaveProperty("c6"); + expect(opts.ext).not.toHaveProperty("bizSource"); +}); + +test.each([ + { label: "valid", bizSource: "My Skill", expected: "my-skill" }, + { label: "underscore", bizSource: "qwen_code", expected: "qwen-code" }, + { label: "invalid", bizSource: "bad/name!", expected: "unknown" }, + { label: "blank", bizSource: " ", expected: "unknown" }, + { label: "empty", bizSource: "", expected: "unknown" }, +])( + "normalizes settings.bizSource ($label) into the event and c6", + async ({ bizSource, expected }) => { + sinkMocks.localSink.mockClear(); + sinkMocks.remoteSink.mockClear(); + await trackCommandExecution( + { + identity, + settings: { telemetry: true, bizSource } as Settings, + authMethod: "console", + caller: unknownCaller, + }, + ["flow-agent", "create"], + {}, + async () => {}, + ); + const event = sinkMocks.remoteSink.mock.calls[0]![0]; + expect(event.bizSource).toBe(expected); + expect(buildRemoteAemOptions(event).c6).toBe(expected); + }, +); + +test("absent settings.bizSource omits the field and c6", async () => { + sinkMocks.localSink.mockClear(); + sinkMocks.remoteSink.mockClear(); + await trackCommandExecution( + { + identity, + settings: { telemetry: true } as Settings, + authMethod: "console", + caller: unknownCaller, + }, + ["flow-agent", "create"], + {}, + async () => {}, + ); + const event = sinkMocks.remoteSink.mock.calls[0]![0]; + expect(event.bizSource).toBeUndefined(); + expect(buildRemoteAemOptions(event)).not.toHaveProperty("c6"); +}); diff --git a/skills/bailian-cli/reference/index.md b/skills/bailian-cli/reference/index.md index 7426ae81..161ebd83 100644 --- a/skills/bailian-cli/reference/index.md +++ b/skills/bailian-cli/reference/index.md @@ -174,17 +174,18 @@ Use this index for the skill-scoped quick index and global flags. Available on every command (in addition to command-specific flags): -| Flag | Type | Required | Description | -| ----------------------- | ------ | -------- | --------------------------------------------------------- | -| `--introspect` | switch | no | Print the machine-readable command schema (JSON) and exit | -| `--output ` | string | no | Output format: text, json | -| `--timeout ` | number | no | Request timeout | -| `--quiet` | switch | no | Suppress non-essential output | -| `--verbose` | switch | no | Print HTTP request/response details | -| `--dry-run` | switch | no | Dry run mode | -| `--config ` | string | no | Use a config profile for this command | -| `--help` | switch | no | Show help | -| `--version` | switch | no | Print version | +| Flag | Type | Required | Description | +| ----------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `--introspect` | switch | no | Print the machine-readable command schema (JSON) and exit | +| `--output ` | string | no | Output format: text, json | +| `--timeout ` | number | no | Request timeout | +| `--quiet` | switch | no | Suppress non-essential output | +| `--verbose` | switch | no | Print HTTP request/response details | +| `--dry-run` | switch | no | Dry run mode | +| `--config ` | string | no | Use a config profile for this command | +| `--biz-source ` | string | no | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| `--help` | switch | no | Show help | +| `--version` | switch | no | Print version | ## Model auth flags diff --git a/skills/bailian-finetune/reference/index.md b/skills/bailian-finetune/reference/index.md index 279376a4..cc0821c9 100644 --- a/skills/bailian-finetune/reference/index.md +++ b/skills/bailian-finetune/reference/index.md @@ -104,17 +104,18 @@ Use this index for the skill-scoped quick index and global flags. Available on every command (in addition to command-specific flags): -| Flag | Type | Required | Description | -| ----------------------- | ------ | -------- | --------------------------------------------------------- | -| `--introspect` | switch | no | Print the machine-readable command schema (JSON) and exit | -| `--output ` | string | no | Output format: text, json | -| `--timeout ` | number | no | Request timeout | -| `--quiet` | switch | no | Suppress non-essential output | -| `--verbose` | switch | no | Print HTTP request/response details | -| `--dry-run` | switch | no | Dry run mode | -| `--config ` | string | no | Use a config profile for this command | -| `--help` | switch | no | Show help | -| `--version` | switch | no | Print version | +| Flag | Type | Required | Description | +| ----------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `--introspect` | switch | no | Print the machine-readable command schema (JSON) and exit | +| `--output ` | string | no | Output format: text, json | +| `--timeout ` | number | no | Request timeout | +| `--quiet` | switch | no | Suppress non-essential output | +| `--verbose` | switch | no | Print HTTP request/response details | +| `--dry-run` | switch | no | Dry run mode | +| `--config ` | string | no | Use a config profile for this command | +| `--biz-source ` | string | no | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| `--help` | switch | no | Show help | +| `--version` | switch | no | Print version | ## Model auth flags diff --git a/skills/bailian-gen/reference/index.md b/skills/bailian-gen/reference/index.md index a5a4b167..cee00683 100644 --- a/skills/bailian-gen/reference/index.md +++ b/skills/bailian-gen/reference/index.md @@ -52,17 +52,18 @@ Use this index for the skill-scoped quick index and global flags. Available on every command (in addition to command-specific flags): -| Flag | Type | Required | Description | -| ----------------------- | ------ | -------- | --------------------------------------------------------- | -| `--introspect` | switch | no | Print the machine-readable command schema (JSON) and exit | -| `--output ` | string | no | Output format: text, json | -| `--timeout ` | number | no | Request timeout | -| `--quiet` | switch | no | Suppress non-essential output | -| `--verbose` | switch | no | Print HTTP request/response details | -| `--dry-run` | switch | no | Dry run mode | -| `--config ` | string | no | Use a config profile for this command | -| `--help` | switch | no | Show help | -| `--version` | switch | no | Print version | +| Flag | Type | Required | Description | +| ----------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `--introspect` | switch | no | Print the machine-readable command schema (JSON) and exit | +| `--output ` | string | no | Output format: text, json | +| `--timeout ` | number | no | Request timeout | +| `--quiet` | switch | no | Suppress non-essential output | +| `--verbose` | switch | no | Print HTTP request/response details | +| `--dry-run` | switch | no | Dry run mode | +| `--config ` | string | no | Use a config profile for this command | +| `--biz-source ` | string | no | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| `--help` | switch | no | Show help | +| `--version` | switch | no | Print version | ## Model auth flags diff --git a/skills/bailian-knowledge/reference/knowledge.md b/skills/bailian-knowledge/reference/knowledge.md index 4f93c498..d9e7af1f 100644 --- a/skills/bailian-knowledge/reference/knowledge.md +++ b/skills/bailian-knowledge/reference/knowledge.md @@ -19,23 +19,24 @@ bl knowledge category add --name [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | ------------------------------------------------------------------ | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --collection-id | string | — | Create under this collection (defaults to the platform collection) | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --name | string | yes | Category name (1-20 chars) | -| --output | string | — | Output format: text, json | -| --parent-id | string | — | Create as a sub-category of this category | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --collection-id | string | — | Create under this collection (defaults to the platform collection) | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --name | string | yes | Category name (1-20 chars) | +| --output | string | — | Output format: text, json | +| --parent-id | string | — | Create as a sub-category of this category | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -70,22 +71,23 @@ Use `--yes` only after the user has confirmed this operation and its scope. Exit ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --category-id | string | yes | Category ID to delete | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | -| --yes | switch | — | Confirm this high-risk operation | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --category-id | string | yes | Category ID to delete | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| --yes | switch | — | Confirm this high-risk operation | ### Notes @@ -114,25 +116,26 @@ bl knowledge category list [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --collection-id | string | — | Filter by exact collection ID | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --max-result | number | — | Items per page (default: 20) | -| --name | string | — | Filter by category name (exact match, unlike the knowledge base list) | -| --next-token | string | — | Cursor for the next page (from previous output) | -| --output | string | — | Output format: text, json | -| --parent-id | string | — | List sub-categories of this exact parent category | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --collection-id | string | — | Filter by exact collection ID | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --max-result | number | — | Items per page (default: 20) | +| --name | string | — | Filter by category name (exact match, unlike the knowledge base list) | +| --next-token | string | — | Cursor for the next page (from previous output) | +| --output | string | — | Output format: text, json | +| --parent-id | string | — | List sub-categories of this exact parent category | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -167,28 +170,29 @@ bl knowledge chat --message --agent-id [flags] ### Flags -| Flag | Type | Required | Description | -| ------------------------------------ | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| --agent-id | string | yes | Q&A service ID (find in console knowledge Q&A page) | -| --agent-version | string | — | Service version to call: beta (draft for debugging) or a published number; default is the latest published version | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --enable-cache-control | boolean | — | Explicit context cache control | -| --help | switch | — | Show help | -| --image | array | — | Image URL (repeatable). Attached to the last user message as multimodal content | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --message | array | — | Message text (repeatable). Supports role:content prefix to set role (e.g. user:hello), defaults to user. Follows OpenAI message format | -| --messages-file | string | — | Complete messages JSON array, including tool history (excludes --message/--image) | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --request-id | string | — | Business request ID | -| --session-file-id | array | — | Session file ID (repeatable, up to 10; requires service file preprocessing) | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| ------------------------------------ | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --agent-id | string | yes | Q&A service ID (find in console knowledge Q&A page) | +| --agent-version | string | — | Service version to call: beta (draft for debugging) or a published number; default is the latest published version | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --enable-cache-control | boolean | — | Explicit context cache control | +| --help | switch | — | Show help | +| --image | array | — | Image URL (repeatable). Attached to the last user message as multimodal content | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --message | array | — | Message text (repeatable). Supports role:content prefix to set role (e.g. user:hello), defaults to user. Follows OpenAI message format | +| --messages-file | string | — | Complete messages JSON array, including tool history (excludes --message/--image) | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --request-id | string | — | Business request ID | +| --session-file-id | array | — | Session file ID (repeatable, up to 10; requires service file preprocessing) | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -233,6 +237,7 @@ bl knowledge chunk add --index-id (--content | --field ) [flags | --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | --api-key | string | — | API key | | --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | | --config | string | — | Use a config profile for this command | | --content | string | — | Chunk body text, up to 6000 chars (document-type); alternative to --content-file | | --content-file | string | — | Read chunk body from a UTF-8 plain text file (.md/.txt etc.) | @@ -296,23 +301,24 @@ Use `--yes` only after the user has confirmed this operation and its scope. Exit ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --chunk-id | array | yes | Chunk ID to delete (repeatable; batches of 10 are sent automatically) | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --index-id | string | yes | Knowledge base ID | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | -| --yes | switch | — | Confirm this high-risk operation | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --chunk-id | array | yes | Chunk ID to delete (repeatable; batches of 10 are sent automatically) | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --index-id | string | yes | Knowledge base ID | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| --yes | switch | — | Confirm this high-risk operation | ### Notes @@ -341,24 +347,25 @@ bl knowledge chunk list --index-id [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --doc-id | string | — | Only show chunks belonging to this document | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --index-id | string | yes | Knowledge base ID | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --page-number | number | — | Page number (default: 1) | -| --page-size | number | — | Page size per request | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --doc-id | string | — | Only show chunks belonging to this document | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --index-id | string | yes | Knowledge base ID | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --page-number | number | — | Page number (default: 1) | +| --page-size | number | — | Page size per request | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -389,28 +396,29 @@ bl knowledge chunk update --index-id --chunk-id --doc-id [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | ------------------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --chunk-id | string | yes | Chunk ID (metadata._id from the chunk list output) | -| --config | string | — | Use a config profile for this command | -| --content | string | — | New chunk content, 10-6000 chars; alternative to --content-file | -| --content-file | string | — | Read new content from a UTF-8 plain text file (.md/.txt etc.) | -| --doc-id | string | yes | Document ID owning the chunk (metadata.doc_id from the chunk list output) | -| --dry-run | switch | — | Dry run mode | -| --exclude | switch | — | Exclude this chunk from retrieval | -| --help | switch | — | Show help | -| --include | switch | — | Include this chunk in retrieval (default) | -| --index-id | string | yes | Knowledge base ID | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --title | string | — | Chunk title, 0-50 chars (empty string clears it; omit to keep unchanged) | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --chunk-id | string | yes | Chunk ID (metadata._id from the chunk list output) | +| --config | string | — | Use a config profile for this command | +| --content | string | — | New chunk content, 10-6000 chars; alternative to --content-file | +| --content-file | string | — | Read new content from a UTF-8 plain text file (.md/.txt etc.) | +| --doc-id | string | yes | Document ID owning the chunk (metadata.doc_id from the chunk list output) | +| --dry-run | switch | — | Dry run mode | +| --exclude | switch | — | Exclude this chunk from retrieval | +| --help | switch | — | Show help | +| --include | switch | — | Include this chunk in retrieval (default) | +| --index-id | string | yes | Knowledge base ID | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --title | string | — | Chunk title, 0-50 chars (empty string clears it; omit to keep unchanged) | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -443,25 +451,26 @@ bl knowledge collection create --name --description [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | ----------------------------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --description | string | yes | What this collection holds and what it is for — tells collections apart in the list | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --name | string | yes | Collection name | -| --oss-bucket | string | — | OSS bucket name (required with --store-type custom) | -| --oss-region | string | — | OSS region id (required with --store-type custom) | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --store-type | string | — | Storage: platform (managed) or custom (your own OSS bucket) | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --description | string | yes | What this collection holds and what it is for — tells collections apart in the list | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --name | string | yes | Collection name | +| --oss-bucket | string | — | OSS bucket name (required with --store-type custom) | +| --oss-region | string | — | OSS region id (required with --store-type custom) | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --store-type | string | — | Storage: platform (managed) or custom (your own OSS bucket) | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -494,22 +503,23 @@ bl knowledge collection get (--collection-id | --name ) [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --collection-id | string | — | Collection ID; alternative to --name | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --name | string | — | Collection name; alternative to --collection-id | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --collection-id | string | — | Collection ID; alternative to --name | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --name | string | — | Collection name; alternative to --collection-id | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Examples @@ -534,31 +544,32 @@ bl knowledge create --name --description (--doc-id | --catego ### Flags -| Flag | Type | Required | Description | -| --------------------------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --category-id | array | — | Import every file under this category (repeatable); mutually exclusive with --doc-id | -| --chunk-size | number | — | Chunk size in characters (default: 600, recommended 300-800) | -| --config | string | — | Use a config profile for this command | -| --description | string | yes | What this knowledge base holds and what it is for — tells bases apart in the workspace list (1-500 chars) | -| --doc-id | array | — | Data-center file id to import (repeatable); mutually exclusive with --category-id | -| --dry-run | switch | — | Dry run mode | -| --embedding-model | string | — | Embedding model name (document default: text-embedding-v4; multimedia/visual scene: qwen3-vl-embedding) | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --knowledge-scene | string | — | Knowledge scene (requires --knowledge-type) | -| --knowledge-type | string | — | Knowledge type: document or multimedia | -| --multimodal-embedding-model | string | — | Multimodal embedding model (multimedia/visual scene: alias of --embedding-model) | -| --name | string | yes | Knowledge base name (1-20 chars, unique in workspace) | -| --output | string | — | Output format: text, json | -| --poll-interval | number | — | Polling interval when waiting (default: 5) | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --wait | switch | — | Poll the initial import job to a terminal state | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --category-id | array | — | Import every file under this category (repeatable); mutually exclusive with --doc-id | +| --chunk-size | number | — | Chunk size in characters (default: 600, recommended 300-800) | +| --config | string | — | Use a config profile for this command | +| --description | string | yes | What this knowledge base holds and what it is for — tells bases apart in the workspace list (1-500 chars) | +| --doc-id | array | — | Data-center file id to import (repeatable); mutually exclusive with --category-id | +| --dry-run | switch | — | Dry run mode | +| --embedding-model | string | — | Embedding model name (document default: text-embedding-v4; multimedia/visual scene: qwen3-vl-embedding) | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --knowledge-scene | string | — | Knowledge scene (requires --knowledge-type) | +| --knowledge-type | string | — | Knowledge type: document or multimedia | +| --multimodal-embedding-model | string | — | Multimodal embedding model (multimedia/visual scene: alias of --embedding-model) | +| --name | string | yes | Knowledge base name (1-20 chars, unique in workspace) | +| --output | string | — | Output format: text, json | +| --poll-interval | number | — | Polling interval when waiting (default: 5) | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --wait | switch | — | Poll the initial import job to a terminal state | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -604,22 +615,23 @@ Use `--yes` only after the user has confirmed this operation and its scope. Exit ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --index-id | string | yes | Knowledge base ID | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | -| --yes | switch | — | Confirm this high-risk operation | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --index-id | string | yes | Knowledge base ID | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| --yes | switch | — | Confirm this high-risk operation | ### Notes @@ -656,23 +668,24 @@ Use `--yes` only after the user has confirmed this operation and its scope. Exit ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --doc-id | array | yes | Document ID to delete (repeatable) | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --index-id | string | yes | Knowledge base ID | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | -| --yes | switch | — | Confirm this high-risk operation | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --doc-id | array | yes | Document ID to delete (repeatable) | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --index-id | string | yes | Knowledge base ID | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| --yes | switch | — | Confirm this high-risk operation | ### Notes @@ -707,30 +720,31 @@ bl knowledge doc import --index-id (--doc-id ... | --category-id < ### Flags -| Flag | Type | Required | Description | -| ------------------------------------------------------ | ------- | -------- | ----------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --category-id | array | — | Data-center category ID (repeatable; excludes --doc-id) | -| --chunk-mode | string | — | Document chunk mode (not video time slicing) | -| --chunk-size | number | — | Document chunk size, 1-6000 characters | -| --config | string | — | Use a config profile for this command | -| --doc-id | array | — | Existing data-center file ID (repeatable; excludes --category-id) | -| --dry-run | switch | — | Dry run mode | -| --enable-headers | boolean | — | Enable document header extraction | -| --help | switch | — | Show help | -| --index-id | string | yes | Existing knowledge base ID | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --overlap-size | number | — | Document overlap size, 0-1024 characters | -| --poll-interval | number | — | Polling interval (default: 5 seconds) | -| --quiet | switch | — | Suppress non-essential output | -| --separator | string | — | Separator for regex chunk mode | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --wait | switch | — | Wait for the import job to finish | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| ------------------------------------------------------ | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --category-id | array | — | Data-center category ID (repeatable; excludes --doc-id) | +| --chunk-mode | string | — | Document chunk mode (not video time slicing) | +| --chunk-size | number | — | Document chunk size, 1-6000 characters | +| --config | string | — | Use a config profile for this command | +| --doc-id | array | — | Existing data-center file ID (repeatable; excludes --category-id) | +| --dry-run | switch | — | Dry run mode | +| --enable-headers | boolean | — | Enable document header extraction | +| --help | switch | — | Show help | +| --index-id | string | yes | Existing knowledge base ID | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --overlap-size | number | — | Document overlap size, 0-1024 characters | +| --poll-interval | number | — | Polling interval (default: 5 seconds) | +| --quiet | switch | — | Suppress non-essential output | +| --separator | string | — | Separator for regex chunk mode | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --wait | switch | — | Wait for the import job to finish | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -759,28 +773,29 @@ bl knowledge doc import-oss --bucket --region --oss-key [flags ### Flags -| Flag | Type | Required | Description | -| --------------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --bucket | string | yes | Authorized OSS bucket name | -| --category-id | string | — | Target data-center category (default: the default category) | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --oss-key | array | yes | OSS object key to import (repeatable, 1-10 per call) | -| --output | string | — | Output format: text, json | -| --overwrite | switch | — | Overwrite files previously imported from the same OSS keys | -| --parser | string | — | File parser (e.g. AUTO_SELECT or DOCMIND_LLM_VERSION_MEDIA) | -| --parser-config-file | string | — | JSON object containing parser configuration | -| --quiet | switch | — | Suppress non-essential output | -| --region | string | yes | OSS region id (e.g. cn-beijing) | -| --tag | array | — | File tag applied to every imported file (repeatable, up to 10) | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --bucket | string | yes | Authorized OSS bucket name | +| --category-id | string | — | Target data-center category (default: the default category) | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --oss-key | array | yes | OSS object key to import (repeatable, 1-10 per call) | +| --output | string | — | Output format: text, json | +| --overwrite | switch | — | Overwrite files previously imported from the same OSS keys | +| --parser | string | — | File parser (e.g. AUTO_SELECT or DOCMIND_LLM_VERSION_MEDIA) | +| --parser-config-file | string | — | JSON object containing parser configuration | +| --quiet | switch | — | Suppress non-essential output | +| --region | string | yes | OSS region id (e.g. cn-beijing) | +| --tag | array | — | File tag applied to every imported file (repeatable, up to 10) | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -813,24 +828,25 @@ bl knowledge doc list --index-id [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --details | switch | — | Include file-level chunk configuration (page size up to 10) | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --index-id | string | yes | Knowledge base ID | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --page-number | number | — | Page number (default: 1) | -| --page-size | number | — | Page size per request | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --details | switch | — | Include file-level chunk configuration (page size up to 10) | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --index-id | string | yes | Knowledge base ID | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --page-number | number | — | Page number (default: 1) | +| --page-size | number | — | Page size per request | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -861,26 +877,27 @@ bl knowledge doc status --index-id --job-id [flags] ### Flags -| Flag | Type | Required | Description | -| ------------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --index-id | string | yes | Knowledge base ID | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --job-id | string | yes | Import job ID (ingestionId returned by import commands) | -| --output | string | — | Output format: text, json | -| --page-number | number | — | Page number (default: 1) | -| --page-size | number | — | Page size per request | -| --poll-interval | number | — | Polling interval when waiting (default: 5) | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --wait | switch | — | Poll until the job reaches a terminal state | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| ------------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --index-id | string | yes | Knowledge base ID | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --job-id | string | yes | Import job ID (ingestionId returned by import commands) | +| --output | string | — | Output format: text, json | +| --page-number | number | — | Page number (default: 1) | +| --page-size | number | — | Page size per request | +| --poll-interval | number | — | Polling interval when waiting (default: 5) | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --wait | switch | — | Poll until the job reaches a terminal state | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -921,28 +938,29 @@ Use `--yes` only after the user has confirmed this operation and its scope. Exit ### Flags -| Flag | Type | Required | Description | -| ------------------------- | ------ | -------- | ------------------------------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --category-id | string | — | Data-center category ID (default: workspace default on first run) | -| --config | string | — | Use a config profile for this command | -| --delete | switch | — | Delete managed index documents missing locally | -| --dir | string | yes | Local document directory | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --index-id | string | yes | Target knowledge base ID | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --poll-interval | number | — | Polling interval (default: 5 seconds) | -| --quiet | switch | — | Suppress non-essential output | -| --state-file | string | — | Checkpoint path (default: /.bailian/sync/.json, keyed by knowledge base ID) | -| --sync-id | string | — | Synchronization set UUID | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | -| --yes | switch | — | Confirm this high-risk operation | +| Flag | Type | Required | Description | +| ------------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --category-id | string | — | Data-center category ID (default: workspace default on first run) | +| --config | string | — | Use a config profile for this command | +| --delete | switch | — | Delete managed index documents missing locally | +| --dir | string | yes | Local document directory | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --index-id | string | yes | Target knowledge base ID | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --poll-interval | number | — | Polling interval (default: 5 seconds) | +| --quiet | switch | — | Suppress non-essential output | +| --state-file | string | — | Checkpoint path (default: /.bailian/sync/.json, keyed by knowledge base ID) | +| --sync-id | string | — | Synchronization set UUID | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| --yes | switch | — | Confirm this high-risk operation | ### Notes @@ -977,23 +995,24 @@ bl knowledge doc tag --doc-id --tag [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --doc-id | array | yes | Data-center file ID to tag (repeatable, 1-20 per call) | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --mode | string | — | Update mode: append (default) or overwrite | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --tag | array | yes | Tag applied to every --doc-id (repeatable, each up to 32 chars) | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --doc-id | array | yes | Data-center file ID to tag (repeatable, 1-20 per call) | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --mode | string | — | Update mode: append (default) or overwrite | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --tag | array | yes | Tag applied to every --doc-id (repeatable, each up to 32 chars) | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -1024,29 +1043,30 @@ bl knowledge doc upload --file [flags] ### Flags -| Flag | Type | Required | Description | -| -------------------------------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --category-id | string | — | Target data-center category; defaults to the workspace default category | -| --category-type | string | — | File category type (SESSION_FILE for temporary chat attachments) | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --file | array | yes | Local file or directory path (repeatable). Directories are scanned recursively; unsupported formats are skipped | -| --help | switch | — | Show help | -| --index-id | string | — | Import into this knowledge base after registration (one job for all files) | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --parser | string | — | File parser (e.g. AUTO_SELECT or DOCMIND_LLM_VERSION_MEDIA) | -| --parser-config-file | string | — | JSON object containing parser configuration | -| --poll-interval | number | — | Polling interval when waiting (default: 5) | -| --quiet | switch | — | Suppress non-essential output | -| --tag | array | — | File tag (repeatable), applied to every uploaded file | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --wait | switch | — | Poll the import job to a terminal state (needs --index-id) | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| -------------------------------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --category-id | string | — | Target data-center category; defaults to the workspace default category | +| --category-type | string | — | File category type (SESSION_FILE for temporary chat attachments) | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --file | array | yes | Local file or directory path (repeatable). Directories are scanned recursively; unsupported formats are skipped | +| --help | switch | — | Show help | +| --index-id | string | — | Import into this knowledge base after registration (one job for all files) | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --parser | string | — | File parser (e.g. AUTO_SELECT or DOCMIND_LLM_VERSION_MEDIA) | +| --parser-config-file | string | — | JSON object containing parser configuration | +| --poll-interval | number | — | Polling interval when waiting (default: 5) | +| --quiet | switch | — | Suppress non-essential output | +| --tag | array | — | File tag (repeatable), applied to every uploaded file | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --wait | switch | — | Poll the import job to a terminal state (needs --index-id) | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -1097,22 +1117,23 @@ Use `--yes` only after the user has confirmed this operation and its scope. Exit ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --file-id | string | yes | Data-center file ID to delete | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | -| --yes | switch | — | Confirm this high-risk operation | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --file-id | string | yes | Data-center file ID to delete | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| --yes | switch | — | Confirm this high-risk operation | ### Notes @@ -1143,21 +1164,22 @@ bl knowledge file get --file-id [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --file-id | string | yes | Data-center file ID | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --file-id | string | yes | Data-center file ID | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Examples @@ -1178,25 +1200,26 @@ bl knowledge file list --category-id [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | ---------------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --category-id | string | yes | Category to list (find ids via the category list command); exact match | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --file-id | array | — | Filter by exact file ID (repeatable) | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --max-result | number | — | Items per page | -| --name | string | — | Filter by exact file name without its extension (a.md → pass a) | -| --next-token | string | — | Cursor for the next page (from previous output) | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --category-id | string | yes | Category to list (find ids via the category list command); exact match | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --file-id | array | — | Filter by exact file ID (repeatable) | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --max-result | number | — | Items per page | +| --name | string | — | Filter by exact file name without its extension (a.md → pass a) | +| --next-token | string | — | Cursor for the next page (from previous output) | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -1229,21 +1252,22 @@ bl knowledge info --index-id [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --index-id | string | yes | Knowledge base ID | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --index-id | string | yes | Knowledge base ID | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -1277,24 +1301,25 @@ Use `--yes` only after the user has confirmed this operation and its scope. Exit ### Flags -| Flag | Type | Required | Description | -| ------------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------ | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --name | string | — | Knowledge base name (1-20 characters; default: cli-demo) | -| --output | string | — | Output format: text, json | -| --poll-interval | number | — | Polling interval (default: 5 seconds) | -| --quiet | switch | — | Suppress non-essential output | -| --state-file | string | — | Recovery checkpoint (default: ~/.bailian/knowledge/init/.json, keyed by workspace and name) | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | -| --yes | switch | — | Confirm this high-risk operation | +| Flag | Type | Required | Description | +| ------------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --name | string | — | Knowledge base name (1-20 characters; default: cli-demo) | +| --output | string | — | Output format: text, json | +| --poll-interval | number | — | Polling interval (default: 5 seconds) | +| --quiet | switch | — | Suppress non-essential output | +| --state-file | string | — | Recovery checkpoint (default: ~/.bailian/knowledge/init/.json, keyed by workspace and name) | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| --yes | switch | — | Confirm this high-risk operation | ### Notes @@ -1331,23 +1356,24 @@ bl knowledge list [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --name | string | — | Filter by knowledge base name (fuzzy match, 1-20 chars) | -| --output | string | — | Output format: text, json | -| --page-number | number | — | Page number (default: 1) | -| --page-size | number | — | Page size per request | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --name | string | — | Filter by knowledge base name (fuzzy match, 1-20 chars) | +| --output | string | — | Output format: text, json | +| --page-number | number | — | Page number (default: 1) | +| --page-size | number | — | Page size per request | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -1380,25 +1406,26 @@ bl knowledge search --agent-id (--query | --image ) [flags] ### Flags -| Flag | Type | Required | Description | -| ------------------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------ | -| --agent-id | string | yes | Retrieval service ID (find in console knowledge retrieval page) | -| --agent-version | string | — | Service version to call: beta (draft for debugging) or a published number; default is the latest published version | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --image | array | — | Image URL for multimodal retrieval (repeatable) | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --kb-search-configs-file | string | — | JSON array of knowledge IDs and online search_filters | -| --output | string | — | Output format: text, json | -| --query | string | — | Search text (or provide --image) | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| ------------------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --agent-id | string | yes | Retrieval service ID (find in console knowledge retrieval page) | +| --agent-version | string | — | Service version to call: beta (draft for debugging) or a published number; default is the latest published version | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --image | array | — | Image URL for multimodal retrieval (repeatable) | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --kb-search-configs-file | string | — | JSON array of knowledge IDs and online search_filters | +| --output | string | — | Output format: text, json | +| --query | string | — | Search text (or provide --image) | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -1433,21 +1460,22 @@ bl knowledge service copy --agent-id [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --agent-id | string | yes | Source service (agent) ID to copy | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --agent-id | string | yes | Source service (agent) ID to copy | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -1474,25 +1502,26 @@ bl knowledge service create --name --scene [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --config-file | string | — | Complete agent_config JSON file (excludes --index-id) | -| --description | string | — | What this service answers and who it serves — recommended: agents read it to pick the right service (up to 1000 chars) | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --index-id | string | — | Bind this knowledge base; other settings use server defaults | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --name | string | yes | Service name (up to 200 chars, unique per scene in the workspace) | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --scene | string | yes | Service scene: chat (Q&A) or search (retrieval) | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --config-file | string | — | Complete agent_config JSON file (excludes --index-id) | +| --description | string | — | What this service answers and who it serves — recommended: agents read it to pick the right service (up to 1000 chars) | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --index-id | string | — | Bind this knowledge base; other settings use server defaults | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --name | string | yes | Service name (up to 200 chars, unique per scene in the workspace) | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --scene | string | yes | Service scene: chat (Q&A) or search (retrieval) | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -1533,22 +1562,23 @@ Use `--yes` only after the user has confirmed this operation and its scope. Exit ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --agent-id | string | yes | Service (agent) ID | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | -| --yes | switch | — | Confirm this high-risk operation | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --agent-id | string | yes | Service (agent) ID | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| --yes | switch | — | Confirm this high-risk operation | ### Notes @@ -1587,23 +1617,24 @@ Use `--yes` only after the user has confirmed this operation and its scope. Exit ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --agent-id | string | yes | Service (agent) ID | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --version-desc | string | — | Description for the newly published version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | -| --yes | switch | — | Confirm this high-risk operation | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --agent-id | string | yes | Service (agent) ID | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --version-desc | string | — | Description for the newly published version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| --yes | switch | — | Confirm this high-risk operation | ### Notes @@ -1636,22 +1667,23 @@ bl knowledge service get --agent-id [flags] ### Flags -| Flag | Type | Required | Description | -| ------------------------- | ------ | -------- | ------------------------------------------------------------------------------- | -| --agent-id | string | yes | Service (agent) ID | -| --agent-version | string | — | Specific version to inspect (beta or a published number); omit for all versions | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --output | string | — | Output format: text, json | -| --quiet | switch | — | Suppress non-essential output | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| ------------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --agent-id | string | yes | Service (agent) ID | +| --agent-version | string | — | Specific version to inspect (beta or a published number); omit for all versions | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --output | string | — | Output format: text, json | +| --quiet | switch | — | Suppress non-essential output | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -1682,27 +1714,28 @@ bl knowledge service list --scene [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | --------------------------------------------------------------- | -| --agent-id | string | — | Filter by exact agent ID | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --help | switch | — | Show help | -| --index-id | string | — | Filter by exact linked knowledge base (pipeline) ID | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --name | string | — | Filter by service name (fuzzy match) | -| --output | string | — | Output format: text, json | -| --page-number | number | — | Page number (default: 1) | -| --page-size | number | — | Page size per request | -| --quiet | switch | — | Suppress non-essential output | -| --scene | string | yes | Service scene: chat (Q&A) or search (retrieval) | -| --status | string | — | Filter by status: draft, deployed (includes edited) or deleted | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --agent-id | string | — | Filter by exact agent ID | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --dry-run | switch | — | Dry run mode | +| --help | switch | — | Show help | +| --index-id | string | — | Filter by exact linked knowledge base (pipeline) ID | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --name | string | — | Filter by service name (fuzzy match) | +| --output | string | — | Output format: text, json | +| --page-number | number | — | Page number (default: 1) | +| --page-size | number | — | Page size per request | +| --quiet | switch | — | Suppress non-essential output | +| --scene | string | yes | Service scene: chat (Q&A) or search (retrieval) | +| --status | string | — | Filter by status: draft, deployed (includes edited) or deleted | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -1733,35 +1766,36 @@ bl knowledge service update --agent-id [flags] ### Flags -| Flag | Type | Required | Description | -| ---------------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| --agent-id | string | yes | Service (agent) ID | -| --agent-version | string | — | Target version (default: beta draft). Published versions only accept --version-desc | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --config-file | string | — | JSON file replacing the whole agent_config (for nested settings like kb_search_configs); mutually exclusive with scalar config flags | -| --description | string | — | New service description (up to 1000 chars) | -| --dry-run | switch | — | Dry run mode | -| --enable-anti-leak | string | — | Enable anti prompt-leak: true or false | -| --enable-citation | string | — | Enable citations: true or false | -| --enable-refusal | string | — | Enable refusal answers: true or false | -| --enable-rich-text | string | — | Enable rich text output: true or false | -| --enable-session-file | string | — | Enable session files: true or false | -| --help | switch | — | Show help | -| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | -| --max-llm-calls | number | — | Max LLM calls per request, range 1-30 | -| --model | string | — | Generation model code (must be in the platform allowlist) | -| --name | string | — | New service name (up to 200 chars) | -| --output | string | — | Output format: text, json | -| --policy | string | — | Agent policy: turbo (fast) or agentic (multi-turn) | -| --quiet | switch | — | Suppress non-essential output | -| --temperature | number | — | Sampling temperature, range 0-2 | -| --timeout | number | — | Request timeout | -| --verbose | switch | — | Print HTTP request/response details | -| --version | switch | — | Print version | -| --version-desc | string | — | Version description | -| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | +| Flag | Type | Required | Description | +| ---------------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| --agent-id | string | yes | Service (agent) ID | +| --agent-version | string | — | Target version (default: beta draft). Published versions only accept --version-desc | +| --api-key | string | — | API key | +| --base-url | string | — | API base URL | +| --biz-source | string | — | Business source for usage analytics; callers/skills should pass their name so command calls are attributed to the calling skill/product | +| --config | string | — | Use a config profile for this command | +| --config-file | string | — | JSON file replacing the whole agent_config (for nested settings like kb_search_configs); mutually exclusive with scalar config flags | +| --description | string | — | New service description (up to 1000 chars) | +| --dry-run | switch | — | Dry run mode | +| --enable-anti-leak | string | — | Enable anti prompt-leak: true or false | +| --enable-citation | string | — | Enable citations: true or false | +| --enable-refusal | string | — | Enable refusal answers: true or false | +| --enable-rich-text | string | — | Enable rich text output: true or false | +| --enable-session-file | string | — | Enable session files: true or false | +| --help | switch | — | Show help | +| --introspect | switch | — | Print the machine-readable command schema (JSON) and exit | +| --max-llm-calls | number | — | Max LLM calls per request, range 1-30 | +| --model | string | — | Generation model code (must be in the platform allowlist) | +| --name | string | — | New service name (up to 200 chars) | +| --output | string | — | Output format: text, json | +| --policy | string | — | Agent policy: turbo (fast) or agentic (multi-turn) | +| --quiet | switch | — | Suppress non-essential output | +| --temperature | number | — | Sampling temperature, range 0-2 | +| --timeout | number | — | Request timeout | +| --verbose | switch | — | Print HTTP request/response details | +| --version | switch | — | Print version | +| --version-desc | string | — | Version description | +| --workspace-id | string | — | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) | ### Notes @@ -1804,23 +1838,24 @@ bl knowledge stats --index-id [flags] ### Flags -| Flag | Type | Required | Description | -| --------------------- | ------ | -------- | ---------------------------------------------------------------------------------- | -| --api-key | string | — | API key | -| --base-url | string | — | API base URL | -| --config | string | — | Use a config profile for this command | -| --dry-run | switch | — | Dry run mode | -| --end