diff --git a/packages/cli/README.md b/packages/cli/README.md index a712dd9..0b14795 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -9,7 +9,7 @@ [![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org) [![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE) -[Aliyun Model Studio CLI Site](https://bailian.console.aliyun.com/cli?source_channel=cli_github&) · [中文文档](https://github.com/modelstudioai/cli/blob/main/README.zh.md) · [API Documentation](https://help.aliyun.com/zh/model-studio/) · [Get API Key](https://bailian.console.aliyun.com/cli?source_channel=key_github&) +[Aliyun Model Studio CLI Site](https://bailian.console.aliyun.com/cli?source_channel=cli_github&) · [中文文档](https://github.com/modelstudioai/cli/blob/main/README.zh.md) · [API Documentation](https://help.aliyun.com/zh/model-studio/) · [Get API Key](https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/api-key) --- @@ -132,7 +132,7 @@ bl quota history # View quota change histor ### DashScope API Key -Required for most commands. Get your key from the [DashScope Console](https://bailian.console.aliyun.com/cli?source_channel=key_github&). +Required for most commands. Get your key from the [DashScope Console](https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/api-key). ```bash # Option 1: Environment variable @@ -189,8 +189,8 @@ Config file location: `~/.bailian/config.json` | Aliyun Model Studio CLI Site | https://bailian.console.aliyun.com/cli?source_channel=cli_github& | | DashScope API Docs | https://help.aliyun.com/zh/model-studio/ | | Qwen Model List | https://help.aliyun.com/zh/model-studio/getting-started/models | -| Aliyun Model Studio Console | https://bailian.console.aliyun.com/ | -| Get API Key | https://bailian.console.aliyun.com/cli?source_channel=key_github& | +| Aliyun Model Studio Console | https://bailian.console.aliyun.com/?source_channel=cli_github | +| Get API Key | https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/api-key | | Get AccessKey | https://ram.console.aliyun.com/manage/ak | ## Changelog diff --git a/packages/cli/README.zh.md b/packages/cli/README.zh.md index b852e1f..08e43a7 100644 --- a/packages/cli/README.zh.md +++ b/packages/cli/README.zh.md @@ -9,7 +9,7 @@ [![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org) [![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE) -[阿里云百炼 CLI 官方主页](https://bailian.console.aliyun.com/cli?source_channel=cli_github&) · [English](https://github.com/modelstudioai/cli/blob/main/README.md) · [API 文档](https://help.aliyun.com/zh/model-studio/) · [获取 API Key](https://bailian.console.aliyun.com/cli?source_channel=key_github&) +[阿里云百炼 CLI 官方主页](https://bailian.console.aliyun.com/cli?source_channel=cli_github&) · [English](https://github.com/modelstudioai/cli/blob/main/README.md) · [API 文档](https://help.aliyun.com/zh/model-studio/) · [获取 API Key](https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/api-key) --- @@ -127,7 +127,7 @@ bl quota history # 查看提额历史记录 ### DashScope API Key -大部分命令均需要 API Key。前往 [DashScope 控制台](https://bailian.console.aliyun.com/cli?source_channel=key_github&) 获取。 +大部分命令均需要 API Key。前往 [DashScope 控制台](https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/api-key) 获取。 ```bash # 方式一:环境变量 @@ -184,8 +184,8 @@ bl update | 阿里云百炼 CLI 官方主页 | https://bailian.console.aliyun.com/cli?source_channel=cli_github& | | DashScope API 文档 | https://help.aliyun.com/zh/model-studio/ | | 通义千问模型列表 | https://help.aliyun.com/zh/model-studio/getting-started/models | -| 阿里云百炼控制台 | https://bailian.console.aliyun.com/ | -| 获取 API Key | https://bailian.console.aliyun.com/cli?source_channel=key_github& | +| 阿里云百炼控制台 | https://bailian.console.aliyun.com/?source_channel=cli_github | +| 获取 API Key | https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/api-key | | 获取 AccessKey | https://ram.console.aliyun.com/manage/ak | ## 更新日志 diff --git a/skills/bailian-cli/reference/index.md b/skills/bailian-cli/reference/index.md index 8c49502..f33fc53 100644 --- a/skills/bailian-cli/reference/index.md +++ b/skills/bailian-cli/reference/index.md @@ -37,18 +37,25 @@ Use this index for the full quick index and global flags. | `bl omni` | Multimodal chat with text + audio output (Qwen-Omni) | [omni.md](omni.md) | | `bl pipeline run` | Run a pipeline workflow definition | [pipeline.md](pipeline.md) | | `bl pipeline validate` | Validate a pipeline definition without executing | [pipeline.md](pipeline.md) | +| `bl quota check` | 查看当前用量 vs 限流阈值 (Check current usage against rate limits) | [quota.md](quota.md) | +| `bl quota history` | 查看提额历史记录 (View quota change history) | [quota.md](quota.md) | +| `bl quota list` | 查看模型 RPM/TPM 限流值 (View model rate limits) | [quota.md](quota.md) | +| `bl quota request` | 申请临时提额 (Request temporary quota increase) | [quota.md](quota.md) | | `bl search web` | Search the web using DashScope MCP WebSearch service | [search.md](search.md) | | `bl speech recognize` | Recognize speech from audio files (FunAudio-ASR) | [speech.md](speech.md) | | `bl speech synthesize` | Synthesize speech from text (CosyVoice TTS) | [speech.md](speech.md) | | `bl text chat` | Send a chat completion (OpenAI compatible, DashScope) | [text.md](text.md) | | `bl update` | Update bl to the latest version | [update.md](update.md) | -| `bl usage free` | Query free-tier quota for a model | [usage.md](usage.md) | +| `bl usage free` | Query free-tier quota for models (all models if --model is omitted) | [usage.md](usage.md) | +| `bl usage freetier` | Enable or disable auto-stop (用完即停) for free-tier models. Enables by default; use --off to disable | [usage.md](usage.md) | +| `bl usage stats` | 查询模型用量统计 (Query model usage statistics) | [usage.md](usage.md) | | `bl video download` | Download a completed video by task ID | [video.md](video.md) | | `bl video edit` | Edit a video with happyhorse-1.0-video-edit (style transfer, object replacement, etc.) | [video.md](video.md) | | `bl video generate` | Generate a video from text or image (happyhorse-1.0-t2v / happyhorse-1.0-i2v / wan2.6-t2v) | [video.md](video.md) | | `bl video ref` | Reference-to-video generation (happyhorse-1.0-r2v / wan2.6-r2v): multi-subject, multi-shot with voice | [video.md](video.md) | | `bl video task get` | Query async task status | [video.md](video.md) | | `bl vision describe` | Describe an image or video using Qwen-VL | [vision.md](vision.md) | +| `bl workspace list` | 列出所有业务空间 (List all workspaces) | [workspace.md](workspace.md) | ## By group @@ -66,13 +73,15 @@ Use this index for the full quick index and global flags. | `memory` | `add`, `delete`, `list`, `profile create`, `profile get`, `search`, `update` | [memory.md](memory.md) | | `omni` | `(root)` | [omni.md](omni.md) | | `pipeline` | `run`, `validate` | [pipeline.md](pipeline.md) | +| `quota` | `check`, `history`, `list`, `request` | [quota.md](quota.md) | | `search` | `web` | [search.md](search.md) | | `speech` | `recognize`, `synthesize` | [speech.md](speech.md) | | `text` | `chat` | [text.md](text.md) | | `update` | `(root)` | [update.md](update.md) | -| `usage` | `free` | [usage.md](usage.md) | +| `usage` | `free`, `freetier`, `stats` | [usage.md](usage.md) | | `video` | `download`, `edit`, `generate`, `ref`, `task get` | [video.md](video.md) | | `vision` | `describe` | [vision.md](vision.md) | +| `workspace` | `list` | [workspace.md](workspace.md) | ## Global flags diff --git a/skills/bailian-cli/reference/quota.md b/skills/bailian-cli/reference/quota.md new file mode 100644 index 0000000..9b9351f --- /dev/null +++ b/skills/bailian-cli/reference/quota.md @@ -0,0 +1,163 @@ +# `bl quota` commands + +> Auto-generated from `packages/cli/src/commands/catalog.ts`. Do not edit by hand. +> Regenerate: `pnpm --filter bailian-cli run generate:reference`. + +Index: [index.md](index.md) + +## Commands in this group + +| Command | Description | +| ------------------ | ------------------------------------------------------------------ | +| `bl quota check` | 查看当前用量 vs 限流阈值 (Check current usage against rate limits) | +| `bl quota history` | 查看提额历史记录 (View quota change history) | +| `bl quota list` | 查看模型 RPM/TPM 限流值 (View model rate limits) | +| `bl quota request` | 申请临时提额 (Request temporary quota increase) | + +## Command details + +### `bl quota check` + +| Field | Value | +| --------------- | ------------------------------------------------------------------ | +| **Name** | `quota check` | +| **Description** | 查看当前用量 vs 限流阈值 (Check current usage against rate limits) | +| **Usage** | `bl quota check [--model ] [flags]` | + +#### Options + +| Flag | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------------------------ | +| `--model ` | string | no | 模型名称,逗号分隔多个 (Model name(s), comma-separated) | +| `--period ` | string | no | 查询最近 N 分钟的用量,默认 2 (Query usage for the last N minutes, default: 2) | +| `--region ` | string | no | API 区域,默认 cn-beijing (API region, default: cn-beijing) | + +#### Examples + +```bash +bl quota check +``` + +```bash +bl quota check --model qwen3.6-plus +``` + +```bash +bl quota check --period 5 +``` + +```bash +bl quota check --model qwen3.6-plus,qwen-turbo +``` + +```bash +bl quota check --output json +``` + +### `bl quota history` + +| Field | Value | +| --------------- | -------------------------------------------- | +| **Name** | `quota history` | +| **Description** | 查看提额历史记录 (View quota change history) | +| **Usage** | `bl quota history [flags]` | + +#### Options + +| Flag | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------------------------------------------------- | +| `--page ` | string | no | 页码,默认 1 (Page number, default: 1) | +| `--page-size ` | string | no | 每页条数,默认 10 (Page size, default: 10) | +| `--model ` | string | no | 按模型名过滤 (Filter by model name) | +| `--region ` | string | no | API 区域,默认 cn-beijing (API region, default: cn-beijing) | + +#### Examples + +```bash +bl quota history +``` + +```bash +bl quota history --page 2 +``` + +```bash +bl quota history --page-size 20 +``` + +```bash +bl quota history --model qwen-turbo +``` + +```bash +bl quota history --output json +``` + +### `bl quota list` + +| Field | Value | +| --------------- | ------------------------------------------------ | +| **Name** | `quota list` | +| **Description** | 查看模型 RPM/TPM 限流值 (View model rate limits) | +| **Usage** | `bl quota list [--model ] [flags]` | + +#### Options + +| Flag | Type | Required | Description | +| ------------------- | ------- | -------- | ---------------------------------------------------------------------------------- | +| `--model ` | string | no | 模型名称,逗号分隔多个 (Model name(s), comma-separated) | +| `--all` | boolean | no | 显示全部模型,不仅限于支持自助提额的 (Show all models, not just self-service ones) | +| `--region ` | string | no | API 区域,默认 cn-beijing (API region, default: cn-beijing) | + +#### Examples + +```bash +bl quota list +``` + +```bash +bl quota list --model qwen3.6-plus +``` + +```bash +bl quota list --model qwen3.6-plus,qwen-turbo +``` + +```bash +bl quota list --all +``` + +```bash +bl quota list --output json +``` + +### `bl quota request` + +| Field | Value | +| --------------- | -------------------------------------------------------- | +| **Name** | `quota request` | +| **Description** | 申请临时提额 (Request temporary quota increase) | +| **Usage** | `bl quota request --model --tpm [flags]` | + +#### Options + +| Flag | Type | Required | Description | +| ------------------- | ------- | -------- | ----------------------------------------------------------- | +| `--model ` | string | yes | 模型名称(必填)(Model name, required) | +| `--tpm ` | string | yes | 目标 TPM 值(必填)(Target TPM value, required) | +| `--yes` | boolean | no | 跳过降配确认 (Skip downgrade confirmation) | +| `--region ` | string | no | API 区域,默认 cn-beijing (API region, default: cn-beijing) | + +#### Examples + +```bash +bl quota request --model qwen-turbo --tpm 100000 +``` + +```bash +bl quota request --model qwen3.6-plus --tpm 8000000 --yes +``` + +```bash +bl quota request --model qwen-turbo --tpm 100000 --output json +``` diff --git a/skills/bailian-cli/reference/usage.md b/skills/bailian-cli/reference/usage.md index cd80642..248f7e7 100644 --- a/skills/bailian-cli/reference/usage.md +++ b/skills/bailian-cli/reference/usage.md @@ -7,33 +7,53 @@ Index: [index.md](index.md) ## Commands in this group -| Command | Description | -| --------------- | --------------------------------- | -| `bl usage free` | Query free-tier quota for a model | +| Command | Description | +| ------------------- | ----------------------------------------------------------------------------------------------------- | +| `bl usage free` | Query free-tier quota for models (all models if --model is omitted) | +| `bl usage freetier` | Enable or disable auto-stop (用完即停) for free-tier models. Enables by default; use --off to disable | +| `bl usage stats` | 查询模型用量统计 (Query model usage statistics) | ## Command details ### `bl usage free` -| Field | Value | -| --------------- | --------------------------------------- | -| **Name** | `usage free` | -| **Description** | Query free-tier quota for a model | -| **Usage** | `bl usage free --model [flags]` | +| Field | Value | +| --------------- | ------------------------------------------------------------------- | +| **Name** | `usage free` | +| **Description** | Query free-tier quota for models (all models if --model is omitted) | +| **Usage** | `bl usage free [--model [,model2,...]] [flags]` | #### Options -| Flag | Type | Required | Description | -| ------------------- | ------ | -------- | ------------------------------------------------ | -| `--model ` | string | yes | Model name to query (e.g. qwen3-max, qwen-turbo) | -| `--region ` | string | no | API region (default: cn-beijing) | +| Flag | Type | Required | Description | +| ------------------- | ------ | -------- | ------------------------------------------------------------------------- | +| `--model ` | string | no | Model name(s) to query, comma-separated for multiple; omit for all models | +| `--expiring ` | string | no | Only show quotas expiring within N days | +| `--sort ` | string | no | Sort by: remaining (ascending), expires (ascending) | +| `--region ` | string | no | API region (default: cn-beijing) | #### Examples +```bash +bl usage free +``` + ```bash bl usage free --model qwen3-max ``` +```bash +bl usage free --model qwen3-max,qwen-turbo +``` + +```bash +bl usage free --expiring 30 +``` + +```bash +bl usage free --sort remaining +``` + ```bash bl usage free --model qwen-turbo --output json ``` @@ -41,3 +61,95 @@ bl usage free --model qwen-turbo --output json ```bash bl usage free --model qwen3-max --region cn-beijing ``` + +### `bl usage freetier` + +| Field | Value | +| --------------- | ----------------------------------------------------------------------------------------------------- | +| **Name** | `usage freetier` | +| **Description** | Enable or disable auto-stop (用完即停) for free-tier models. Enables by default; use --off to disable | +| **Usage** | `bl usage freetier <--model [,model2,...] \| --all> [--off] [flags]` | + +#### Options + +| Flag | Type | Required | Description | +| ------------------- | ------- | -------- | ------------------------------------------- | +| `--model ` | string | no | Model name(s), comma-separated for multiple | +| `--all` | boolean | no | Apply to all free-tier models | +| `--on` | boolean | no | Enable auto-stop (default behavior) | +| `--off` | boolean | no | Disable auto-stop | +| `--region ` | string | no | API region (default: cn-beijing) | + +#### Examples + +```bash +bl usage freetier --model qwen3-max +``` + +```bash +bl usage freetier --model qwen3-max,qwen-turbo +``` + +```bash +bl usage freetier --all +``` + +```bash +bl usage freetier --on --model qwen3-max +``` + +```bash +bl usage freetier --off --model qwen3-max +``` + +```bash +bl usage freetier --off --all +``` + +### `bl usage stats` + +| Field | Value | +| --------------- | ---------------------------------------------------------- | +| **Name** | `usage stats` | +| **Description** | 查询模型用量统计 (Query model usage statistics) | +| **Usage** | `bl usage stats [--model ] [--days ] [flags]` | + +#### Options + +| Flag | Type | Required | Description | +| --------------------- | ------ | -------- | ---------------------------------------------------------------------------------------------- | +| `--model ` | string | no | 模型名称,逗号分隔多个;不指定则查全部概览 (Model name(s), comma-separated; omit for overview) | +| `--days ` | string | no | 查询天数,默认 7 (Number of days, default: 7) | +| `--type ` | string | no | 模型类型: Text, Vision, Multimodal, Audio, Embedding | +| `--workspace-id ` | string | no | 业务空间 ID (Workspace ID; env: BAILIAN_WORKSPACE_ID) | +| `--region ` | string | no | API 区域,默认 cn-beijing (API region, default: cn-beijing) | + +#### Examples + +```bash +bl usage stats +``` + +```bash +bl usage stats --days 30 +``` + +```bash +bl usage stats --model qwen-turbo +``` + +```bash +bl usage stats --model qwen-turbo --days 7 +``` + +```bash +bl usage stats --model qwen3.6-plus,deepseek-v4-pro +``` + +```bash +bl usage stats --type Text --days 14 +``` + +```bash +bl usage stats --output json +``` diff --git a/skills/bailian-cli/reference/workspace.md b/skills/bailian-cli/reference/workspace.md new file mode 100644 index 0000000..6058feb --- /dev/null +++ b/skills/bailian-cli/reference/workspace.md @@ -0,0 +1,43 @@ +# `bl workspace` commands + +> Auto-generated from `packages/cli/src/commands/catalog.ts`. Do not edit by hand. +> Regenerate: `pnpm --filter bailian-cli run generate:reference`. + +Index: [index.md](index.md) + +## Commands in this group + +| Command | Description | +| ------------------- | -------------------------------------- | +| `bl workspace list` | 列出所有业务空间 (List all workspaces) | + +## Command details + +### `bl workspace list` + +| Field | Value | +| --------------- | -------------------------------------- | +| **Name** | `workspace list` | +| **Description** | 列出所有业务空间 (List all workspaces) | +| **Usage** | `bl workspace list [flags]` | + +#### Options + +| Flag | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------------------------------------------------- | +| `--list ` | string | no | 返回数量限制 (Limit number of results) | +| `--region ` | string | no | API 区域,默认 cn-beijing (API region, default: cn-beijing) | + +#### Examples + +```bash +bl workspace list +``` + +```bash +bl workspace list --list 5 +``` + +```bash +bl workspace list --output json +```