bailian-cli

>-

Installs18.6Kdeduplicated source total
8-week historyLatest recorded total per week
GitHub stars—source repository
UpdatedOct 05, 2026normalized snapshot

SKILL.md

Aliyun Model Studio CLI (bl)

CRITICAL — Before executing, MUST read the shared protocol in ../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 hub reference/ (apps, knowledge, usage, auth, config, …). Shared protocol → ../bailian-protocol/SKILL.md (install the full family with bl skill init). Soft hand-offs by skill name (Read if installed; else bl … --help / prompt bl skill init): bailian-gen (media) · bailian-finetune (training) · bailian-managed-agent (agents.yaml IaC) · 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-web-search → web search routing (hub still owns reference/search.md flags; must route via this skill before bl search web)

Auto-generated from the CLI source at build time (pnpm --filter bailian-cli run generate:reference). Before running an unfamiliar command:

  1. Open the owning skill's reference/index.md (if that skill is installed) → Quick index (or By group) to locate the command.
  2. Open the matching reference/<group>.md for Usage, Flags, and Examples.
  3. Run bl <command> --help for 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, soft hand-off to the domain skill.

User intentCommandNotes
Explicit Bailian model chat / text executionbl text chatDefault qwen3.8-max
Bailian agent / workflowbl app callNeeds --app-id
Find app by namebl app list then bl app callConsole auth
Bailian app memory CRUD (not host-agent memory)bl memory *reference/memory.md
Bailian knowledge base RAGbl knowledge search / chatAPI key + agent/workspace IDs
Upload a file as a step of a Bailian workflowbl file uploadWhen you need oss:// URL explicitly; not for generic hosting
Bailian model selection / recommendationbl advisor recommendIntent → candidate recall → LLM ranking
Bailian model catalog / pricing / paramsbl model listConsole auth; --model <family> for detail, --enrich for input params
Install / list / update / remove registry skillsbl skill add / list / update / removeBailian skill registry; see reference/skill.md
Bailian MCP marketplace discovery / callbl mcp list / tools / call—
Bailian pipeline workflow (a step in a bl flow)bl pipeline run / validateJSON/YAML workflow definitions
Bailian rate limits / quotabl quota list / check / requestConsole auth; class 2 — ask which product first if unnamed
Bailian free tier / usage statsbl usage free / stats / freetierConsole auth; class 2 — ask which product first if unnamed
Bailian Token Plan quota usagebl usage token-planConsole auth; class 2 — ask which product first if unnamed
Bailian Coding Plan quota usagebl usage coding-planConsole auth; class 2 — ask which product first if unnamed
Console API (advanced)bl console callConsole auth
Bailian workspace listingbl workspace listConsole auth
Switch CLI Help / Quick Start languagebl config set --key language --value zh-CNUse en-US to switch back; follows the active config profile
Image / video / speech / omni / vision→ skill bailian-genFallback: bl image|video|speech|omni|vision --help
Dataset / fine-tune / deploy→ skill bailian-finetuneFallback: bl dataset|finetune|deploy --help
agents.yaml IaC / managed-agent sessions→ skill bailian-managed-agentFallback: bl managed-agent --help; apply/destroy also require plan
Web search (model-aware routing)→ skill bailian-web-searchToken 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 qwen

More examples per command: see reference/<group>.md (e.g. reference/text.md, reference/app.md).


Agent workflows

Find and call an app

  1. bl app list --name <keyword> --output json
  2. Pick code (app ID); handle user_prompt_params via --biz-params '{"key":"value"}'
  3. 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 from bailian-protocol). Fine-tuning / datasets / deployments → bailian-finetune. agents.yaml IaC → bailian-managed-agent. Soft hand-off: Read sibling skill if installed; else bl … --help or prompt bl skill init. Image understanding the host agent can do → host-first; use bl vision / bl omni only 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 through bl.
  • Answer ordinary reasoning, coding, writing, translation, summarization, and generic research with the host agent's native capabilities; do not bounce them through bl text chat or bl 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 quota only 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 upload and bl pipeline run are steps inside a Bailian workflow; do not use them to capture generic "upload this file" or "run a pipeline" requests.
  • For risk: high commands or requires_confirmation, follow the shared protocol; never add --yes automatically.
  • bl managed-agent apply / destroy have an additional domain rule: run plan first and show the diff before asking for confirmation.
  • When a matched bl command accepts a file URL, pass local paths directly; never require the user to host the file first.
  • Console login → always --console-site domestic|international; see ../bailian-protocol/assets/setup.md.