Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ body:
attributes:
label: Node version
description: "Output of node --version"
placeholder: "v22.12.0"
placeholder: "v18.17.0"
validations:
required: true

Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Developer guide for `bailian-cli` — the official CLI for Aliyun Model Studio (

## Prerequisites

- Node.js ≥ 22.12
- Node.js ≥ 22.12 (required for developing this repo)
- End users installing the published CLI only need Node.js >= 18.17
- pnpm 10.33.2 (`npm i -g pnpm@10.33.2`)
- A DashScope API key for running e2e tests

Expand Down
5 changes: 3 additions & 2 deletions CONTRIBUTING.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

## 环境要求

- Node.js ≥ 22.12
- pnpm 10.33.2(`npm i -g pnpm@10.33.2`)
- 参与本仓库开发:Node.js ≥ 22.12
- 仅安装/使用已发布的 CLI:Node.js >= 18.17
- pnpm 10.33.2(`npm i -g pnpm@10.33.2`)
- 跑 e2e 需要一个百炼 API Key

## 仓库结构
Expand Down
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**原则**:先执行检查;若 **Node / 包管理器 / 网络** 任一不满足下文要求,Agent 应 **在本机终端内主动完成安装或配置**(例如升级 Node、切换镜像、配置 `npm` 代理等),再继续 `bailian-cli` 安装。仅在无权限或环境无法自动化时,再向用户说明原因并请其配合。

1. **Node.js**
- 要求 **≥ 22.12.0**,执行 `node -v` 确认。
- 要求 **≥ 18.17.0**,执行 `node -v` 确认。
- 未安装或版本不足:由 Agent 自行安装或升级 Node。

2. **npm**(**唯一**允许的包管理器)
Expand Down Expand Up @@ -119,7 +119,7 @@ bl auth status --output json
| 现象 | 可能原因 | 建议动作 |
| ----------------------- | -------------------- | --------------------------------------------------------------- |
| `bl: command not found` | 全局 bin 不在 PATH | 检查 `npm prefix -g` 与 PATH |
| 安装报错 engines | Node 版本过低 | 升级到 ≥ 22.12 |
| 安装报错 engines | Node 版本过低 | 升级到 ≥ 18.17 |
| 401 / 鉴权失败 | 未 login 或 Key 无效 | 按 Key 类型重新执行普通或 Token Plan 登录命令 |
| 企业网络无法访问 npm | 代理 / 镜像 | 配置 registry 或代理后再装 |
| 本机只有 pnpm、没有 npm | Agent 误用 pnpm 安装 | 先装/修好 **npm**,再用 `npm install -g bailian-cli`;勿用 pnpm |
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**The official command-line interface for Aliyun Model Studio (DashScope) AI Platform**

[![npm version](https://img.shields.io/npm/v/bailian-cli?color=0969da&label=npm)](https://www.npmjs.com/package/bailian-cli)
[![Node.js](https://img.shields.io/badge/node-%3E%3D22.12-brightgreen)](https://nodejs.org)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.17-brightgreen)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)

Expand Down Expand Up @@ -81,7 +81,7 @@ npm install -g bailian-cli
npx skills add modelstudioai/cli --all -g
```

> Requires Node.js >= 22.12.
> Requires Node.js >= 18.17.

## Quick Start

Expand Down
4 changes: 2 additions & 2 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**阿里云百炼 (DashScope) AI 平台命令行工具**

[![npm version](https://img.shields.io/npm/v/bailian-cli?color=0969da&label=npm)](https://www.npmjs.com/package/bailian-cli)
[![Node.js](https://img.shields.io/badge/node-%3E%3D22.12-brightgreen)](https://nodejs.org)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.17-brightgreen)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)

Expand Down Expand Up @@ -79,7 +79,7 @@ npm install -g bailian-cli
npx skills add modelstudioai/cli --all -g
```

> 需要预先安装 Node.js >= 22.12
> 需要预先安装 Node.js >= 18.17

## 快速开始

Expand Down
2 changes: 1 addition & 1 deletion docs/agents/lint-toolchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

### A. 版本一致性

- [ ] `package.json` 的 `engines.node` 与 README 的 Node.js 徽章一致
- [ ] 发布包(`cli` 等)的 `engines.node` 与 README 的 Node.js 徽章一致;根/e2e 开发要求(`>=22.12`)与 CONTRIBUTING 一致
- [ ] `pnpm-lock.yaml` 同步生成(运行 `pnpm install`)
- [ ] 各源码包 `tsconfig.json`(根 + core + runtime + commands + cli + kscli)的 target / module 设置一致

Expand Down
24 changes: 12 additions & 12 deletions docs/agents/publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ node tools/release/publish-channel.mjs --channel test --knowledge --dry-run

## 常见漏点(基于历史踩坑)

| 漏点 | 后果 |
| -------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| 只升部分包,漏升 runtime/commands/kscli | 当前 check.mjs 按所选发布集合校验,但未选择 `knowledge-studio-cli` 时不会覆盖 kscli |
| 新增发布包但没加 `tools/release/lib/packages.mjs` | CI 不会 bump/publish/校验该包 |
| cli 升版号但 core 没升 | check.mjs 会拦下 |
| 发版漏更 CHANGELOG,或分类写成规范外的 `优化`/`Improved` | 用户看不到本次变更,分类与历史不一致 |
| `1.0.0` 当 beta 直接发 | 占了 `latest` tag,所有用户被强升,撤回成本极高 |
| README 写的 bin 名实际 `package.json.bin` 没注册 | 用户复制命令报 `command not found` |
| Node 徽章 `>=18`、engines `>=22.12` 不一致 | 用户在 Node 18 上 `npm i` 被 engine 警告或直接失败 |
| npm Trusted Publisher 的 workflow filename 改了没同步 | OIDC 匹配不上,publish 报 404 |
| CI 用 Node 22(npm 10)跑 publish | npm 10 不支持 OIDC token 交换,publish 报 404 |
| stable 发布前没有升级版本号 | 所选发布集合的版本已全部存在于 npm,CI 明确报错并要求先升级版本号 |
| 漏点 | 后果 |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| 只升部分包,漏升 runtime/commands/kscli | 当前 check.mjs 按所选发布集合校验,但未选择 `knowledge-studio-cli` 时不会覆盖 kscli |
| 新增发布包但没加 `tools/release/lib/packages.mjs` | CI 不会 bump/publish/校验该包 |
| cli 升版号但 core 没升 | check.mjs 会拦下 |
| 发版漏更 CHANGELOG,或分类写成规范外的 `优化`/`Improved` | 用户看不到本次变更,分类与历史不一致 |
| `1.0.0` 当 beta 直接发 | 占了 `latest` tag,所有用户被强升,撤回成本极高 |
| README 写的 bin 名实际 `package.json.bin` 没注册 | 用户复制命令报 `command not found` |
| Node 徽章与 `cli/package.json.engines` 不一致(当前应为 `>=18.17`) | 用户在声明外的 Node 上 `npm i` 被 engine 警告或直接失败 |
| npm Trusted Publisher 的 workflow filename 改了没同步 | OIDC 匹配不上,publish 报 404 |
| CI 用 Node 22(npm 10)跑 publish | npm 10 不支持 OIDC token 交换,publish 报 404 |
| stable 发布前没有升级版本号 | 所选发布集合的版本已全部存在于 npm,CI 明确报错并要求先升级版本号 |
4 changes: 2 additions & 2 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**The official command-line interface for Aliyun Model Studio (DashScope) AI Platform**

[![npm version](https://img.shields.io/npm/v/bailian-cli?color=0969da&label=npm)](https://www.npmjs.com/package/bailian-cli)
[![Node.js](https://img.shields.io/badge/node-%3E%3D22.12-brightgreen)](https://nodejs.org)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.17-brightgreen)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)

Expand Down Expand Up @@ -81,7 +81,7 @@ npm install -g bailian-cli
npx skills add modelstudioai/cli --all -g
```

> Requires Node.js >= 22.12.
> Requires Node.js >= 18.17.

## Quick Start

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**阿里云百炼 (DashScope) AI 平台命令行工具**

[![npm version](https://img.shields.io/npm/v/bailian-cli?color=0969da&label=npm)](https://www.npmjs.com/package/bailian-cli)
[![Node.js](https://img.shields.io/badge/node-%3E%3D22.12-brightgreen)](https://nodejs.org)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.17-brightgreen)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)

Expand Down Expand Up @@ -79,7 +79,7 @@ npm install -g bailian-cli
npx skills add modelstudioai/cli --all -g
```

> 需要预先安装 Node.js >= 22.12
> 需要预先安装 Node.js >= 18.17

## 快速开始

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
"yaml": "catalog:"
},
"engines": {
"node": ">=22.12.0"
"node": ">=18.17.0"
}
}
2 changes: 1 addition & 1 deletion packages/commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
"vite-plus": "0.1.22"
},
"engines": {
"node": ">=22.12.0"
"node": ">=18.17.0"
}
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
"vite-plus": "catalog:"
},
"engines": {
"node": ">=22.12.0"
"node": ">=18.17.0"
}
}
4 changes: 2 additions & 2 deletions packages/kscli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**Lightweight RAG CLI for Aliyun Model Studio — focused on knowledge-base retrieval.**

[![npm version](https://img.shields.io/npm/v/knowledge-studio-cli?color=0969da&label=npm)](https://www.npmjs.com/package/knowledge-studio-cli)
[![Node.js](https://img.shields.io/badge/node-%3E%3D22.12-brightgreen)](https://nodejs.org)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.17-brightgreen)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)

Expand All @@ -23,7 +23,7 @@
npm install -g knowledge-studio-cli
```

> Requires Node.js >= 22.12.
> Requires Node.js >= 18.17.

## Quick Start

Expand Down
4 changes: 2 additions & 2 deletions packages/kscli/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**阿里云 Model Studio 轻量级 RAG 命令行工具 — 专注知识库检索。**

[![npm version](https://img.shields.io/npm/v/knowledge-studio-cli?color=0969da&label=npm)](https://www.npmjs.com/package/knowledge-studio-cli)
[![Node.js](https://img.shields.io/badge/node-%3E%3D22.12-brightgreen)](https://nodejs.org)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.17-brightgreen)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)

Expand All @@ -23,7 +23,7 @@
npm install -g knowledge-studio-cli
```

> 需要 Node.js >= 22.12
> 需要 Node.js >= 18.17
## 快速开始

Expand Down
2 changes: 1 addition & 1 deletion packages/kscli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
"yaml": "catalog:"
},
"engines": {
"node": ">=22.12.0"
"node": ">=18.17.0"
}
}
2 changes: 1 addition & 1 deletion packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"yaml": "catalog:"
},
"engines": {
"node": ">=22.12.0"
"node": ">=18.17.0"
},
"inlinedDependencies": {
"ajv": "8.20.0",
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ catalog:
smol-toml: ^1.4.2
tsx: ^4.23.0
typescript: ^5
undici: ^8.4.1
undici: ^6.27.0
vite: npm:@voidzero-dev/vite-plus-core@latest
vite-plus: latest
vitest: npm:@voidzero-dev/vite-plus-test@latest
Expand Down