Repository navigation
v0.3.0 — 自我更新 / Self-update
✨ 新功能:cce 自我更新
cce 现在可以把自己升级到 npm 最新版,分手动和启动时自动两种。
手动更新
cce update— 检查并安装最新版cce update --check— 只检查、不安装
启动时自动检查(配置项 updateMode,默认 auto)
| 模式 | 行为 |
|---|---|
auto(默认) |
发现新版后后台静默更新,下次启动提示一句「已在后台更新到 vX.Y.Z」 |
prompt |
下次在终端启动时弹「立即更新 / 跳过此版本」菜单;跳过的版本不再提示 |
off |
启动时完全不检查(仍可手动 cce update) |
细节:
- 启动时的检查走后台,不拖慢启动;结果缓存约 3 小时
- 「立即更新 / 跳过」菜单**仅在交互式终端(TTY)**出现;脚本、管道、CI 里不打扰
- 单次关闭:环境变量
CCE_NO_UPDATE_CHECK=1 - 从源码(
git clone)运行时,cce update会提示用git pull,不会乱装
📖 文档
- 中文文档新增术语速查表,把
provider(服务商)、env(启动配置)等概念讲清楚,并修正了「env ≠ 服务商」(同一服务商可建多套 env) schema.json新增updateMode,编辑器可补全/校验
✨ New: cce self-update
cce can now upgrade itself to the latest npm version — manually or automatically at launch.
Manual
cce update— check and install the latest versioncce update --check— check only, don't install
Automatic at launch (updateMode config, default auto)
| Mode | Behavior |
|---|---|
auto (default) |
Silently update in the background; the next launch prints "cce was updated to vX.Y.Z" |
prompt |
Show an Update now / Skip this version menu on the next interactive launch |
off |
Never check at launch (manual cce update still works) |
Notes: the launch check runs in the background (never slows startup, cached ~3h), the menu only appears in a TTY, CCE_NO_UPDATE_CHECK=1 disables it for one run, and source checkouts are told to use git pull.
⬆️ 升级 / Upgrade
npm i -g @xiaofuzhou/cce@latest # 或老用户直接 / or simply: cce updateFull changelog: v0.2.0...v0.3.0