Homebrew boasts that it "installs the stuff you need that Apple (or your Linux system) didn't" install by default. $ bash homebrew_installer.sh Manage your command-line utilities with brew $ more homebrew_installer.sh # review the script until you feel comfortable If you prefer to be more cautious, you can curl the file, then run it manually after reviewing it: $ curl -fsSL -output homebrew_installer.sh This command executes the installer script provided by the Homebrew team. If you're on a Mac and don't already have Homebrew, you can install it with: $ /bin/bash -c "$(curl -fsSL )" It provides an incredibly smooth and straightforward experience for anyone familiar with the command line, and it's a good way to learn the command line if you're new to it. Homebrew fills the void as the de facto package manager for macOS (and as another option for Linux). There is no default package manager for Mac users, while Linux users have many options-from the familiar yum and apt to the modern choice of Flatpak. One place where the Mac operating system, macOS, has always been behind Linux is in package management. Instead of pointing and clicking to manually manage my applications and utilities, I prefer to use package management software to install, update, and remove unneeded software. That's it! Everything will be ready for us and we can configure our ~/.zshrc file as required.In my quest to "automate all the things," I have been on a journey to manage my Mac laptop as the code it inherently is. Thankfully we can install it with one line thanks to Oh My ZSH curl -L | sh Once you've ditched Bash for ZSH you'll never want to go back (trust me, it's worth it for the autocomplete alone). Of course Vagrant is one of those packages, so now all I need to do is pull Homestead or Vaprobash down and I'm back with my familiar environment in 5 minutes. It'll install all my essential tools like PHP and Node, grab Cask for me and then install my OS X apps with one single line. With Homebrew and the bundle pacakge installed I just clone my dotfiles repo down and run the brew bundle command. Here's my completed Brewfile that I keep safely in my dotfiles repo: # BREWWWWW ![]() Once installed we can create our Brewfile! You can pop this anywhere you like, you'll just need to make sure you run the brew bundle command later from the same directory. We can install the Bundle package in by running another command in a terminal to fetch it for us. Of course we could just write a bash script to run the commands for us but the brewfile just feels a little more elegant to me.Ī brewfile is very similar to Ruby's Gemfile that's used to manage dependencies and I guess it could also be compared to the composer.json file in PHP. Thankfully there's a package called Bundle that will allow us to use a Brewfile to run several of our homebrew commands in one go. Homebrew is great but it could be quicker. You might want to run the commands with the -appdir flag as otherwise they'll be installed in /opt/homebrew-cask/Caskroom and symlinked to your ~/Applications directory. Now we can run things like this: brew cask install google-chromeīasically any app that isn't reliant on the App Store and is remotely popular will be available as a formula for you to take advantage of. To install it, run the following on your command line. It's so cool and quick, I couldn't believe it when Chris Rowe told me about it. Homebrew CaskĪs an extension to Homebrew, Cask was created to allow the quick installation of Mac apps. ![]() Once it's all installed we can run things like brew install mysql to download, compile and install various packages.įor full documentation on Homebrew, check out their Github project. For example, we're probably going to want to install OpenSSL, a version of PHP with MCrypt baked in, and some form of database system like MySQL or Postgres. Homebrew allows us to install all the packages Apple missed out. On first run it'll probably ask you to install Xcode's command line tools. ![]() Installing it is just a one-line command in the terminal. Homebrew is one of the first things I always chuck on a new Mac. I thought this would be the usual manual process but thanks to Homebrew and Homebrew Cask it was all be automated. I've just taken proud ownership of a shiny new iMac which meant I had the (dis)pleasure of downloading all of my applications and setting up my development environment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |