bailian-cli 1.4.2 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -38,6 +38,7 @@ Equip your AI Agent out-of-the-box with these capabilities, composable across co
38
38
  - **MCP integration** — Orchestrate Bailian MCP servers: list services, inspect tools, and invoke any tool directly from the terminal
39
39
  - **Web search** — Real-time internet retrieval for up-to-date, accurate answers
40
40
  - **Model recommendation** — Describe your scenario and get best-fit model suggestions; supports scoped search, model comparison, and alternative discovery
41
+ - **Fine-tuning & deployment** — Upload datasets, create SFT/LoRA/DPO/CPT jobs (`finetune create`), probe job status non-blockingly (`finetune watch`), query per-model training capability (`finetune capability`), and deploy trained models as endpoints (`deploy create`)
41
42
  - **Console capabilities** — Browse Bailian apps (`app list`), check free-tier quota (`usage free`), view model usage statistics (`usage stats`), manage workspaces (`workspace list`), and manage rate limits (`quota list/request/check/history`)
42
43
  - **Local file auto-upload** — Every URL parameter accepts a local path; uploaded to free temp storage with 48-hour validity
43
44
 
@@ -111,22 +112,30 @@ bl advisor recommend --message "qwen-max vs deepseek-v3 for code generation"
111
112
  # Browser login (required for console capability commands)
112
113
  bl auth login --console
113
114
 
115
+ # Fine-tune & deploy — a one-shot train-to-serve workflow
116
+ bl dataset upload --file ./train.jsonl # Upload a .jsonl dataset (validated first)
117
+ bl finetune create --model qwen3-8b --datasets ./train.jsonl --training-type sft-lora # Local paths auto-upload
118
+ bl finetune watch --job-id ft-xxx --output json # Non-blocking status probe (exit 0/1/3 = done/failed/running)
119
+ bl finetune capability --model qwen3-8b # Which training types a model supports
120
+ bl deploy create --model qwen3-8b --name my-svc --plan mu # Deploy the trained model as an endpoint
121
+
114
122
  # Browse apps / free-tier quota / usage statistics / workspaces
115
123
  bl app list
116
- bl usage free --model qwen3-max
117
- bl usage free --expiring 30 # Quotas expiring within 30 days
118
- bl usage free --sort remaining # Sort by remaining % ascending
119
- bl usage stats --workspace-id <id> # Usage overview for a workspace
120
- bl usage stats --model qwen-turbo --workspace-id <id> # Per-model usage
124
+ bl usage free # Free-tier quota across models (add --model/--expiring/--sort)
125
+ bl usage stats --workspace-id <id> # Model usage statistics (add --model for per-model)
121
126
  bl workspace list # List all workspaces
122
127
 
123
- # Rate limit management
124
- bl quota list # View RPM/TPM limits for all models
125
- bl quota list --model qwen3.6-plus # View limits for a specific model
126
- bl quota check # Current usage vs rate limits
127
- bl quota check --model qwen3.6-plus --period 5 # Check usage over last 5 minutes
128
+ # Rate limit management (list / check / request / history)
129
+ bl quota list # View RPM/TPM limits (add --model to filter)
130
+ bl quota check # Current usage vs rate limits (add --model/--period)
128
131
  bl quota request --model qwen3.6-plus --tpm 6000000 # Request a temporary TPM increase
129
- bl quota history # View quota change history
132
+ bl quota history # View quota-change history
133
+
134
+ # Token Plan team management (requires AK/SK, see auth below)
135
+ bl token-plan list-seats # View subscription seat details
136
+ bl token-plan add-member --account-name dev --org-id org_xxx
137
+ bl token-plan assign-seats --workspace-id ws_xxx --seat-type standard --account-id acc_xxx
138
+ bl token-plan create-key --account-id acc_xxx --workspace-id ws_xxx
130
139
  ```
131
140
 
132
141
  > More examples and scenarios: [Aliyun Model Studio CLI Site](https://bailian.console.aliyun.com/cli?source_channel=cli_github&)
@@ -156,9 +165,9 @@ Required for console capability commands (`app list`, `usage free`, `usage stats
156
165
  bl auth login --console
157
166
  ```
158
167
 
159
- ### Alibaba Cloud AK/SK (Knowledge Base only)
168
+ ### Alibaba Cloud AK/SK (Knowledge Base & Token Plan)
160
169
 
161
- Required for `knowledge retrieve`. Get your AccessKey from [RAM Console](https://ram.console.aliyun.com/manage/ak).
170
+ Required for `knowledge retrieve` and the `token-plan` command group. Get your AccessKey from [RAM Console](https://ram.console.aliyun.com/manage/ak).
162
171
 
163
172
  > Recommended: create a RAM sub-account with minimum privileges instead of using the root account's AK/SK.
164
173
 
package/README.zh.md CHANGED
@@ -38,6 +38,7 @@ _专为 AI Agent 打造,每个命令均可作为结构化工具调用。_
38
38
  - **MCP 集成** — 统一调度百炼 MCP 服务:列出服务、查看工具、直接在终端调用任意工具
39
39
  - **联网搜索** — 实时互联网信息检索,提升回答准确性及时效性
40
40
  - **模型推荐** — 描述你的场景,智能推荐最适合的模型;支持限定范围搜索、模型对比和替代发现
41
+ - **微调与部署** — 上传数据集、创建 SFT/LoRA/DPO/CPT 调优任务(`finetune create`)、非阻塞探测任务状态(`finetune watch`)、按模型查训练能力(`finetune capability`),并把训练好的模型部署为推理服务(`deploy create`)
41
42
  - **控制台能力** — 浏览百炼应用(`app list`),查询模型免费额度(`usage free`),查看模型用量统计(`usage stats`),管理业务空间(`workspace list`),管理限流与提额(`quota list/request/check/history`)
42
43
  - **本地文件自动上传** — 所有 URL 参数同时支持本地路径,免费临时存储 48 小时
43
44
 
@@ -82,7 +83,10 @@ npx skills add modelstudioai/cli --all -g
82
83
  ## 快速开始
83
84
 
84
85
  ```bash
85
- # 认证
86
+ # 认证(推荐浏览器登录)
87
+ bl auth login --console
88
+
89
+ # 或使用 API key 认证
86
90
  bl auth login --api-key sk-xxxxx
87
91
 
88
92
  # 和通义千问对话
@@ -106,22 +110,30 @@ bl advisor recommend --message "qwen-max 和 deepseek-v3 哪个更适合做代
106
110
  # 浏览器登录(控制台能力相关命令需要)
107
111
  bl auth login --console
108
112
 
113
+ # 微调与部署 — 从训练到服务的一站式流程
114
+ bl dataset upload --file ./train.jsonl # 上传 .jsonl 数据集(先校验)
115
+ bl finetune create --model qwen3-8b --datasets ./train.jsonl --training-type sft-lora # 本地路径自动上传
116
+ bl finetune watch --job-id ft-xxx --output json # 非阻塞状态探测(退出码 0/1/3 = 成功/失败/进行中)
117
+ bl finetune capability --model qwen3-8b # 查询模型支持哪些训练方式
118
+ bl deploy create --model qwen3-8b --name my-svc --plan mu # 把训练好的模型部署为推理服务
119
+
109
120
  # 浏览应用 / 免费额度 / 用量统计 / 业务空间
110
121
  bl app list
111
- bl usage free --model qwen3-max
112
- bl usage free --expiring 30 # 30 天内过期的额度
113
- bl usage free --sort remaining # 按剩余百分比升序排列
114
- bl usage stats --workspace-id <id> # 指定空间的用量概览
115
- bl usage stats --model qwen-turbo --workspace-id <id> # 指定模型用量
122
+ bl usage free # 各模型免费额度(可加 --model/--expiring/--sort)
123
+ bl usage stats --workspace-id <id> # 模型用量统计(加 --model 查单模型)
116
124
  bl workspace list # 列出所有业务空间
117
125
 
118
- # 限流管理与提额
119
- bl quota list # 查看所有模型的 RPM/TPM 限额
120
- bl quota list --model qwen3.6-plus # 查看指定模型限额
121
- bl quota check # 查看当前用量 vs 限流阈值
122
- bl quota check --model qwen3.6-plus --period 5 # 查看最近 5 分钟用量
126
+ # 限流管理与提额(list / check / request / history)
127
+ bl quota list # 查看 RPM/TPM 限额(加 --model 过滤)
128
+ bl quota check # 当前用量 vs 限流阈值(加 --model/--period)
123
129
  bl quota request --model qwen3.6-plus --tpm 6000000 # 申请临时 TPM 提额
124
130
  bl quota history # 查看提额历史记录
131
+
132
+ # Token Plan 团队版管理(需 AK/SK,见下方认证说明)
133
+ bl token-plan list-seats # 查看订阅席位明细
134
+ bl token-plan add-member --account-name dev --org-id org_xxx
135
+ bl token-plan assign-seats --workspace-id ws_xxx --seat-type standard --account-id acc_xxx
136
+ bl token-plan create-key --account-id acc_xxx --workspace-id ws_xxx
125
137
  ```
126
138
 
127
139
  > 更多案例与使用场景:[阿里云百炼 CLI 官方主页](https://bailian.console.aliyun.com/cli?source_channel=cli_github&)
@@ -151,9 +163,9 @@ bl text chat --api-key sk-xxxxx --message "你好"
151
163
  bl auth login --console
152
164
  ```
153
165
 
154
- ### 阿里云 AK/SK(仅知识库检索)
166
+ ### 阿里云 AK/SK(知识库检索与 Token Plan)
155
167
 
156
- `knowledge retrieve` 命令需要阿里云 AccessKey。前往 [RAM 控制台](https://ram.console.aliyun.com/manage/ak) 获取。
168
+ `knowledge retrieve` `token-plan` 命令组需要阿里云 AccessKey。前往 [RAM 控制台](https://ram.console.aliyun.com/manage/ak) 获取。
157
169
 
158
170
  > 建议:创建 RAM 子账号并授予最小权限,避免使用主账号 AK/SK。
159
171