CLI 参考
update
apothem update 命令的 CLI 参考。
从当前的共享配置档案重新安装一个工具适配器配置。
概要
apothem update --harness NAME|all [--profile PATH] [--dry-run]
[--project PATH]
[--quiet|-q] [--verbose|-v]
[--format plain|json] [--json] [--no-color]update 会从当前的共享配置档案重新物化工具输出。它使用与 install 相同的配置档案校验、--harness all 选择、项目作用域检查、试运行行为以及 JSON 信封。
对于将技能写入你主目录的项目作用域适配器(见 install),update 也会使这些文件夹保持最新,并打印指出它们的同一条 Note:。在开始写入技能之前安装的适配器,会在其下一次更新时得到这些技能。并非由 Apothem 写入的技能文件夹会被跳过并伴有一条警告,与 install 相同。先前写入过共享技能文件夹的安装,会在其下一次更新时被重写为每个安装共享的形式;每个被更改的文件夹都会先备份。
连续式别名 apothem updating(也接受写作 apothem Updating)解析到同一个处理程序。
选项
| 选项 | 描述 |
|---|---|
--harness NAME | 要更新的工具适配器,或用 all 表示覆盖整个注册表的集合(必填)。使用 all 时,会跳过共享配置档案中 exclude_harnesses 列出的工具,但显式指定的工具即使被列出也会被更新。 |
--profile PATH | 共享配置档案 YAML 的路径。默认为 ~/.config/apothem/profile.yaml。 |
--dry-run | 预览更新,但不写入文件。 |
--project PATH | 项目作用域工具的项目根目录。当所选的工具集合包含项目作用域适配器时必填。 |
--quiet, -q | 抑制信息性输出;只输出错误。 |
--verbose, -v | 输出额外的诊断信息。 |
--format plain|json | 输出格式(默认:plain)。 |
--json | --format json 的简写。 |
--no-color | 在输出中禁用 ANSI 颜色代码。 |
-h, --help | 显示帮助并退出。 |
JSON 输出
{
"schema_version": 1,
"status": "success",
"command": "update",
"action": "updated",
"harness": "claude-code",
"profile_path": "C:\\Users\\Example\\.config\\apothem\\profile.yaml",
"project": null,
"files_written": [],
"results": [],
"warnings": [],
"error": null,
"output_path": "C:\\Users\\Example\\.claude\\settings.json"
}--dry-run 返回 status: "dry_run" 和 files_written: []。
示例
apothem update --harness claude-code
apothem update --harness claude-code --dry-run
apothem update --harness all --project . --dry-run --json
apothem Updating --harness claude-code # continuous-form alias
apothem updating --harness claude-code # lowercase variant退出码
| 代码 | 含义 |
|---|---|
| 0 | 适配器更新成功,或试运行已顺利完成规划 |
| 1 | 预期内的校验、配置档案、工具、项目或适配器错误 |
| 2 | 在至少一次写入之后发生的部分批量物化 |
| 64 | 用法错误:未知的选项或命令,或缺失或无效的选项值。在 --json 下,该错误是一个代码为 cli.usage 的 JSON 信封。 |
另请参阅
apothem updating——此命令的连续式别名(在此处记录;CLI 接受两种形式)- apothem install——初始安装
- 更新指南——各安装器的更新路径