Document Sync
Document sync keeps notes and docs synchronized with Postgram entities.
What this page covers
Section titled “What this page covers”How to run directory sync, how the manifest protocol works, and what to expect on large repositories.
Core workflow
Section titled “Core workflow”- Run sync against a directory:
pgm sync ~/Documents/personal-notes- Optionally set repository name:
pgm sync ~/Documents/cf-notes --repo cf-notes --quiet-
Postgram sync protocol:
POST /api/sync/diffto compare file hashes,- batched
POST /api/sync/upload, POST /api/sync/finalizeto archive stale documents.
-
Check repository state:
curl http://127.0.0.1:3100/api/sync/status/personal-notes \ -H "Authorization: Bearer $PGM_API_KEY"- The CLI walks
.mdfiles recursively and computes SHA-256 hashes locally. - Batches are capped to protect large payload size.
- Use
--dry-runfor safe validation before upload.