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
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.