Run a playbook headless

How-to

Run a playbook headless

For CI, cron, and long-running jobs. Aarmos CLI software is not publicly distributed; the commands below are reference examples, not instructions you can run today.

  1. 1

    Write a JSON playbook. Only steps with autoApply: true execute unattended; the rest dry-run and log as needs-approval.

  2. 2

    Preview Decisions first — no side effects, prints per-step risk and whether it would apply.

    aarmos-bridge simulate --playbook path.json --json
  3. 3

    Optional signing.

    aarmos-bridge playbook keygen
    aarmos-bridge playbook sign --playbook path.json --key .aarmos/keys/playbook.key.pem
    # Enforce at runtime:
    aarmos-bridge run --playbook path.json --enforce-signatures --trusted-pubkey <b64u>
  4. 4

    Run the loop. Every action appends a hash-chained receipt to a JSONL file; a --kill-switch file present at tick halts the loop; the rolling ceiling caps applied actions per hour.

    aarmos-bridge run --playbook path.json \
      --receipts .aarmos/receipts.jsonl \
      --kill-switch .aarmos/stop \
      --max-per-hour 60
  5. 5

    Destructive verbs (kubectl delete/drain, git push --force, Jira DELETE /issue/{id}) always force approval unless the step sets acknowledgeDestructive: true on a signed playbook. Runtime enforcement, not just lint.

  6. 6

    Export evidence for auditors. Re-compute rootHash and check the signature offline.

    aarmos-bridge attest --since 24h --sign-key <pem> --out audit.attest.json
    aarmos-bridge attest verify --file audit.attest.json

Related