Mackup inspired tool to sync application settings, powered by unison
unisync helps you keep your application settings (plists, config folders, licenses) synchronized across machines. It does this by using unison
to diff files, then copies them into a synced folder of your choice
unisync does not use symlinks like mackup. So instead of symlinking things into Dropbox/iCloud, unisync uses unison
for diffing and copies the actual files.
Hint: unisync
actually embeds the entire mackup app library (with exception of xdg_configuration_files
for now), so any app that works with mackup should also work with unisync.
I like unison and ran into issues where symlinks randomly broke without me noticing it. I wanted the file content to be identical no matter where it is, including the actual application settings folder.
The sync folder in the cloud acts as a backup and source for diffing, but the apps would continue to work as is if those were deleted.
Install unison
and make sure it's in your path. On mac you can do:
brew install unison
Then
go install github.com/dvcrn/unisync@latest
Create a config file in ~/.config/unisync/unisync.yaml:
targetPath: ~/.config/appconfigsync
preferDirection: target
apps:
- dash
- raycast
preferDirection
specifies which direction should get picked on conflict. Set it totarget
to have the targetPath take precedence (aka, your dropbox folder). Set it tolocal
to say that your local apps should take prededence and override the sync store. Defaults totarget
Commands:
sync - run sync between all enabled apps
init-from-target - run/force initial sync, targetPath -> appPath
init-from-local - run/force initial sync, local -> targetPath
list - list available apps
info <appname> - show details of an app
LaunchAgent management
install-agent - installs LaunchAgent to automatically run in the background
remove-agent - unload and remove agent
The initial sync options force one way. For example if you want your local configuration to be overwritten on initial sync with whatever you have in your storage folder, run init-from-target
unisync
comes with a LaunchAgent you can install, that will run unisync
every 10 minutes:
unisync install-agent
This will add and load a new LaunchAgent config into Library/LaunchAgents/sh.d.unisync.plist
Check out apps/
in this repository. Apps are simple yaml files that explain what has to be copied:
name: Raycast
friendlyName: raycast
files:
- basePath: ~/Library/Preferences/
includedFiles:
- com.raycast.macos.plist
ignoredFiles:
- Name somethingToIgnore.plist
basePath
is the path that contains the files to sync. It can be~/Library/Preferences/
when the file in question is just a preferences file, but also something like~/Library/Application Support/Dash
includedFiles
are all files within basePath to processignoredFiles
is the opposite ofincludedFiles
- stuff you don't want to get processed. Has to be Name, Path, BelowPath or Regex
There is a handy make command that you can use, that'll update the git submodule, then run helper script
make apps/mackup
- Apps that are currently running will override the config files usually when they're quit
- Mackup apps haven't been thorougly tested yet. Stuff could not working as intended
A huge chunk of the apps is generated off the mackup app library, which in turn is thanks to a huge number of contributors. Thanks to all of you!