@bubx/cli 0.0.0-stage → 0.1.0

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 CHANGED
@@ -1,3 +1,54 @@
1
- # Temporary Holding Version
1
+ # Bot CLI
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ CLI 支持 macOS 和 Linux,需要 Node.js 22.23+(22.x)或 24+。设备凭证保存在 macOS Keychain 或 Linux Secret Service(`secret-tool`)。
4
+
5
+ ```sh
6
+ npm install -g @bubx/cli
7
+ bubai bot start
8
+ ```
9
+
10
+ 在仓库内开发时,在根目录运行 `pnpm build` 并启动 API 和 Relay,再运行 `pnpm cli bot start`。
11
+
12
+ 安装后,在终端运行 `bubai bot start`,选择已有 Bot 或创建一个新 Bot。新建时填写名称、确认工作区并选择 Adapter。每个 Bot 保存自己的工作区、Adapter、模型、推理强度和权限,由独立 Bot Server 进程执行。多个 Bot 可以同时在线并共享本机设备授权。已有单 Bot 配置会作为已有 Bot 出现在菜单中。
13
+
14
+ 首次需要授权时,从终端扫码或点击设备批准链接。Bot 在线后,用相同账号在客户端的 Bot 列表中打开。向他人共享时,在 Bot 成员页创建 Team 邀请并复制链接或显示二维码。[启动与连接交互](../../docs/agent/design/cli/onboarding.md) · [本机 Codex 实测](../../docs/agent/reviews/bot-start/README.md)
15
+
16
+ ## 命令
17
+
18
+ | 命令 | 用途 |
19
+ | ----------------- | ---------------------------------------------------- |
20
+ | `bubai bot start` | 选择已有 Bot 或新建 Bot。已运行的 Bot 会显示当前状态 |
21
+ | `bubai status` | 查看本机所有 Bot 的 Adapter、工作区和状态 |
22
+ | `bubai stop` | 停止指定的运行中 Bot |
23
+ | `bubai devices` | 查看本机 CLI 的共享设备授权和凭证到期时间 |
24
+ | `bubai agents` | 查看本机 Codex、agy 登录状态及尚待接入的 Adapter |
25
+
26
+ `bubai bot call <bot-id> <method> [payload]` 按当前登录用户远程调用 Bot Server。载荷为 JSON。可以使用 `--request-id` 固定请求标识,或用 `--watch` 持续读取订阅事件。
27
+
28
+ 新 Bot 默认归属账号的个人组织,也可用 `bubai bot start --org <org-id>` 指定有管理权限的组织。只有一个运行中的 Bot 时,`bubai stop` 直接停止。多个候选 Bot 通过名称和工作区区分。脚本使用 `bubai status --json` 读取 `bots` 数组,使用数组里的本地 `id` 或已注册的 `botId` 指定目标。
29
+
30
+ ```sh
31
+ bubai stop --bot <bot-id>
32
+ ```
33
+
34
+ Codex 支持只读、工作区可写和完全访问。每条消息用一个临时原生会话执行,网页收到完整文本。当前执行为非交互模式,逐次任务审批和原生会话恢复属于完整 App Server 适配范围。[Codex Adapter](../../packages/agent-adapters/codex/README.md)
35
+
36
+ 本机已安装并登录 agy(Antigravity)时,可在同一向导中选择 agy。模型来自 `agy models`,推理强度跟随模型默认配置。支持只读和完全访问,每条消息启动一个独立原生会话;网页接收最终文本。[agy Adapter](../../packages/agent-adapters/agy/README.md) · [本机 agy 实测](../../docs/agent/reviews/agy/README.md)
37
+
38
+ ## 高级操作
39
+
40
+ ```sh
41
+ pnpm cli init --api http://127.0.0.1:3000 --name Bubai --workspace /path/to/workspace
42
+ pnpm cli login --no-open
43
+ pnpm cli start --foreground
44
+ ```
45
+
46
+ `init` 单独初始化传统 Bot 配置。`login --no-open` 打印设备批准地址和用户码,共享授权保存在本机。`start --foreground` 供前台调试。[旧流程端到端实测](../../docs/agent/reviews/console-codex/README.md)
47
+
48
+ Console 与 API 可部署在不同 HTTPS origin,本地开发可使用 loopback HTTP。可用 `BUBAI_HOME` 指定权限为 `0700` 的本地状态目录。工作区真实路径保存在本地 SQLite。`status --api <url>` 可额外检查 API 健康。旧 profile 可用 `BUBAI_CODEX_TEXT_ONLY=1 pnpm cli start --foreground` 启用原来的只读文本模式。
49
+
50
+ ## 发布
51
+
52
+ 首次发布时,用拥有 `@bubx` 发布权限的账号执行 `npm login --registry=https://registry.npmjs.org`。在仓库根目录安装工作区依赖,然后进入 `apps/cli` 执行 `npm publish --access public`。
53
+
54
+ 在 npm 包设置里为 GitHub 仓库配置 [Trusted Publishing](https://docs.npmjs.com/trusted-publishers/),工作流文件填写 `publish-cli.yml` 并勾选允许 `npm publish`。后续发布时,更新本目录 `package.json` 的版本并提交,推送对应的 `cli-v<版本>` 标签。GitHub Actions 会校验版本、打包、安装验证并发布到 npm。