操作指南
编辑配置文件
更改共享配置文件并为每个已安装的工具重新物化。
目标:更改共享配置文件中的某个值,并将其推送到你已安装的每个工具。
前置条件
apothemCLI 在你的PATH上(或采用自包含形式:加前缀PYTHONPATH="$HOME/.apothem/src"并运行python -m apothem,或使用npx @ahmed-g-gad/apothem)。- 位于
~/.config/apothem/profile.yaml的配置文件。若缺失,可用apothem profile init创建一份。
配置文件结构
配置文件是单个 YAML 文档。其顶层键为:
identity(必填)——name,加上可选的role、email、website、github。preferences——language、style(concise/verbose/balanced)、formatter、test_framework。rules—— 与有能力的工具共享的额外规则字符串列表。seriousness——EXPLORING、PERSONAL_USE、SHARED、PUBLIC_LAUNCH之一。enforcement—— 选择性启用的开关(sprints、agent_teams、multitasking、continuous_execution、learning_loop),每个标志默认关闭。harnesses—— 以工具 id 为键的各工具覆盖项。exclude_harnesses—— 被批量命令(--harness all)跳过的工具 id。
步骤
-
检查当前配置文件:
apothem profile show -
编辑它。在系统编辑器中打开:
apothem profile edit或从命令行设置单个点分键。该值按字面存储(
true/false以及显式的[..]/{..}输入除外,这些会被解析),并在写入前根据模式进行验证 —— 无效的设置会被 拒绝,磁盘上的配置文件保持不变:apothem profile set seriousness SHARED apothem profile set identity.name "Ada Lovelace" -
重新物化各工具,使更改到达它们的原生配置。对于用户作用域的工具:
apothem update --harness claude-code对于项目作用域的工具,传入项目根目录;用
all刷新每个已安装的工具:apothem update --harness cursor --project /path/to/project apothem update --harness all --project /path/to/project
验证
apothem profile show
apothem verify --harness allprofile show 反映你的编辑;verify 确认已物化的配置与更新后的
配置文件相符。