modelstudioai/cli

Official Model Studio CLI(阿里云百炼 CLI)built for AI Agent frameworks, exposing models, search, multimodal, and workflow capabilities as structured tool calls.

What it solves

Developers and AI agents often need to interact with many separate AI services—text generation, image/video creation, speech, document understanding, knowledge retrieval, fine-tuning, and more. Manually assembling API calls for each is tedious and error-prone. This CLI provides a single, scriptable command-line interface for the Aliyun Model Studio (DashScope) AI platform, letting you perform all these tasks from the terminal, and it is specifically designed so every command works as a structured tool call that AI agents can invoke.

How it works

The CLI (installed as bailian-cli, command bl) is a Node.js (>=18.17) TypeScript program. You can install it via npm, or with curl/powershell scripts that also set up Agent Skills. It supports two main authentications: OAuth console login (for account operations, usage, and console-backed commands) and API keys (including Token Plan subscription keys). After login, you run commands that map to platform capabilities:

  • Generation – text, image, video, and speech, with editing and reference-based generation.
  • Understanding – parse and ask questions about images, documents, audio, and long videos.
  • App orchestration – call and manage Managed Agents, workflows, and knowledge bases; create/update/publish/delete agents and edit workflow canvases.
  • Knowledge & RAG – create knowledge bases, import documents, retrieve from them, and manage them (with billing caveats).
  • Training & deployment – validate/upload datasets, fine-tune models, deploy dedicated endpoints.
  • Batch inference – convert CSV to JSONL, create/follow/download async tasks, or run a synchronous batch chat.
  • ParseX – submit documents or media for parsing and structured extraction using a JSON schema.
  • Account & configuration – login, switch profiles, set language, update the CLI, and manage rate limits/usage.

It also integrates with coding agents (Codex, Claude Code, Cursor, Qoder, QwenWork, Qwen Code, Gemini CLI, Pi) via native MCP setup, so you can register Bailian MCP servers and let those tools call the CLI automatically.

Who it’s for

This is for developers, data scientists, and AI engineers who work with Aliyun Model Studio and want a command-line workflow, particularly for automating tasks or building AI agents that need structured tool calls. It’s also useful for teams who need to manage agents, knowledge bases, datasets, and deployments from scripts or CI/CD. Note that some features—app orchestration, native MCP setup, training & deployment, account operations, and plan onboarding—are currently available only to China site (aliyun.com) account holders; international/global sites are not yet supported for those.

Highlights

  • Full-modality generation: 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: create, update, publish, copy, and delete Managed Agents and workflows, wired to knowledge bases, memory, web search, and MCP tools.
  • Native MCP setup for Codex, Claude Code, Cursor, Qoder, QwenWork, Qwen Code, Gemini CLI, and Pi.
  • Training & deployment: dataset validation/upload, fine-tuning, and deploying dedicated model endpoints.
  • Batch inference: CSV/JSONL conversion, asynchronous task creation/following/downloading, and synchronous batch chat.
  • Knowledge base management with RAG capabilities and billing-aware operations.
  • ParseX for structured document/media extraction via JSON schema.
  • Multiple installation methods (npm, macOS/Linux, Windows) and agent-guided installation.
  • Supports console OAuth login and API keys, with profile configuration and language switching.

Related

  • Project
  • Project
  • Project
  • Project
  • Project