Brew 'mas' / brew install mas mas '1Password' Phil Pirozhkov: I find it really hard maintaining the up to date list of formulae by hand and came up with the following: Show installed formulae that are not dependencies of another installed formula: brew leaves !.formulae brew cask list !.casks Install.
- Install command: brew install -cask 1password-cli.
- Run brew release to create a new draft release. For major or minor version bumps, pass -major or -minor, respectively. Publish the draft release on GitHub. Twitter account or tweet it yourself and retweet it with the @MacHomebrew Twitter account (credentials are in 1Password).
brew cask install keka |
brew cask install google-chrome |
brew cask install 1password |
brew cask install dropbox |
#sync 1Password vault from Dropbox and sign into all your accounts. |
#I use Firefox for app testing |
brew cask install firefox |
#Spectacle is a great app for window management with hot keys |
brew cask install spectacle |
#Flux changes the dimness and color of your screen to adjust to the time of day |
brew cask install flux |
brew cask install transmit |
#dev stuff |
brew install git |
#switched away from RVM and digging chruby |
brew install chruby |
brew install ruby-install |
ruby-install ruby |
#I use all three for different languages |
brew cask install sublime-text |
brew cask install atom |
brew cask install textmate |
#DB stuff |
brew install mysql |
brew cask install sequel-pro |
sudo gem update — system |
My laptop was running a bit slow and there was an OS upgrade that I’ve been postponing for quite some time. So, on one rainy Friday afternoon, I decided to get my hands dirty and do a clean install of macOS Sierra. And why not automate it so I don’t have to think about it next time?
One of the benefits is that my team mates can use chunks of the configuration that are relevant to our work and use it for themselves.
Let’s have a look at the tools that we will use.
Dotfiles
It’s a bunch of configuration files and directories that are in your home directory. For example vim uses .vimrc
or a git uses .gitconfig
. You want to bring them with you from your old machine.
Some people store them as a git repository but I just chuck them on Dropbox. Make sure that you are not revealing any sensitive files like your private SSH keys or infrastructure setup.
When you setup your new machine you create symlinks to the ones that you like to use. It can get pretty fancy or you can keep it simple with ln -s
.
Brew
Homebrew is a package manager for macOS. And you can create your own bundles to set up whole environment.
Apart from that there is an extension for installing desktop applications — cask. You can search for the recipes with the following commands.
When you find the mix of applications you bundle them together into a Brewfile
.
I like to keep my Brewfile
in my Dropbox folder with the rest of the dotfiles. Now with the file you can run brew bundle
and it installs everything for you. Easy.
Everything together
We have our configuration with dotfiles and we can install all the necessary applications with brew and cask. How about putting everything into one script that we can run and leave the computer do its thing?
I created an install.sh
file that I keep with the rest of the files.
Firstly, it installs XCode command line tools — if you need to install the full version you might need to do that through AppStore. I haven’t found any way around that yet.
After installing XCode the script takes care of the dotfiles and links them into your home directory. And when those are sorted it starts the brew magic.
There is a few custom commands afterward — installing plugin managers for tmux and vim and installing ruby with rbenv. You can also use terminal to customize macOS behaviour or do other things that you would normally do by hand.
Conclusion
And with that a fresh OS install is not a pain anymore. After finishing the installation and encrypting your disk you copy your backed up Dropbox folder into your home directory, run
and you can go for a surf, come back and have your computer ready. Unless you need to compile Qt with Webkit. Then you might go for two surf sessions at least.
Victor Maslov aka Nakilon: My relevant gist
Gabriel Filipe Gizotti: fresh helped me a lot
ege: Brewfile also let you add apps from Mac App Store thanks to github.com/mas-cli/mas. But doesn’t work with 2FA-enabled account yet. I hope devs find a solution.
Phil Pirozhkov: I find it really hard maintaining the up to date list of formulae by hand and came up with the following:
Brew 1password Reviews
Show installed formulae that are not dependencies of another installed formula:
Install:
Brew 1password App
Would you like to get top 5 links on Programming every Monday?
Sign up to Programming Digest and stay up to date!