Skip to content
Apothem
リファレンス

CLI リファレンス

Apothem CLI リファレンス — すべてのサブコマンドとフラグ。

apothem CLI は、共有プロファイルとハーネスアダプターを管理するための主要な オペレーターインターフェースです。

グローバルフラグ

フラグ説明
--versionApothem のバージョンを出力して終了します
--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 に失敗します。 特定のプロファイルが忠実にインストールされていることを確認するには、これを使用してください。

終了コードは、ハーネスが検証された場合(--profile を指定した場合は、さらにそのプロファイルに 忠実である場合)は 0、ターゲットが欠落しているか無効な場合、または --profile が指定されて インストールがドリフトしている場合は 1 です。

apothem status

登録済みのすべてのハーネスについて、インストール、検証、ドリフトの状態を報告します。

apothem status [--profile PATH] [--project PATH]
オプション説明
--profile PATHドリフトのベースラインとして使用する共有プロファイル。デフォルトのプロファイルを読み取れない場合は、スイープを中断するのではなく、ドリフトを unknown に格下げします。
--project PATHプロジェクトスコープのハーネス向けのプロジェクトルート。指定しない場合、それらのハーネスは needs-project を報告します。

各行は installed フラグと verified フラグを組み合わせており、この 2 つを合わせたものが ドリフト状態になります。

状態意味
absentApothem はこのハーネスにインストールしていません。
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>1 つのアダプターの名前、インストール状態、出力パスを出力します。

apothem doctor

Apothem インストールのシステム診断を実行します。

apothem doctor

Apothem のバージョン、Python インタープリター、プラットフォーム、解決済みのプロファイルパス、およびハーネスごとのインストール状態の表を出力します。いずれかのチェックが失敗すると、終了コードは 1 になります。失敗の原因となるのは、無効なプロファイル、検証に通らないインストール済みのハーネス、起動できない登録済みのフックコマンド、読み込みも確認もできないアダプター、読み取れない台帳のいずれかです。インストールされていないハーネスは報告されますが、失敗にはなりません。情報提供の注記は、終了コードを変えません。

生成されたコマンドとフラグのリファレンス

CommandFlagsDescription
apothem backups prune--dry-run, --format, --harness, --json, --keep, --no-color, --quiet, -q, --verbose, -vDelete 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, -vPreview the pending configuration changes for a single harness.
apothem doctor--format, --json, --no-color, --project, --quiet, -q, --verbose, -vCheck 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, -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. 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, --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