Jump to content

Using git to synchronize Alfred 4 Preferences between computers


Recommended Posts

Hi All - 

 

I know that using Dropbox to sync Alfred preferences between machines is the 'blessed' approach, but assuming that that isn't an option for me, my thought was that I could use git and 'manually' (git commit / git push / git pull) sync Alfred 4 between my machines.  High level it would look like this:

 

Set up a private remote repo on github

Via the 'Advanced' menu on each machine, change the Alfred sync folder to ~/alfred_4 (or something similar)

Add ~/alfred_4/Alfred.alfredpreferences to version control

Periodically, issue necessary commands to push/pull to/from remote repository (Or set up some automation...  Or get really 'meta' and set up an Alfred workflow that does this..).  Rinse / Repeat

 

So my questions are:

  • Has anybody tried this?  If so, is there anything you'd like to tell me?
  • Is this a terrible idea?  Besides not being officially 'blessed' methodology.  Will I get many merge conflicts or other thorns in my side?
  • Most importantly:  Should I be concerned about security?  Specifically, how is sensitive data (e.g. Credentials use to log into some service / api that are set up for a new workflow, clipboard history, browser history, etc.) stored?  ..From what I can tell, these are probably kept in *alfdb files back under ~/Library/Application Support/Alfred/Databases, and thus not under source control.  Is this always going to be the case (say, with custom workflows from Packal?) Any insight / documentation about the underlying data model that can be shared?

 

Thanks in advance for any thoughts!

 

Edited by areese801
Link to post

git should work fine, with a private repo, obviously.

 

Dropbox is recommended because it’s the only automatic sync that works reliably enough not to cause issues.

 

With manual sync, like git, it’ll be up to you to fix or avoid conflicts. I think that as long as you’re careful to sync before updating workflows or changing their settings, you should be able to mostly avoid issues. And doing a hard reset or force push shouldn’t actually break anything.

 

You’re right that Alfred itself doesn’t put anything sensitive like your clipboard history in your sync folder. Snippets and workflow settings are kept in your sync folder, however (info.plist is the official place to store them). So you might have some API keys or credentials in there, depending on what snippets you’ve made and which workflows you use (many store passwords/API key in your Keychain instead).

 

Managing the repo via a workflow sounds like a fine way to do it. No need to mess around trying to find your sync folder, as Alfred tells every workflow it runs where it is.

Link to post
  • 3 months later...
  • 8 months later...
1 hour ago, cassianomon said:

is there a specific reason for it to be a private repo on GitHub?

 

I already explained that: some workflows store sensitive data (API keys, passwords, email addresses) in the workflow's own folder, and you don't want the world to be able to see them.

 

1 hour ago, cassianomon said:

How can I check if there is sensitive data on my preferences folder?

 

Ultimately, by looking carefully through it. But don't. Just don't store it in a public repo. Even if you check it carefully now, you might forget to do it in the future after installing a new workflow. There's no particularly good reason why your Alfred preferences should be public.

Edited by deanishe
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...