Skip to content
Apothem
البنية

سير عمل التثبيت

كيف تعمل apothem install وupdate وuninstall من البداية إلى النهاية.

تدفُّق التثبيت

flowchart TD
    accTitle: Apothem install workflow
    accDescr: Top-down flowchart of the apothem install command from CLI invocation through adapter lookup, profile load, adapter install call, native config write, and final apothem verify check.
    A[apothem install --harness X] --> B[Resolve adapter through registry]
    B --> C[Load and validate profile YAML<br/>before writes]
    C --> D[Adapter.install(profile, project)]
    D --> E[Write native config and support cohorts]
    E --> F[apothem verify --harness X]
    F --> G{All checks pass?}
    G -- yes --> H[Done]
    G -- no --> I[Report failures]

تدفُّق التحديث

عند apothem update --harness X:

  1. يُحمِّل ويتحقَّق من ~/.config/apothem/profile.yaml أو --profile PATH.
  2. يحلّ الـ harness المُحدَّد أو all عبر السجلّ المركزي.
  3. يتحقَّق من خطّة التحويل الكاملة قبل أول عملية كتابة.
  4. يستدعي Adapter.update(profile, project=...).
  5. يُبلِغ عن النتائج: مُنشأ، ومُحدَّث، وبلا تغيير، ومُتخطّى، وتحذير، وخطأ.

تدفُّق إلغاء التثبيت

عند apothem uninstall --harness X:

  1. يستدعي Adapter.uninstall().
  2. يزيل المُحوِّل الملفّات التي كتبها فقط؛ ويبقى ملفّ التعريف المشترك بصيغة YAML والملفّات غير المتعلِّقة التي كتبها المُشغِّل دون مساس.

حلّ النطاق

يكتب كل مُحوِّل إلى جذر تثبيته الثابت الخاص به: المنزل الشخصي للمستخدم لمُحوِّلات نطاق المستخدم، والمسار المحلّي للمشروع لمُحوِّلات نطاق المشروع. لا تكشف واجهة CLI عن راية --scope؛ وتتطلّب مُحوِّلات نطاق المشروع --project <path>. كل وجهة مُوثَّقة في site/content/docs/harnesses/<harness>.mdx.

معالجة الأخطاء

تتحقَّق عمليّات التثبيت/التحديث قبل الكتابة، وتُنشئ نسخة احتياطية من الأهداف المُطابِقة الموجودة قبل الاستبدال، وتدمج فقط الإدخالات الفرعية التي يديرها Apothem في أدلّة الاكتشاف المشتركة. ينفِّذ --dry-run التحقُّق نفسه ويعيد نتائج مُتخطّاة أو بلا تغيير دون إنشاء أيّ أدلّة أو ملفّات.

Reversibility (backup and rollback)

Every install pass is reversible. Replaced bytes are captured into the Apothem backup root and the pass is recorded in the harness ledger under a ULID install id; apothem rollback selects a recorded pass and restores those captured backups.

%% provenance: hand-authored %%
%% verified: 2026-07-06 %%
%% cross-reference: this page's Error handling section (back up before replace); /docs/cli-reference/rollback %%
flowchart LR
    accTitle: Apothem backup and rollback lifecycle
    accDescr: At install time each replaced target's prior bytes are captured into the Apothem backup root and the pass is recorded in the harness ledger under a ULID install id. The rollback command selects a recorded install pass by latest or install-id, restores every captured backup from the backup root, and appends a rollback record to the ledger.
    subgraph Install
        direction TB
        I1["Back up existing targets<br/>before replacement"] --> I2["Apothem backup root"]
        I1 --> I3["Ledger install record<br/>ULID install-id"]
    end
    subgraph Rollback
        direction TB
        R1["Select install pass<br/>--last or --install-id ULID"] --> R2["Restore captured backups<br/>from the backup root"]
        R2 --> R3["Append rollback record<br/>to the harness ledger"]
    end
    I2 -.->|captured bytes| R2
    I3 -.->|resolves pass| R1

On this page