Install Xcode 5
The download/install takes a while so start it first. When it finishes downloading you will still need to run it to complete installation.
Note: Make sure you install the XCode Command Line Tools after XCode is done installing. To do this go to Xcodes -> Preferences -> Downloads -> Command Line Tools -> Install. If you don't you might not be able to install brew packages (i.e. brew install wget will fail).