AtomGit CLI v0.14.1
v0.14.1 是安装与更新层的质量修复版本:npm bootstrap 安装器自动迁移旧 npm 全局安装残留的 bin 软链(现场报告的 refusing non-regular install target 安装失败就此收口)、安装错误信息全面可操作化、被中断安装的事务残留自动清扫并纳入 doctor 诊断、pip / Homebrew / pipx 跨渠道入口保护与渠道专属指引;更新层修复 gc update --help、识别 pnpm 安装形态,并让 Homebrew / deb / rpm 用户获得正确的渠道升级引导。命令入口保持 gc / gitcode 不变。
修复
安装器(npm bootstrap)
- 旧 npm 全局安装残留软链自动迁移(!569,修复现场安装失败):旧版本经经典 npm 全局渠道安装 @gitcode-cli/cli 且 npm prefix 指向
~/.local时,bin 目录会留下指向node_modules的gc/gitcode软链,此前被一刀切拒绝;现识别为自家渠道残留并事务性迁移为真实文件(备份 + 回滚),断裂软链同样按链接文本识别;软链指向第三方包gitcode-cli或无关目标时仍拒绝(不抢占他方命令),但报错带软链指向与针对性处置指引 - 安装错误信息可操作化(!571):安装失败时逐条透传底层原因(errno + 路径,不再被聚合错误吞掉);安装目录不可创建/不可写、目标被目录占用三类场景的报错均含
--target-dir逃生指引;chooseGlobalBinDir兜底失败同样包装 - 事务残留清扫与诊断(!572):被 SIGKILL / Ctrl-C 中断的安装留下的
*.backup-*/*.tmp-*(每个约 13.6MB)此前永久累积;现安装启动时自动清扫 24 小时以上的陈旧残留(含 Windows.exe变体与写探针文件),gc doctor install新增leftovers字段检测报告 - 跨渠道入口保护(!573):替换 pip console script 入口(python shebang 识别)前逐文件警告并附保留 pip 渠道的卸载指引;brew / pipx 软链被拒时给
brew uninstall gc/pipx uninstall gitcode-cli渠道专属建议(不再误导性建议删软链);安装成功后检测 PATH 遮蔽并告警 - npm 包装层坐标动态化的发布装配与契约(!570 前置)不受影响;坐标 allowlist 新增契约测试防止漂移复发
更新层
gc update --help修复(!574):npm wrapper 下--help、--no-update-check、--no-interactive不再报 "unknown update argument"(违反 agent-friendly 发现契约),--help输出 wrapper 侧帮助- pnpm 安装识别(!574):pnpm 全局安装(含 postinstall 写入路径与 Windows 布局)被正确识别并给出
pnpm add -g <坐标>@latest升级指引,不再被误分类后走 npm 通道失败;项目级 pnpm 依赖给pnpm update指引 - Homebrew / deb / rpm 升级引导可达(!575):
gc update此前只认 npm wrapper 设置的环境变量,brew 用户得到错误的"下载归档"建议;现与 doctor 共享发行版检测(路径特征 + dpkg/rpm 查询),输出brew upgrade gc/ 包管理器升级指引
发布元数据与 CI
- brew formula 推送目标、nfpm maintainer/vendor/homepage、发布文档全面收敛
atomgit-cli组织路径(!570) - 修复 GitHub CI 在 Windows 上掩盖 npm 测试失败的问题(多命令 step 改用 bash -e 逐命令失败即失败)
推荐升级方式
短命令快速升级
可信的个人本地环境可优先使用短命令(推荐坐标):
npx -y atomgit-cli@latest install
gitcode version
gitcode doctor install等价坐标:npx -y @gitcode-cli/cli@latest install(旧坐标长期可用,无需迁移)。
短命令会继承当前目录和用户的 npm 配置。请仅在确认这些配置(包括 .npmrc)可信时使用。
CI、审计、未知项目目录或自定义 npm registry 环境,使用安全强化命令:
npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@latest install
gitcode version(scoped 坐标加固形式:npx --yes --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@latest install)
锁定版本安装
npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@0.14.1 install
gitcode version(scoped 坐标锁定形式:npx --yes --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@0.14.1 install)
其他渠道
- npm 全局(经典)/ npm-bootstrap:
gc update,或上面的 npx 命令 - pnpm 全局:
pnpm add -g atomgit-cli@latest(gc update会给出该指引) - Homebrew:
brew update && brew upgrade gc - pip / pipx:
pip install -U gitcode-cli/ 在对应环境升级 - deb / rpm:通过系统包管理器升级
完整变更
- 安装层质量链:!569(软链迁移)、!571(错误可操作性 + CI 修复)、!572(残留清扫 + doctor)、!573(跨渠道保护)
- 发布元数据:!570(allowlist 契约 + brew/nfpm 收敛)
- 更新层:!574(update --help + pnpm)、!575(渠道引导共享检测)
- 关联 issue:#591-#597(全部随本版本交付)