OptionalcollectionsDeclarative collection configuration for composition axes. Key is collection property name (e.g. "Lines", "Payments").
OptionaldefaultsDefault field values applied to all records in this directory
OptionalemitWhether to emit __mj_sync_notes in record files during push operations. When enabled, resolution information for
Name of the entity this directory contains
OptionalfileGlob pattern for finding data files (defaults to "*.json")
OptionalignoreDirectories to ignore during processing Can be directory names or glob patterns relative to the location of the .mj-sync.json file Cumulative: subdirectories inherit and add to parent ignoreDirectories Examples: ["output", "examples", "temp"]
OptionalpullPull command specific configuration
OptionalappendRecordsToExistingFile?: booleanWhether to append multiple new records to a single file
OptionalbackupBeforeUpdate?: booleanCreate backup files before updating existing files
OptionalbackupDirectory?: stringDirectory name for backup files (defaults to ".backups")
OptionalcreateNewFileIfNotFound?: booleanWhether to create new files for records not found locally
OptionalexcludeFields?: string[]Fields to exclude from the pulled data (e.g., ["TemplateID"])
OptionalexternalizeFields?: Fields to externalize to separate files with optional configuration
OptionalfilePattern?: stringGlob pattern for finding existing files to update (defaults to filePattern)
Optionalfilter?: stringSQL filter to apply when pulling records from database
OptionalignoreNullFields?: booleanWhether to ignore null field values during pull (defaults to false)
OptionalignoreVirtualFields?: booleanWhether to ignore virtual fields during pull (defaults to false)
OptionallookupFields?: { [fieldName: string]: { entity: string; field: string } }Foreign key fields to convert to
OptionalmergeStrategy?: "overwrite" | "merge" | "skip"Strategy for merging updates: "overwrite" | "merge" | "skip"
OptionalnewFileName?: stringFilename for new records when createNewFileIfNotFound is true
OptionalpreserveFields?: string[]Fields to preserve during updates (never overwrite these)
OptionalrelatedEntities?: Record<string, RelatedEntityConfig>Configuration for pulling related entities
OptionalupdateExistingRecords?: booleanWhether to update existing records found in local files
OptionalpushPush-specific options for this entity directory. Applied only on mj sync push
(not pull). Add new per-save / per-entity push knobs here rather than as global
CLI flags so each entity can opt in independently.
OptionalskipGeoCoding?: booleanMaps to EntitySaveOptions.SkipGeoCoding so sample data with pre-filled
lat/lng (or display-only geo entities) does not call the geocoding provider.
Per-entity, not a global CLI kill switch.
OptionalwriteSyncMetadata?: booleanWhen false, skips creating or updating sync metadata blocks (record.sync)
on records pushed from this directory. Used by decision metadata directories
so decision files never carry sync blocks. Defaults to true.
Entity-specific configuration
Defines settings for a specific entity type within a directory. Stored in .mj-sync.json files that contain an "entity" field. Supports defaults, file patterns, and related entity configuration.