Mixedbread

Sync

Intelligently sync files to your vector store with two methods of change detection: Git-based (fastest) and hash-based (most accurate). Only uploads files that have changed since the last sync, making it efficient for large document collections and perfect for CI/CD workflows.

Command

mxbai vs sync <name-or-id> <patterns...> [options]

Options

  • --strategy <strategy> - Processing strategy: fast or high_quality (default: fast)
  • --contextualization - Enable context preservation for better search results (default: false)
  • --from-git <ref> - Git reference for change detection (e.g., HEAD~1, main)
  • --dry-run - Preview changes without syncing
  • --force - Sync all files regardless of changes
  • --metadata <json> - JSON metadata to attach to synced files
  • --ci - Non-interactive mode for CI/CD environments
  • --parallel <n> - Number of concurrent operations (default: 5, range: 1-20)

Change Detection

The sync command provides two methods of change detection:

  1. Git-based (fast): Uses git diff to detect changes since a specific commit
  2. Hash-based (accurate): Compares file hashes with stored metadata

Examples

# Sync with git-based detection
mxbai vs sync "My Documents" "docs/**" --from-git HEAD~1

# Sync with hash-based detection and custom parallel processing
mxbai vs sync "My Documents" "**/*.md" --parallel 10

# Sync with high-quality processing and contextualization
mxbai vs sync "My Documents" "**/*.md" --strategy high_quality --contextualization

# Dry run to preview changes
mxbai vs sync "My Documents" "docs/**/*.md" --dry-run

# Force sync all files
mxbai vs sync "My Documents" "**/*.md" --force

# Sync and set metadata
mxbai vs sync "My Documents" "docs/**" --metadata '{"updated": "2024-01-15"}'

# Sync in CI/CD environment
mxbai vs sync "My Documents" "docs/**" --ci --from-git HEAD~1

Last updated: July 5, 2025