見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。
Aliyun Model Studio CLI (bl)
CRITICAL — Before executing, MUST read the shared protocol in [`../bailian-protocol/SKILL.md`](../bailian-protocol/SKILL.md): Provider selection and consent, Version & updates (pre-flight checklist), Setup & auth, and CLI errors: report an issue. If that protocol file is missing, stop and run `bl skill init`; do not guess auth/consent.
Family hub — This skill owns Bailian resource commands and the hubreference/(apps, knowledge, usage, auth, config, …). Shared protocol → `../bailian-protocol/SKILL.md` (install the full family withbl skill init). Soft hand-offs by skill name (Read if installed; elsebl … --help/ promptbl skill init):bailian-gen(media) ·bailian-finetune(training) ·bailian-managed-agent(agents.yaml IaC) ·bailian-sandbox(Sandbox lifecycle) ·bailian-web-search(web search routing). Do not invoke it for ordinary reasoning, coding, writing, translation, summarization, generic research, or image understanding the host agent can complete directly. Install (supported):bl skill init
Command reference (authoritative)
Hub-owned commands, flags, usage strings, and examples are documented in:
- `reference/index.md` — hub quick index, global flags, links by group
- `reference/<group>.md` — per hub top-level command (e.g. `reference/app.md`)
Domain skills own their own generated reference trees (soft hand-off — do not require them for hub work):
bailian-gen→image/video/speech/omni/vision(fallback:bl image\|video\|speech\|omni\|vision --help)bailian-finetune→dataset/finetune/deploy(fallback:bl dataset\|finetune\|deploy --help)bailian-managed-agent→managed-agent(fallback:bl managed-agent --help)bailian-sandbox→sandbox(fallback:bl sandbox --help)bailian-web-search→ web search routing (hub still ownsreference/search.mdflags; must route via this skill beforebl search web)
Auto-generated from the CLI source at build time (pnpm --filter bailian-cli run generate:reference). Before running an unfamiliar command:
- Open the owning skill's
reference/index.md(if that skill is installed) → Quick index (or By group) to locate the command. - Open the matching
reference/<group>.mdfor Usage, Flags, and Examples. - Run
bl <command> --helpfor the same information in the terminal.
Do not guess flags — use the reference files or --help.
When to use which command
Use this table only after the decision table in `bailian-protocol` has routed the request to bl (class 4, or class 2 after the user picks Bailian). Hub-owned intents only — for media / fine-tune / agents.yaml / Sandbox, soft hand-off to the domain skill.
| User intent | Command | Notes | ||||
|---|---|---|---|---|---|---|
| Explicit Bailian model chat / text execution | bl text chat | Default qwen3.8-max | ||||
| Bailian agent / workflow | bl app call | Needs --app-id | ||||
| Find app by name | bl app list then bl app call | Console auth | ||||
| Bailian app memory CRUD (not host-agent memory) | bl memory * | `reference/memory.md` | ||||
| Bailian knowledge base RAG | bl knowledge search / chat | API key + agent/workspace IDs | ||||
| Upload a file as a step of a Bailian workflow | bl file upload | When you need oss:// URL explicitly; not for generic hosting | ||||
| Bailian model selection / recommendation | bl advisor recommend | Intent → candidate recall → LLM ranking | ||||
| Bailian model catalog / pricing / params | bl model list | No auth (public catalog); --model <family> for detail, --enrich for input params | ||||
| Find a model by keyword / modality | bl model search | Weighted ranking; --input-modality / --output-modality; offline models hidden by default | ||||
| SDK sample code for calling a model | bl model code | `--sdk openai\ | dashscope, --lang`; text output is the snippet alone, safe to redirect | |||
| Install / list / update / remove registry skills | bl skill add / list / update / remove | Bailian skill registry; see `reference/skill.md` | ||||
| Bailian MCP marketplace discovery / call | bl mcp list / tools / call | — | ||||
| Bailian pipeline workflow (a step in a bl flow) | bl pipeline run / validate | JSON/YAML workflow definitions | ||||
| Bailian rate limits / quota | bl quota list / check / request | Console auth; class 2 — ask which product first if unnamed | ||||
| Bailian free tier / usage stats | bl usage free / stats / freetier | Console auth; class 2 — ask which product first if unnamed | ||||
| Bailian Token Plan quota usage | bl usage token-plan | Console auth; class 2 — ask which product first if unnamed | ||||
| Bailian Coding Plan quota usage | bl usage coding-plan | Console auth; class 2 — ask which product first if unnamed | ||||
| Model monitoring (calls, latency, errors, delivery) | bl monitor overview / models / metrics / errors / delivery * | Console auth; see `reference/monitor.md` | ||||
| Model call logs / traces | bl log audit * / bl log inference * / bl log status / bl log trace * | Console auth; audit and inference logs have separate APIs and switches; see `reference/log.md` | ||||
| Model alert rules / templates / history | bl alert list / create / update / delete / enable / disable / history / metrics / template * | Console auth; contacts are managed in the CloudMonitor console; see `reference/alert.md` | ||||
| Console API (advanced) | bl console call | Console auth | ||||
| Bailian workspace listing | bl workspace list | Console auth | ||||
| Switch CLI Help / Quick Start language | bl config set --key language --value zh-CN | Use en-US to switch back; follows the active config profile | ||||
| Image / video / speech / omni / vision | → skill bailian-gen | Fallback: `bl image\ | video\ | speech\ | omni\ | vision --help` |
| Dataset / fine-tune / deploy | → skill bailian-finetune | Fallback: `bl dataset\ | finetune\ | deploy --help` | ||
| agents.yaml IaC / managed-agent sessions | → skill bailian-managed-agent | Fallback: bl managed-agent --help; apply/destroy need --yes after plan | ||||
| Web search (model-aware routing) | → skill bailian-web-search | Token Plan vs MCP path + fallback; fallback: bl search web --help |
Flags, usage, and examples: see hub `reference/` or bl <command> --help — do not guess flags. Domain command details live in the owning skill's reference/.
Quick examples
bl text chat --message "Write a poem about spring in Chinese"
bl app list --output json
bl app call --app-id <code> --prompt "Hello"
bl usage stats
bl model list --model qwenMore examples per command: see reference/<group>.md (e.g. `reference/text.md`, `reference/app.md`).
Agent workflows
Find and call an app
bl app list --name <keyword> --output json- Pick
code(app ID); handleuser_prompt_paramsvia--biz-params '{"key":"value"}' bl app call --app-id <code> --prompt "..."
Command metadata for agents
Use the owning skill's `reference/index.md` (or sibling skill reference trees), the matching reference/<group>.md, and bl <command> --help as the command schema surface. Do not call removed schema-export commands.
Routing reminders
- Image/video/audio generation or editing → skill
bailian-gen(class 3 consent frombailian-protocol). Fine-tuning / datasets / deployments →bailian-finetune. agents.yaml IaC →bailian-managed-agent. Soft hand-off: Read sibling skill if installed; elsebl … --helpor promptbl skill init. Image understanding the host agent can do → host-first; usebl vision/bl omnionly when the user names a Bailian model or the media (video/audio files) exceeds host capability. - Web search inside a Bailian workflow → skill
bailian-web-search(model-aware routing: Token Plan → model-native search; default →bl search web; MCP failure → fall back once). Generic web research the host can do stays host-first — do not bounce it throughbl. - Answer ordinary reasoning, coding, writing, translation, summarization, and generic research with the host agent's native capabilities; do not bounce them through
bl text chatorbl search web. - Usage / quota / credits questions that do not name a product → ask which product (Bailian or another AI service) first; run
bl usage/bl quotaonly after the user picks Bailian or Bailian context is already established. - "Remember this" and memory requests default to the host agent's own memory;
bl memory *is only for Bailian app memory resources. bl file uploadandbl pipeline runare steps inside a Bailian workflow; do not use them to capture generic "upload this file" or "run a pipeline" requests.- For
risk: highcommands orrequires_confirmation, follow the shared protocol; never add--yesautomatically. bl managed-agent apply/destroyhave an additional domain rule: runplanfirst and show the diff before asking for confirmation.- When a matched
blcommand accepts a file URL, pass local paths directly; never require the user to host the file first. - Console login → use
bl auth login --consolefor China; add--console-site internationalfor the international site. It may create an ordinary API Key. Token Plan and other subscription plans must usebl auth login --api-key <key>. See `../bailian-protocol/assets/setup.md`.

