Справочник по CLI
Справочник по CLI Apothem — все подкоманды и флаги.
CLI apothem — это основной интерфейс оператора для управления общим профилем и
адаптерами окружений.
Глобальные флаги
| Флаг | Описание |
|---|---|
--version | Выводит версию Apothem и завершает работу |
--help | Выводит справку по команде |
Подкоманды
apothem install
Устанавливает адаптер окружения из общего профиля.
apothem install --harness <name|all> [--profile PATH] [--project PATH] [--dry-run] [--clean|--fresh] [--yes]| Параметр | Описание |
|---|---|
--harness <name> | Имя адаптера окружения (см. канонические значения ниже). Обязательный. |
--profile PATH | Путь к YAML общего профиля. По умолчанию ~/.config/apothem/profile.yaml. |
--project PATH | Корень проекта для окружений с областью проекта. |
--dry-run | Предпросмотр установки без записи файлов. |
--clean, --fresh | Включаемая по запросу установка с чистого листа: перед установкой создаёт резервную копию предыдущего состояния установки (~/.claude, ~/.codex, ~/.agents, ~/.config/apothem) и удаляет его. |
--yes | Пропускает подтверждение для каждой цели при удалении с чистого листа (обязателен для неинтерактивных запусков с --clean). |
Канонические значения --harness:
antigravity
claude-code
codebuddy
codex
cursor
gemini-cli
github-copilot
glm
hermes
kimi-code
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; обновляйте движок через тот канал, которым вы его установили (поток
/plugin, npx или скрипты установщика и обновления), как описано в разделе
Обновление.
apothem uninstall
Удаляет нативную конфигурацию адаптера окружения.
apothem uninstall --harness <name|all> [--project PATH] [--yes]| Параметр | Описание |
|---|---|
--harness <name> | Имя адаптера окружения. Обязательный. |
--project PATH | Корень проекта для окружений с областью проекта. |
--yes | Пропускает запрос подтверждения. |
apothem verify
Проверяет, что управляемые цели адаптера окружения присутствуют и корректны.
apothem verify --harness <name|all> [--profile PATH] [--project PATH]| Параметр | Описание |
|---|---|
--harness <name> | Имя адаптера окружения или all. Обязательный. |
--profile PATH | YAML общего профиля, на соответствие которому выполняется проверка. Без него проверка чисто структурная. |
--project PATH | Корень проекта для окружений с областью проекта. |
Без --profile проверка структурная: каждая управляемая цель должна
присутствовать и быть корректной. С --profile она дополнительно требует
соответствия профилю, поэтому установка, которая существует, но разошлась с
этим профилем, не проходит verify — используйте этот режим, чтобы подтвердить,
что конкретный профиль установлен точно.
Код выхода равен 0, когда окружение проверено (и, с --profile, соответствует
профилю), и 1, когда цель отсутствует или некорректна либо когда передан
--profile и установка разошлась с профилем.
apothem status
Сообщает о состоянии установки, проверки и дрейфа для каждого зарегистрированного окружения.
apothem status [--profile PATH] [--project PATH]| Параметр | Описание |
|---|---|
--profile PATH | Общий профиль, используемый как базовая линия для дрейфа. Нечитаемый профиль по умолчанию понижает дрейф до unknown, а не прерывает проход. |
--project PATH | Корень проекта для окружений с областью проекта. Без него такие окружения сообщают needs-project. |
Каждая строка сопоставляет флаг installed с флагом verified, и вместе они
дают состояние дрейфа:
| Состояние | Значение |
|---|---|
absent | Apothem не выполнял установку в это окружение. |
in-sync | Установлено и соответствует базовой линии профиля. |
drift | Установлено, но больше не соответствует — исправьте с помощью apothem update. |
unknown | Установлено, но базовый профиль не удалось прочитать. |
needs-project | Окружение с областью проекта было запрошено в отчёте без --project, поэтому его цель не может быть определена. |
installed отвечает на вопрос «устанавливал ли сюда Apothem?», а не «есть ли
это окружение на машине?». Флаг определяется по собственным артефактам Apothem —
управляемому блоку внутри якоря инструкций и содержимому в принадлежащем
Apothem поддереве .apothem/ — и никогда по принадлежащему вендору файлу,
который окружение записывает для себя. Окружение, каталог конфигурации которого
существует, но которого Apothem никогда не касался, сообщает absent, а
окружение, которое было удалено, сообщает absent, даже если опустевшие
каталоги остаются.
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 | Создаёт минимальный каркас профиля, валидный по схеме. |
profile show | Выводит разрешённый профиль в JSON в stdout. С --json документ начинается с schema_version. |
profile set <key> <value> | Задаёт поле профиля. Значение сохраняется как литеральная строка: простые слова не приводятся к другим типам, поэтому no остаётся "no", а 1.0 остаётся строкой. Исключения — true/false и явный ввод списков и отображений [...] / {...}. Собранный профиль проверяется по схеме до записи. |
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, платформу, путь к разрешённому профилю и таблицу статуса установки по каждому окружению. Код выхода равен 1, если не проходит какая-либо проверка: невалидный профиль, установленное окружение, которое не проходит проверку, зарегистрированная команда хука, которая не может запуститься, адаптер, который не удаётся загрузить или опросить, либо нечитаемый журнал. Окружение, которое не установлено, отмечается в отчёте и не считается сбоем; информационные примечания не меняют код выхода.
Сгенерированный справочник команд и флагов
| Command | Flags | Description |
|---|---|---|
apothem backups prune | --dry-run, --format, --harness, --json, --keep, --no-color, --quiet, -q, --verbose, -v | Delete backup sets and install records beyond the newest N per harness. Keeps the newest N backup sets under ~/.apothem/backups/ for each selected harness, and the newest N install records per install root in its ledger under ~/.apothem/state/. A backup set that a kept record, or the latest install record of any install root, still references is never deleted, so rollback of the latest install still restores. |
apothem completion | — | Print 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, -v | Preview the pending configuration changes for a single harness. |
apothem doctor | --format, --json, --no-color, --project, --quiet, -q, --verbose, -v | Check the installed harnesses and the shared profile; exit 1 on any failure. Reports the engine version, Python, and platform; validates a present shared profile against the packaged schema; and, for every installed harness, runs the adapter's verify and starts each hook command the install registered with a no-op payload. A harness that is not installed is reported but is not a failure, so a machine with one healthy harness passes. Project-scope harnesses are checked when --project names their root. |
apothem harnesses list | --format, --json, --no-color, --quiet, -q, --verbose, -v | List all registered harness adapters. |
apothem harnesses show | --format, --json, --no-color, --quiet, -q, --verbose, -v | Show details for a specific harness adapter. |
apothem install | --clean, --fresh, --dry-run, --format, --harness, --json, --no-color, --profile, --project, --quiet, -q, --verbose, -v, --yes | Install a harness adapter configuration. |
apothem migrate-workspace | --dry-run, --format, --json, --no-color, --project, --quiet, -q, --verbose, -v | Migrate 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, -v | Open the shared profile in the system editor. |
apothem profile init | --force, --format, --json, --no-color, --profile, --quiet, -q, --verbose, -v | Create a schema-valid shared profile scaffold. |
apothem profile set | --format, --json, --no-color, --profile, --quiet, -q, --verbose, -v | Set 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.<harness>.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 [...]/{...} 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, -v | Display the current shared profile. |
apothem quickstart | --format, --harness, --json, --no-color, --profile, --project, --quiet, -q, --verbose, -v, --yes | Guided 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. Without --harness it asks which harness to install, so the first run writes one harness's configuration rather than all of them; all is an explicit choice. A run that cannot ask fails with a usage error before anything is written. |
apothem rollback | --format, --harness, --install-id, --json, --last, --no-color, --project, --quiet, -q, --verbose, -v, --yes | Restore a harness to the state before its recorded install. |
apothem status | --format, --json, --no-color, --profile, --project, --quiet, -q, --verbose, -v | Report install, verify, and drift state for every registered harness. |
apothem uninstall | --format, --harness, --json, --no-color, --project, --quiet, -q, --verbose, -v, --yes | Remove a harness adapter configuration. |
apothem update | --dry-run, --format, --harness, --json, --no-color, --profile, --project, --quiet, -q, --verbose, -v | Re-install a harness adapter configuration from the current profile. |
apothem verify | --format, --harness, --json, --no-color, --profile, --project, --quiet, -q, --verbose, -v | Verify 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?". |