Configuration
By default, ovm.json config file lives in current home directory and contains configuration for vault core and plugins. ovm config init can be used to create a new config file with default settings.
Specifications
Plugins
Define plugins in your config file with the following structure:
{
"plugins": [
{
"id": "colored-tags",
"version": "latest"
},
{
"id": "copilot",
"version": "latest"
},
{
"id": "dataview",
"version": "latest"
}
]
}Versioning of plugins follows Semantic Versioning and Obsidian Plugin Guidelines.
latestis a valid version specifier that always resolves to the latest compatible version.
Sync
Define synchronization entries using sync to automatically sync core settings, plugin configurations, and custom files across vaults of Obsidian. ovm vault sync and ovm plugins sync in commands can be used to initiate the synchronization process.
{
"plugins": [
{ "id": "dataview", "version": "latest" },
{ "id": "note-toolbar", "version": "latest" }
],
"sync": {
"files": [
{
"source": "./configs/appearance.json",
"target": "appearance.json",
"type": "core",
"mergeStrategy": "replace"
},
{
"source": "./configs/dataview-settings.json",
"target": "data.json",
"type": "plugin",
"pluginId": "dataview",
"mergeStrategy": "smart",
"include": ["enableInlineDataview", "defaultDateFormat"],
"onlyIfInstalled": true
},
{
"source": "./configs/custom-hotkeys.json",
"target": "hotkeys.json",
"type": "custom",
"vaults": ["Work", "Personal"],
"backup": true
}
]
}
}Options
Entry Properties
source(required): Path to the source configuration file (relative to config directory or absolute)target(required): Target file path (relative to vault's.obsidiandirectory)type(required): Type of configuration -core,plugin,custom, orallpluginId(optional): For plugin configs, the plugin ID (required when type isplugin)mergeStrategy(optional): How to merge configs -replace,merge, orsmart(default:replace)vaults(optional): Array of vault names to target (if empty, applies to all selected vaults)onlyIfInstalled(optional): For plugin configs, only sync if plugin is installed (default:true)include(optional): Array of JSON keys to include when usingsmartmerge strategyexclude(optional): Array of JSON keys to exclude when usingsmartmerge strategybackup(optional): Create.bakbackup if destination exists (default: inherits from command flags)overwrite(optional): Overwrite existing files without prompting (default: inherits from command flags)
Merge Strategies
replace: Completely replace the target file with source contentmerge: Simple shallow merge of JSON objects (source overwrites target keys)smart: Deep merge with support for include/exclude filters
Configuration Types
core: Obsidian core settings (placed directly in.obsidian/)plugin: Plugin-specific configurations (placed in.obsidian/plugins/<pluginId>/)custom: Custom files (placed according to target path within.obsidian/)all: Matches all configuration types (used for filtering)
Default Configuration
{
"plugins": [],
"sync": {
"files": []
}
}Last updated