memaxdocs
CLI Reference

memax sync

Sync a directory with your Memax hub. Watches for changes and keeps your hub up to date.

One-way sync from a local directory to your Memax hub. Files are pushed on first run and updated when they change.

Usage

memax sync <directory> [options]

Options

FlagDescriptionDefault
--watchWatch for changes after initial sync
--include <glob>Only sync matching files**/*.md
--exclude <glob>Skip matching files
--boundary <level>Default boundary for synced filesprivate
--hub <id>Target hubDefault hub
--dry-runShow what would be synced

Examples

Sync a docs directory

memax sync ./docs
Syncing ./docs → personal hub
  ✓ docs/architecture.md (new)
  ✓ docs/auth.md (new)
  ✓ docs/deploy.md (new)
  · docs/draft.md (excluded: matches .gitignore)
3 files synced, 1 excluded

Watch mode

memax sync ./docs --watch

The CLI watches for file changes and syncs automatically. Useful during active development.

Selective sync

# Only markdown files
memax sync ./docs --include "**/*.md"

# Exclude drafts
memax sync ./docs --exclude "**/draft-*"

Behavior

  • Deduplication — files are tracked by content hash. Unchanged files are skipped.
  • Deletions — files removed locally are not automatically deleted from Memax. Use memax delete for explicit removal.
  • Gitignore.gitignore patterns are respected by default.
  • Binary files — skipped automatically (images, compiled files, etc.)