bailian-cli 1.0.0-beta.0 → 1.0.1
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 +128 -0
- package/dist/bailian.mjs +141 -174
- package/package.json +7 -7
- package/scripts/postinstall.js +36 -104
- package/skill/SKILL.md +111 -822
- package/skill/reference/app.md +99 -0
- package/skill/reference/auth.md +96 -0
- package/skill/reference/config.md +91 -0
- package/skill/reference/console.md +40 -0
- package/skill/reference/file.md +48 -0
- package/skill/reference/image.md +116 -0
- package/skill/reference/index.md +95 -0
- package/skill/reference/knowledge.md +45 -0
- package/skill/reference/memory.md +195 -0
- package/skill/reference/model.md +51 -0
- package/skill/reference/omni.md +74 -0
- package/skill/reference/search.md +48 -0
- package/skill/reference/speech.md +141 -0
- package/skill/reference/text.md +65 -0
- package/skill/reference/update.md +32 -0
- package/skill/reference/usage.md +43 -0
- package/skill/reference/video.md +207 -0
- package/skill/reference/vision.md +53 -0
- package/scripts/preuninstall.js +0 -69
- package/skill/BAILIAN_API_DOC_REFER.md +0 -1008
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://img.alicdn.com/imgextra/i1/O1CN01RSQFUD1jN5IBzHORt_!!6000000004535-2-tps-2440-521.png" alt="Aliyun Model Studio CLI" width="420" />
|
|
4
|
+
|
|
5
|
+
# >\_ Aliyun Model Studio CLI
|
|
6
|
+
|
|
7
|
+
**The official command-line interface for Aliyun Model Studio (DashScope) AI Platform**
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/bailian-cli)
|
|
10
|
+
[](https://nodejs.org)
|
|
11
|
+
[](https://www.typescriptlang.org)
|
|
12
|
+
[](LICENSE)
|
|
13
|
+
|
|
14
|
+
[Aliyun Model Studio CLI Site](https://bailian.console.aliyun.com/cli) · [中文文档](README_CN.md) · [API Documentation](https://help.aliyun.com/zh/model-studio/) · [Get API Key](https://bailian.console.aliyun.com/cn-beijing/?tab=app#/api-key)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
_Chat with Qwen, generate images & videos, understand images, call agents,_
|
|
19
|
+
_manage memory, search the web — all from your terminal._
|
|
20
|
+
|
|
21
|
+
_Built for AI Agents. Every command works as a structured tool call._
|
|
22
|
+
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
## Features
|
|
26
|
+
|
|
27
|
+
Equip your AI Agent out-of-the-box with these capabilities, composable across complex tasks:
|
|
28
|
+
|
|
29
|
+
- **Text chat** — Qwen3.6-plus: major gains in agentic coding, frontend coding, and vibe coding
|
|
30
|
+
- **Multimodal (Omni)** — Full omni-modal support across text + image + audio + video
|
|
31
|
+
- **Image generation & editing** — Qwen-Image 2.0: pro text rendering, photorealism, strong semantic adherence, multi-image composition
|
|
32
|
+
- **Video generation & editing** — HappyHorse-1.0 series: text-/image-/reference-to-video and natural-language video editing (up to 9-image reference)
|
|
33
|
+
- **Speech synthesis & recognition** — CosyVoice streaming TTS, voice cloning from 5–20s samples; FunAudio-ASR covers 30 languages including 7 Chinese dialects and 20+ Mandarin accents
|
|
34
|
+
- **Image & video understanding** — Qwen-VL: long-form video analysis, chart/document parsing, visual reasoning, multilingual OCR
|
|
35
|
+
- **Knowledge base & memory** — Multimodal RAG retrieval and cross-session memory for personalized, coherent dialogue
|
|
36
|
+
- **App calls** — Invoke agents and workflows already published on Aliyun Model Studio
|
|
37
|
+
- **Web search** — Real-time internet retrieval for up-to-date, accurate answers
|
|
38
|
+
- **Local file auto-upload** — Every URL parameter accepts a local path; uploaded to free temp storage with 48-hour validity
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<img src="https://img.alicdn.com/imgextra/i1/O1CN01Df2LiL1IcCkXJROYz_!!6000000000913-2-tps-759-426.png" alt="bl --help" width="720" />
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install -g bailian-cli
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
> Requires Node.js >= 22.12.
|
|
51
|
+
|
|
52
|
+
## Quick Start
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Authenticate
|
|
56
|
+
bl auth login --api-key sk-xxxxx
|
|
57
|
+
|
|
58
|
+
# Chat with Qwen
|
|
59
|
+
bl text chat --message "What is DashScope?"
|
|
60
|
+
|
|
61
|
+
# Multimodal chat (text + image + audio + video)
|
|
62
|
+
bl omni --message "Describe this image" --image ./photo.jpg
|
|
63
|
+
|
|
64
|
+
# Generate an image
|
|
65
|
+
bl image generate --prompt "A cat in a spacesuit" --out-dir ./images/
|
|
66
|
+
|
|
67
|
+
# Generate a video from local image
|
|
68
|
+
bl video generate --image ./cat.png --prompt "Make the cat move" --download cat.mp4
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
> More examples and scenarios: [Aliyun Model Studio CLI Site](https://bailian.console.aliyun.com/cli)
|
|
72
|
+
|
|
73
|
+
## Authentication
|
|
74
|
+
|
|
75
|
+
### DashScope API Key
|
|
76
|
+
|
|
77
|
+
Required for most commands. Get your key from the [DashScope Console](https://bailian.console.aliyun.com/cn-beijing/?tab=app#/api-key).
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Option 1: Environment variable
|
|
81
|
+
export DASHSCOPE_API_KEY=sk-xxxxx
|
|
82
|
+
|
|
83
|
+
# Option 2: Login command (persisted to ~/.bailian/config.json)
|
|
84
|
+
bl auth login --api-key sk-xxxxx
|
|
85
|
+
|
|
86
|
+
# Option 3: Per-command flag
|
|
87
|
+
bl text chat --api-key sk-xxxxx --message "Hello"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Alibaba Cloud AK/SK (Knowledge Base only)
|
|
91
|
+
|
|
92
|
+
Required for `knowledge retrieve`. Get your AccessKey from [RAM Console](https://ram.console.aliyun.com/manage/ak).
|
|
93
|
+
|
|
94
|
+
> Recommended: create a RAM sub-account with minimum privileges instead of using the root account's AK/SK.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
export ALIBABA_CLOUD_ACCESS_KEY_ID=LTAI5t...
|
|
98
|
+
export ALIBABA_CLOUD_ACCESS_KEY_SECRET=...
|
|
99
|
+
export BAILIAN_WORKSPACE_ID=ws-...
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Configuration
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# View current config
|
|
106
|
+
bl config show
|
|
107
|
+
|
|
108
|
+
# Set defaults
|
|
109
|
+
bl config set --key region --value us
|
|
110
|
+
bl config set --key default_text_model --value qwen-turbo
|
|
111
|
+
bl config set --key timeout --value 600
|
|
112
|
+
|
|
113
|
+
# Self-update to latest version
|
|
114
|
+
bl update
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Config file location: `~/.bailian/config.json`
|
|
118
|
+
|
|
119
|
+
## Links
|
|
120
|
+
|
|
121
|
+
| Resource | URL |
|
|
122
|
+
| :--------------------------- | :-------------------------------------------------------------- |
|
|
123
|
+
| Aliyun Model Studio CLI Site | https://bailian.console.aliyun.com/cli |
|
|
124
|
+
| DashScope API Docs | https://help.aliyun.com/zh/model-studio/ |
|
|
125
|
+
| Qwen Model List | https://help.aliyun.com/zh/model-studio/getting-started/models |
|
|
126
|
+
| Aliyun Model Studio Console | https://bailian.console.aliyun.com/ |
|
|
127
|
+
| Get API Key | https://bailian.console.aliyun.com/cn-beijing/?tab=app#/api-key |
|
|
128
|
+
| Get AccessKey | https://ram.console.aliyun.com/manage/ak |
|