Skip to content
Apothem
参考

CLI 参考

Apothem CLI 参考——全部子命令与标志。

apothem CLI 是用于管理共享配置档案与工具适配器的主要操作者接口。

全局标志

标志说明
--version打印 Apothem 版本并退出
--help打印该命令的帮助

子命令

apothem install

从共享配置档案安装某个工具适配器。

apothem install --harness <name|all> [--profile PATH] [--project PATH] [--dry-run]
选项说明
--harness <name>工具适配器名称(见下方的规范取值)。必填。
--profile PATH共享配置档案 YAML 的路径。默认为 ~/.config/apothem/profile.yaml
--project PATH项目作用域工具的项目根目录。
--dry-run预览安装而不写入文件。

规范的 --harness 取值:

antigravity
claude-code
codebuddy
codex
cursor
gemini-cli
github-copilot
hermes
kiro
open-claw
opencode
qwen-code
trae
windsurf
zed

使用 --harness all --project <path> 来选择整个注册表范围的集合。在安装/更新的批量选择期间,会遵循配置档案的 exclude_harnesses 列表。

apothem update

依据当前共享配置档案重新派生某个工具适配器的原生配置。

apothem update --harness <name|all> [--profile PATH] [--project PATH] [--dry-run]
选项说明
--harness <name>工具适配器名称。必填。
--profile PATH共享配置档案 YAML 的路径。
--project PATH项目作用域工具的项目根目录。
--dry-run预览更新而不写入文件。

update 会重新物化工具的输出。它不会更新 Apothem CLI 软件包;如需升级软件包,请使用安装 Apothem 时所用的包管理器。

apothem uninstall

移除某个工具适配器的原生配置。

apothem uninstall --harness <name|all> [--project PATH] [--yes]
选项说明
--harness <name>工具适配器名称。必填。
--project PATH项目作用域工具的项目根目录。
--yes跳过确认提示。

apothem verify

验证某个工具适配器是否已安装且其输出路径存在。

apothem verify --harness <name|all> [--project PATH]
选项说明
--harness <name>工具适配器名称或 all。必填。
--project PATH项目作用域工具的项目根目录。

当适配器已安装时退出码为 0,未安装时为 1

apothem profile

管理共享的 Apothem 配置档案。

apothem profile show [--profile PATH]
apothem profile init [--profile PATH] [--force]
apothem profile set <key> <value> [--profile PATH]
apothem profile edit [--profile PATH]
子命令说明
profile init创建一个符合 schema 的最小配置档案脚手架。
profile show将解析后的配置档案(YAML)打印到 stdout。
profile set <key> <value>设置某个配置档案字段。该值会按 YAML 解析(字符串、数字、布尔值、列表与映射均被接受)。
profile edit$EDITOR 中打开配置档案(回退到平台默认编辑器)。

--profile PATH 选项可让每个子命令指向另一个配置档案文件。默认为 ~/.config/apothem/profile.yaml

apothem harnesses

列出并检视已注册的工具适配器。

apothem harnesses list
apothem harnesses show <name>
子命令说明
harnesses list打印一张表格,列出每个已注册的适配器及其安装状态标志与输出路径。
harnesses show <name>打印某个适配器的名称、安装状态与输出路径。

apothem doctor

为 Apothem 安装运行系统诊断。

apothem doctor

打印 Apothem 版本、Python 解释器、平台、解析得到的配置档案路径,以及一张每工具安装状态表。当每个已注册的适配器都报告为已安装时退出码为 0,否则为 1

生成的命令与标志参考

CommandFlagsDescription
apothem completionPrint a shell-completion script for SHELL to stdout. Supported shells: bash, zsh, fish, powershell. Every script is generated by Click's env-var completion protocol — PowerShell through the completion class registered above, since Click ships none natively. Enabling completion is opt-in: this command only prints the script — pipe or append it to the shell's completion file yourself (see --help).
apothem diff--format, --harness, --json, --no-color, --profile, --project, --quiet, -q, --verbose, -vPreview the pending configuration changes for a single harness.
apothem doctor--format, --json, --no-color, --quiet, -q, --verbose, -vReport Apothem environment and installation health, exiting non-zero on any failure. Prints the engine version, Python, and platform, validates the shared profile against the packaged schema — a present-but-malformed profile is a failure, not a green "found" — and probes every registered adapter's install state. An adapter that raises degrades to an error row rather than aborting the sweep. Any failed check — an invalid profile, or a harness that is uninstalled or could not be probed — forces a non-zero exit so a CI or setup step can gate on it.
apothem harnesses list--format, --json, --no-color, --quiet, -q, --verbose, -vList all registered harness adapters.
apothem harnesses show--format, --json, --no-color, --quiet, -q, --verbose, -vShow details for a specific harness adapter.
apothem install--clean, --fresh, --dry-run, --format, --harness, --json, --no-color, --profile, --project, --quiet, -q, --verbose, -v, --yesInstall a harness adapter configuration.
apothem migrate-workspace--dry-run, --format, --json, --no-color, --project, --quiet, -q, --verbose, -vMigrate a legacy per-harness workspace into the shared .apothem layout. The base is the resolved --project root when supplied, otherwise the current working directory (the project-local default). Per-harness memory/contexts/learning stores union-merge into the shared store; a conflicting record is skipped, never overwritten; a legacy .plans tree moves under .apothem/plans; every consumed source is backed up first. The migration is idempotent.
apothem profile edit--format, --json, --no-color, --profile, --quiet, -q, --verbose, -vOpen the shared profile in the system editor.
apothem profile init--force, --format, --json, --no-color, --profile, --quiet, -q, --verbose, -vCreate a schema-valid shared profile scaffold.
apothem profile set--format, --json, --no-color, --profile, --quiet, -q, --verbose, -vSet a key in the shared profile. KEY is a dotted path that descends into the nested profile structure (identity.name, preferences.style, enforcement.sprints, harnesses.&lt;harness&gt;.preferences.style); a single key with no dot sets a top-level node. VALUE is stored as a literal string — bare words are not coerced (no stays "no", 2024-01-01 and 1.0 stay strings) — except true/false (the boolean enforcement flags) and explicit [...]/&#123;...&#125; list/map input. The fully-assembled profile is validated against the packaged schema BEFORE writing; an invalid set is refused with the standard diagnostic and the profile on disk is unchanged.
apothem profile show--format, --json, --no-color, --profile, --quiet, -q, --verbose, -vDisplay the current shared profile.
apothem quickstart--format, --harness, --json, --no-color, --profile, --project, --quiet, -q, --verbose, -v, --yesGuided first run: ensure a profile, preview the writes, then install. Walks a new operator through the canonical path in one linear flow — create a starter profile if none exists (with a personalize nudge), preview the files each harness will write (project root vs your home directory), confirm, then install with the grouped capability-note output — and ends with the recommended next commands. --yes runs the whole sequence non-interactively; --format json emits one structured summary of every step. It composes the install building blocks; it does not duplicate them.
apothem rollback--format, --harness, --install-id, --json, --last, --no-color, --project, --quiet, -q, --verbose, -v, --yesRestore a harness to the state before its recorded install.
apothem status--format, --json, --no-color, --profile, --project, --quiet, -q, --verbose, -vReport install, verify, and drift state for every registered harness.
apothem uninstall--format, --harness, --json, --no-color, --project, --quiet, -q, --verbose, -v, --yesRemove a harness adapter configuration.
apothem update--dry-run, --format, --harness, --json, --no-color, --profile, --project, --quiet, -q, --verbose, -vRe-install a harness adapter configuration from the current profile.
apothem verify--format, --harness, --json, --no-color, --profile, --project, --quiet, -q, --verbose, -vVerify a harness adapter installation. Without --profile the check is structural: every managed target must be present and valid. With --profile the check additionally requires profile fidelity, so a present-but-drifted install fails verify — answering "is THIS profile faithfully installed?" rather than merely "does it exist?".

On this page