Sync Rules

In addition to exporting and importing rules (each of which is a one-time procedure), you can sync all the rules for a given folder to an external file, such that whenever your rules change in Hazel, that file changes—and whenever that file changes, Hazel updates its rules. Syncing your rules to an external file enables you to share them with other user accounts on your Mac (as long as the file is stored in a folder all users can access) or with other Macs (if the file is stored in a location all the Macs can access, such as Dropbox, iCloud Drive, or a network server). You can even use this mechanism to sync the same set of rules between two different folders in a single copy of Hazel.

When syncing rules, the following considerations apply:

  • Hazel can sync only the complete set of rules for any given folder, not individual rules.

  • Hazel does not sync rules’ enabled/disabled state. Thus, you could have the same set of rules on two Macs but have a different combination of them enabled on each machine.

  • Newly added rules are initially disabled in all other instances of Hazel (other user accounts or other Macs) using the synced file—just as if they were moved or copied. You must manually enable these rules to use them in the other locations.

  • Syncing cannot  merge  two sets of rules. So, if you sync rules from Mac A to File A, and then tell Mac B to use File A for its rules, Hazel will  overwrite  the rules Mac B was already using for that folder. Therefore, if you expect to sync the rules for any folder between Macs or users, it’s best to do so before you set up any rules in the folder in question in the second instance (user account or Mac) of Hazel.

  • Hazel also keeps a local cache of your rules, enabling you to continue running Hazel even if the synced rules file is temporarily inaccessible.

Configuring rule sync is a two-step process (for each folder you want to sync). First you set up a sync file. Then, for each additional instance of Hazel you want to sync, you set up a folder to use that file for its rules.

To set up a sync file:

  • Select the folder whose rules you want to sync.

  • From the More   menu, choose “Rule Sync Settings.”

  • In the dialog that appears, click “Set up new sync file.”

  • Select the location (such as your Dropbox folder or iCloud Drive) where you want to save the synced rules, and edit the name if you like. Click “Save.”

  • Click “Done.”

A sync   icon appears next to the folder name to indicate that its rules are being synced.

To sync rules with another folder:

  • In another instance of Hazel (another user account on the same Mac, or a different Mac), make sure you have access to the location where the sync file you created above was stored.

  • From the More   menu, choose “Rule Sync Settings.”

  • In the dialog that appears, click “Use existing sync file.” Read the warning that the current rules for that folder will be overwritten, and if you’re sure that’s what you want to do, click Continue.

  • Select the sync file you set up earlier and click “Open.”

  • Click “Done.”

A sync   icon appears next to the folder name to indicate that its rules are being synced, and the rules from the sync file appear in the “Rules” list for that folder.

Any changes to the synced rules that you make in one instance of Hazel will now apply to the other as well.

Note:   If an error occurs in syncing, reading, or writing the rules, an error icon   appears. Hover over this icon with your pointer to see details about the error.

To stop syncing rules with another folder:

  • Select the folder whose rules you want to stop syncing.

  • From the More   menu, choose “Rule Sync Settings.”

  • In the dialog that appears, click the X   icon next to the rule file.

  • Click “Done.”

The rules for this folder are now detached and will no longer sync.

SEE ALSO

Import Rules

Export Rules

Enable, Disable, or Pause Rules