Skip to main content

sync Command

Sync pending artifacts to a configured cloud endpoint for cross-repo aggregation and backup.

Usage

batho sync --root /path/to/repo [options]

Flags

FlagDefaultDescription
--rootcurrent directoryPath to repository root
--dry-runoffShow what would be synced without uploading
--typeallFilter by artifact types (can specify multiple times)
--statusoffShow sync status and exit
--retry-failedoffRetry previously failed uploads
-v, --verboseoffShow detailed upload progress

Examples

# Preview pending artifacts (no upload)
batho sync --root . --dry-run

# Sync all pending artifacts
export BATHO_CLOUD_SYNC_ENABLED=true
export BATHO_CLOUD_ENDPOINT="https://sync.batho.dev/v1"
export BATHO_CLOUD_API_KEY="batho_live_xxxxx"
batho sync --root .

# Sync only specific artifact types
batho sync --root . --type snapshot --type bsg

# Show sync status summary
batho sync --root . --status

# Retry only failed artifact uploads
batho sync --root . --retry-failed

# Sync with verbose output
batho sync --root . -v

Configuration

Cloud sync requires environment variables to be set:

VariableRequiredDescription
BATHO_CLOUD_SYNC_ENABLEDYesSet to true to enable sync
BATHO_CLOUD_ENDPOINTYesCloud sync API endpoint URL
BATHO_CLOUD_API_KEYYesAPI key for authentication

Artifact Types

TypeDescription
snapshotTime Machine snapshots
patchIncremental patch operations
bsgBSG structured graph outputs
metricsIndexing performance metrics
contextGenerated context files

Use Cases

  • Backup: Automatically sync snapshots to cloud storage
  • Cross-repo analysis: Aggregate artifacts from multiple repositories
  • CI/CD: Upload build artifacts for audit trail
  • Disaster recovery: Maintain off-site backups of critical code intelligence