# engram sync hydrate-knowledge

Source: https://usecns.dev/engram-cli-sync-hydrate-knowledge/

[Start here](https://usecns.dev/manual-engram/)
[CLI commands](https://usecns.dev/commands-engram/)
[Configuration & integration](https://usecns.dev/engram-topics/)

Part of [`engram sync`](https://usecns.dev/engram-cli-sync/). See that entry for shared arguments and usage.

| Option | Meaning / default |
| --- | --- |
| `--knowledge-dir DIR`, `--vault-path DIR` | Local directory (alias), then `ENGRAM_KNOWLEDGE_DIR`; takes precedence over a hub URL. |
| `--hub-url URL` | Remote source when no directory, fallback `ENGRAM_HUB_URL`. |
| `--token TOKEN` | Remote bearer, fallback `ENGRAM_HUB_TOKEN`. |
| `--compartment ID` | Select a compartment; default all selected source compartments. |
| `--ring-filter RING` | Only exact M0/M2 hydration targets accepted; default manifest rings or M2 for a bare directory. |
| `--ring-id ID` | Override target ID; otherwise OTE mount per ring. Compartment IDs never supply tenant ring IDs. |
| `--frontmatter-map PATH` | Strict mapping, overridden by compartment mapping. |
| `--check` | Verify M0 compartment attestations without applying hydration; store opening/housekeeping is still possible. |
| `--ote PATH`, `--db PATH` | Shared configuration. |

M0 needs signed manifest/page/map bytes and a configured anchor; bare-directory M0 fails. Invalid manifest/ring errors precede page writes; page-level errors can leave earlier pages applied. Exit 0 means pages produced sections (including unchanged content); 3 means absent/vacuous, not necessarily no mutation; 1 failure. Unchanged content does not supersede; restored retired content may reactivate; missing/re-keyed pages are not automatically retired. Local `keys.json` can explicitly retire keys even on a vacuous run: see [exchange formats](https://usecns.dev/engram-topic-public-exchange-formats/). No endorsement is applied by hydration.

See [CLI conventions](https://usecns.dev/engram-cli-usage/) for shared configuration and exit behavior, or [browse all commands](https://usecns.dev/commands-engram/).