diff --git a/CHANGELOG.md b/CHANGELOG.md index 47919b2..a283fc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and ### Added - **CLI access-token automation** — added `bl auth generate-access-token`; OpenAPI login can obtain and persist a Console access token, and Console requests can refresh an expired token with stored AK/SK credentials. -- **`bl bootstrap`** — initializes a Bailian workspace, creates the Console user, and activates required postpaid services in one workflow. +- **`bl workspace init`** — initializes a Bailian workspace, creates the Console user, and activates required postpaid services in one workflow. - **Named Config Profiles** — added isolated named profiles, persistent activation, and `bl config list`, `bl config use`, and `bl config ui` for profile management. - **Token Plan model Profile** — `bl auth login --config token-plan --api-key ...` materializes the built-in Token Plan endpoint and default model settings for model calls. - **STS credentials** — OpenAPI authentication now accepts and signs requests with an optional security token. diff --git a/CHANGELOG.zh.md b/CHANGELOG.zh.md index 913ad2d..dc15bd7 100644 --- a/CHANGELOG.zh.md +++ b/CHANGELOG.zh.md @@ -11,7 +11,7 @@ ### 新增 - **CLI Access Token 自动化** —— 新增 `bl auth generate-access-token`;OpenAPI 登录可获取并保存 Console Access Token,Console 请求可使用已保存的 AK/SK 自动刷新过期 Token。 -- **`bl bootstrap`** —— 通过一条工作流初始化百炼工作空间、创建控制台用户并开通所需的后付费服务。 +- **`bl workspace init`** —— 通过一条工作流初始化百炼工作空间、创建控制台用户并开通所需的后付费服务。 - **命名 Config Profile** —— 新增相互隔离的命名 Profile、持久化激活状态,以及用于管理 Profile 的 `bl config list`、`bl config use` 和 `bl config ui`。 - **Token Plan 模型 Profile** —— `bl auth login --config token-plan --api-key ...` 会物化 Token Plan 内置接入地址与默认模型配置,供模型命令直接使用。 - **STS 凭证** —— OpenAPI 鉴权现支持可选 Security Token,并在签名请求中自动携带。 diff --git a/packages/cli/src/commands.ts b/packages/cli/src/commands.ts index 556a0b9..ad4a4f1 100644 --- a/packages/cli/src/commands.ts +++ b/packages/cli/src/commands.ts @@ -83,7 +83,7 @@ import { tokenPlanCreateKey, tokenPlanAssignSeats, tokenPlanAddMember, - bootstrap, + workspaceInit, pluginInstall, pluginLink, pluginList, @@ -179,7 +179,7 @@ export const commands: Record = { "token-plan create-key": tokenPlanCreateKey, "token-plan assign-seats": tokenPlanAssignSeats, "token-plan add-member": tokenPlanAddMember, - bootstrap: bootstrap, + "workspace init": workspaceInit, "plugin install": pluginInstall, "plugin link": pluginLink, "plugin list": pluginList, diff --git a/packages/commands/src/commands/bootstrap/index.ts b/packages/commands/src/commands/workspace/init.ts similarity index 97% rename from packages/commands/src/commands/bootstrap/index.ts rename to packages/commands/src/commands/workspace/init.ts index 8bae9aa..3820713 100644 --- a/packages/commands/src/commands/bootstrap/index.ts +++ b/packages/commands/src/commands/workspace/init.ts @@ -139,7 +139,7 @@ export default defineCommand({ const { accessKeyId, accessKeySecret } = flags; if (!accessKeyId || !accessKeySecret) { throw new BailianError( - "bootstrap requires --access-key-id and --access-key-secret.", + "workspace init requires --access-key-id and --access-key-secret.", ExitCode.USAGE, ); } @@ -224,8 +224,8 @@ export default defineCommand({ }, }); } catch (err) { - // Re-running bootstrap is idempotent: an already-existing user is not - // fatal, so swallow it and continue with the remaining steps. + // Re-running workspace init is idempotent: an already-existing user is + // not fatal, so swallow it and continue with the remaining steps. if (!(err instanceof BailianError) || !/already exists/i.test(err.message)) { throw err; } diff --git a/packages/commands/src/index.ts b/packages/commands/src/index.ts index 2fdc1f1..63b31c4 100644 --- a/packages/commands/src/index.ts +++ b/packages/commands/src/index.ts @@ -90,7 +90,7 @@ export { default as tokenPlanListSeats } from "./commands/token-plan/list-seats. export { default as tokenPlanCreateKey } from "./commands/token-plan/create-key.ts"; export { default as tokenPlanAssignSeats } from "./commands/token-plan/assign-seats.ts"; export { default as tokenPlanAddMember } from "./commands/token-plan/add-member.ts"; -export { default as bootstrap } from "./commands/bootstrap/index.ts"; +export { default as workspaceInit } from "./commands/workspace/init.ts"; export { default as pluginInstall } from "./commands/plugin/install.ts"; export { default as pluginLink } from "./commands/plugin/link.ts"; export { default as pluginList } from "./commands/plugin/list.ts"; diff --git a/skills/bailian-cli/reference/bootstrap.md b/skills/bailian-cli/reference/bootstrap.md deleted file mode 100644 index 24d552a..0000000 --- a/skills/bailian-cli/reference/bootstrap.md +++ /dev/null @@ -1,36 +0,0 @@ -# `bl bootstrap` commands - -> Auto-generated from `packages/cli/src/commands.ts`. Do not edit by hand. -> Regenerate: `pnpm --filter bailian-cli run generate:reference`. - -Index: [index.md](index.md) - -## Commands in this group - -| Command | Description | -| -------------- | ----------------------------------------------------------- | -| `bl bootstrap` | Initialize Bailian workspace and activate postpaid services | - -## Command details - -### `bl bootstrap` - -| Field | Value | -| --------------- | ------------------------------------------------------------------------------------------- | -| **Name** | `bootstrap` | -| **Description** | Initialize Bailian workspace and activate postpaid services | -| **Usage** | `bl bootstrap --access-key-id --access-key-secret [--security-token ]` | - -#### Flags - -| Flag | Type | Required | Description | -| ------------------------------ | ------ | -------- | ------------------------------------------- | -| `--access-key-id ` | string | no | Alibaba Cloud Access Key ID | -| `--access-key-secret ` | string | no | Alibaba Cloud Access Key Secret | -| `--security-token ` | string | no | Alibaba Cloud STS Security Token (optional) | - -#### Examples - -```bash -bl bootstrap --access-key-id LTAIxxxxx --access-key-secret xxxxx -``` diff --git a/skills/bailian-cli/reference/index.md b/skills/bailian-cli/reference/index.md index 7ff2968..132c4a1 100644 --- a/skills/bailian-cli/reference/index.md +++ b/skills/bailian-cli/reference/index.md @@ -17,7 +17,6 @@ Use this index for the full quick index and global flags. | `bl auth login` | Authenticate with API key, console browser login, or OpenAPI AK/SK (credentials can coexist) | [auth.md](auth.md) | | `bl auth logout` | Clear stored credentials | [auth.md](auth.md) | | `bl auth status` | Show current authentication state | [auth.md](auth.md) | -| `bl bootstrap` | Initialize Bailian workspace and activate postpaid services | [bootstrap.md](bootstrap.md) | | `bl config list` | List config profiles and show the active profile | [config.md](config.md) | | `bl config set` | Set a config value | [config.md](config.md) | | `bl config show` | Display current configuration | [config.md](config.md) | @@ -97,6 +96,7 @@ Use this index for the full quick index and global flags. | `bl video ref` | Reference-to-video generation (happyhorse-1.1-r2v / wan2.6-r2v): multi-subject, multi-shot with voice | [video.md](video.md) | | `bl video task get` | Query async task status | [video.md](video.md) | | `bl vision describe` | Describe an image or video using Qwen-VL | [vision.md](vision.md) | +| `bl workspace init` | Initialize Bailian workspace and activate postpaid services | [workspace.md](workspace.md) | | `bl workspace list` | List all workspaces | [workspace.md](workspace.md) | ## By group @@ -106,7 +106,6 @@ Use this index for the full quick index and global flags. | `advisor` | `recommend` | [advisor.md](advisor.md) | | `app` | `call`, `list` | [app.md](app.md) | | `auth` | `generate-access-token`, `login`, `logout`, `status` | [auth.md](auth.md) | -| `bootstrap` | `(root)` | [bootstrap.md](bootstrap.md) | | `config` | `list`, `set`, `show`, `ui`, `use` | [config.md](config.md) | | `console` | `call` | [console.md](console.md) | | `dataset` | `delete`, `get`, `list`, `upload`, `validate` | [dataset.md](dataset.md) | @@ -130,7 +129,7 @@ Use this index for the full quick index and global flags. | `usage` | `free`, `freetier`, `stats`, `summary` | [usage.md](usage.md) | | `video` | `download`, `edit`, `generate`, `ref`, `task get` | [video.md](video.md) | | `vision` | `describe` | [vision.md](vision.md) | -| `workspace` | `list` | [workspace.md](workspace.md) | +| `workspace` | `init`, `list` | [workspace.md](workspace.md) | ## Global flags diff --git a/skills/bailian-cli/reference/workspace.md b/skills/bailian-cli/reference/workspace.md index 2491bf0..788e8a6 100644 --- a/skills/bailian-cli/reference/workspace.md +++ b/skills/bailian-cli/reference/workspace.md @@ -7,12 +7,35 @@ Index: [index.md](index.md) ## Commands in this group -| Command | Description | -| ------------------- | ------------------- | -| `bl workspace list` | List all workspaces | +| Command | Description | +| ------------------- | ----------------------------------------------------------- | +| `bl workspace init` | Initialize Bailian workspace and activate postpaid services | +| `bl workspace list` | List all workspaces | ## Command details +### `bl workspace init` + +| Field | Value | +| --------------- | ------------------------------------------------------------------------------------------------ | +| **Name** | `workspace init` | +| **Description** | Initialize Bailian workspace and activate postpaid services | +| **Usage** | `bl workspace init --access-key-id --access-key-secret [--security-token ]` | + +#### Flags + +| Flag | Type | Required | Description | +| ------------------------------ | ------ | -------- | ------------------------------------------- | +| `--access-key-id ` | string | no | Alibaba Cloud Access Key ID | +| `--access-key-secret ` | string | no | Alibaba Cloud Access Key Secret | +| `--security-token ` | string | no | Alibaba Cloud STS Security Token (optional) | + +#### Examples + +```bash +bl workspace init --access-key-id LTAIxxxxx --access-key-secret xxxxx +``` + ### `bl workspace list` | Field | Value |