Continuing from #165 where I wrote about a shortcut command to copy and paste from the shell, we are going to talk about another command line tool that is not specific to iOS development, but nevertheless, important to iOS developer — Homebrew.
Prior to Homebrew, there are several other ways which command line tools  can be installed on OS X. This range from downloading the source and building it yourself to package managers that are similar to Homebrew, such as MacPorts and Fink.
Homebrew is a package manager too, but it is newer (since 2009), and has more momentum than MacPorts and Fink. Unless you have specific needs that make Homebrew unsuitable, go with Homebrew.
There's several ways to install Homebrew. The official method downloads and evaluate this script. While recommended as the official way to install Homebrew, it is always good to decide for yourself if you trust the source.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
To install a package:
brew install wget
To upgrade a package:
brew upgrade wget
To update brew itself:
If you find that brew doesn't seem to work correctly, run
brew update twice and
Here's a couple of packages related to iOS app development:
 There is an extension to Homebrew called Homebrew Cask that supports installing of GUI apps.