zeyu.fz 1b568e8d37 test(knowledge): 补全知识库相关命令参数并增加E2E测试覆盖
- 添加知识库列表、创建、删除及文件删除等命令路由
- 新增知识块、分类、文件相关参数的端到端测试,覆盖文件列表、分类列表、块新增更新及分页等功能
- 增加对知识文档状态上传、等待、轮询参数的实时测试及自清理逻辑
- 新增知识文档列表分页、过滤参数的E2E测试覆盖
- 扩展知识文档上传命令的轮询间隔参数测试,验证无错误
- 补充知识库删除命令的轮询间隔参数传递测试
- 增强知识库列表的分页、名称过滤测试用例
- 丰富知识服务命令的参数全覆盖测试,包括创建、更新、部署、删除及多版本描述等功能
- 添加知识检索命令的重新排序指令与过时参数的实时测试覆盖
2026-08-11 13:17:34 +08:00
2026-07-31 18:53:37 +08:00
2026-08-05 19:35:05 +08:00
2026-08-05 17:37:14 +08:00
2026-08-05 19:35:05 +08:00
2026-08-05 19:35:05 +08:00
2026-05-28 18:37:07 +08:00
2026-05-28 18:37:07 +08:00
2026-08-07 17:15:26 +08:00
2026-08-07 17:15:26 +08:00
2026-07-23 15:31:57 +08:00

Aliyun Model Studio CLI

The official command-line interface for Aliyun Model Studio (DashScope) AI Platform

npm version Node.js TypeScript License

Aliyun Model Studio CLI Site · 中文文档 · API Documentation · Get API Key


Chat with Qwen, generate and edit images and videos, understand images, synthesize and recognize speech, call apps, manage memory, retrieve knowledge, search the web — every AI capability, one command away.

Built for AI Agents. Every command works as a structured tool call.

Features

  • Model generation — Full-modality generation across text, image, video, and speech, with editing and reference-based generation
  • Asset understanding — Parse and ask questions about images, documents, audio, and long videos
  • App orchestration — Call Managed Agents, agents, and workflows published on Aliyun Model Studio, wired to knowledge bases, memory, web search, and MCP tools
  • Training & deployment — Validate and upload datasets, fine-tune models, deploy dedicated models as endpoints
  • Account operations — Login, UI-based configuration, model marketplace, usage and quota, rate-limit increases, team seat management
  • Plan onboarding — Connect subscription plans such as Token Plan to the CLI and common coding agents in one step

Note: App orchestration, training & deployment, account operations, and plan onboarding are currently available only to China site (aliyun.com) account holders and are not yet supported for international / global site accounts.

Showcase 1: A Cinematic Short Film from One Sentence

Click to play the demo video

👆 Click the cover to play the full 2-minute demo

A complete 2-minute, 16:9 cinematic short film — produced end-to-end from a single natural-language sentence, with zero manual editing. This showcase demonstrates how an AI Agent can compose a multi-step creative pipeline by orchestrating three primitives:

  • Qwen Code — the agentic coding model that interprets the user's intent and drives the workflow
  • Aliyun Model Studio CLI — invokes HappyHorse 1.1, Aliyun Model Studio's text-/image-/reference-to-video generation model
  • spark-video Skill — handles scene decomposition, storyboarding, shot continuity, and final stitching

The single prompt

"Generate a roughly 2-minute video in Japanese cinematic style — a sweet, innocent first-love story about a high-school girl. The plot should be heart-fluttering enough to make viewers want to fall in love. Aspect ratio: 16:9."

Showcase 2: A Short-Film Director Managed Agent from One Sentence

Click to play the demo video

👆 Click the cover to play the full demo

One sentence builds a reusable cloud-side short-film director for storyboarding, storyboard image generation, and video creation:

  • Qwen Code — understands the requirement and generates the agent configuration
  • Aliyun Model Studio CLI — validates the configuration, previews the changes, and completes the deployment
  • Managed Agent — runs the director role along with its skills and tools in the cloud

The single prompt

"Build me a Managed Agent app that can produce short films — a director expert that generates videos and can also design the matching storyboards."

Installation

Agent install (recommended)

Send the following to your Agent — it will detect your environment, then install and verify the CLI for you:

Please read https://bailian.aliyun.com/cli/install.md and install the Aliyun Model Studio CLI for me

Manual install (npm)

npm install -g bailian-cli
npx skills add modelstudioai/cli --all -g

Requires Node.js >= 18.17.

Quick Start

Once installed, just describe your task to your AI Agent — no need to assemble commands by hand.

Scenario What to say to your Agent
Managed Agent "Create a Managed Agent that can generate short-film storyboards and videos."
Image & video generation "Generate an image of a cat in a spacesuit on Mars, then turn it into a video."
Usage & quota "Show my recent model usage, free-tier quota, and rate limits."
Model selection "Recommend a model for image understanding and customer support."
About Bailian CLI "Tell me what Bailian CLI can do for me, and suggest how to use it for my needs."

More examples and scenarios: Aliyun Model Studio CLI Site

Authentication

API Key

Required for most commands. Get your key from the DashScope Console.

bl auth login --api-key sk-xxxxx

Get or copy your Token Plan API key from the Token Plan subscription overview.

bl auth login --config token-plan --api-key sk-sp-xxxxx

Console Login (OAuth)

Required for console capability commands (model list, app list, MCP list, workspace, usage queries, rate-limit increases, direct console calls). Opens the Bailian console in your browser to sign in.

bl auth login --console

Alibaba Cloud OpenAPI AK/SK

Token Plan seat and member management requires an Alibaba Cloud AccessKey. Get yours from the RAM Console.

Recommended: create a RAM sub-account with minimum privileges instead of using the root account's AK/SK.

bl auth login --open-api --access-key-id LTAI5t... --access-key-secret ...

Configuration

# View current config
bl config show

# List all config profiles
bl config list

# Switch config profile
bl config use --name token-plan

Config file location: ~/.bailian/config.json

Update

bl update

Upgrades the CLI to the latest version and refreshes the installed Agent Skills. Release notes for every version live in CHANGELOG.md.

Contributing

Bug reports, feature requests, and PRs are welcome. See CONTRIBUTING.md for developer setup, repo layout, and the workflow for adding or changing commands.

Scan the QR code to join the Aliyun Model Studio CLI DingTalk user group for usage help, troubleshooting, bug reports, and tips from other users.

Aliyun Model Studio CLI DingTalk user group
Resource URL
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/?source_channel=cli_github
Get API Key https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/api-key
Get Token Plan API Key https://bailian.console.aliyun.com/cn-beijing?tab=plan#/efm/subscription/overview
Get AccessKey https://ram.console.aliyun.com/manage/ak
S
Description
bailian-cli: 阿里云百炼 / Aliyun Bailian / DashScope 资源管理与 bl CLI hub: 应用调用(bl app)、应用记忆、知识库检索、模型目录/模型列表、用量/额度/配额、免费额度、 工作空间、MCP 市场、pipeline、文件上传、console API、登录鉴权与配置、 Agent…; bailian-gen: 阿里云百炼图片/视频/语音生成与理解入口:用户要生图、画图、生成照片、生成图片、AI 绘画、海报、头像、插画、 文生图(text-to-image)、图生图、改图、修图、多图合成、生成视频、文生视频、图生视频、参考生视频、视频编辑、风格转换、…; bailian-protocol: 阿里云百炼 bl 家族共享执行协议(consent 确认、版本预检、鉴权/安装、错误上报、本地文件与输出约定)。 不是面向用户意图的业务入口;当任一 bailian-* 业务 skill(bailian-cli / bailian-gen / bailian-finetune /…; bailian-finetune: 阿里云百炼模型精调…
Readme Apache-2.0 68 MiB
Languages
TypeScript 93.4%
JavaScript 6.4%
CSS 0.2%