Synced Setup for Development

Sallar Kaboli / 2016-06-23 22:45:00
Synced Setup for Development

A typ­i­cal day for me in­volves us­ing three com­put­ers: one at the of­fice, a lap­top on the go and an iMac at home. This setup gets re­ally an­noy­ing pretty quick be­cause it’s so dif­fi­cult to have the same en­vi­ron­ment in­stalled on all of them. Settings, apps, data, doc­u­ments and pretty much every­thing can be dif­firent across the ma­chines.

So I wanted to solve this prob­lem once and for all. I’m go­ing to ex­plain how I setup my en­vi­ron­ment so I can have a sim­i­lar ex­pe­ri­ence while work­ing on any of them.

Operating System

I’m us­ing ma­cOS since all ma­chines are Apple-made. As a re­sult of this, pretty much any­thing else I own is also made by Apple, so I can have a uni­fied ex­pe­ri­ence all the time. It’s not pleas­ant to think dif­fer­ently each time I use a ma­chine, so I opted for one sin­gle plat­form: Apple.

Cloud

I use Dropbox for stor­ing my doc­u­ments (screenshots, PDF docs, etc), iCloud for stor­ing App data and Amazon Cloud Drive for stor­ing my huge amount of Photos and Videos that need back­ing up (GoPro and Phone videos, DSLR pho­tos, etc).

Editor and Terminal

Now this is the most tricky part. First let me men­tion what I use:

By de­fault, none of of these tools sup­port cloud-sync­ing or any kind of sync­ing for that mat­ter, and it’s very time con­sum­ing to con­fig­ure them on each ma­chine sep­a­rately. And what if you add a pack­age or in­stall some­thing on one ma­chine? You’d want to have those changes across all ma­chines.

One so­lu­tion to this prob­lem is mov­ing all con­fig files re­lated to these tools to cloud (eg. Dropbox) and sym­link­ing the orig­i­nals. But that’s very dif­fi­cult to do man­u­ally.

Enters Mackup, a great com­mand-line tool to do that re­ally eas­ily. It copies all con­fig files to cloud (supports all ma­jor cloud plat­forms) and au­to­mat­i­cally sym­links to orig­i­nal lo­ca­tions. Supports many ap­pli­ca­tions by de­fault and it even sup­ports back­ing up it­self.

Personally, I pre­fer to pick and choose the ap­pli­ca­tions I want to have backed up to the cloud, so I cre­ated a con­fig file in this lo­ca­tion: ~/.mackup.cfg:

[storage]
engine = icloud

[applications_to_sync]
fish
fisherman
atom
bettertouchtool
mackup

Note that right now it does­n’t sup­port fish and fisherman out of the box. I have added the sup­port for both of them and sub­mit­ted a PR to Mackup repo. Please up­vote it if you find it use­ful.

Notes:

  • After in­stalling a new fish­er­man pack­age on one ma­chine, you have to run fisher up on other ma­chines to ac­tu­ally up­date and in­stall the pack­ages
  • After in­stalling Atom plu­g­ins on one ma­chine, some­times you need to run apm install on other ma­chines to have the new pack­ages across.

Other Tools

I use some other nice apps which sup­port sync­ing right out of the box: