macOS Sierra Installing Command Line Tools Guide
The Command Line Developer Tools for XCode enables UNIX-style development via Terminal by installing command line developer tools, as well as Mac OS X SDK frameworks and headers.
Many useful Tools are included in the Command Line Tools for Xcode, such Apple LLVM compiler, linker, and make. If you use Xcode, these tools are also embedded within the Xcode IDE.

- Login or Register on the Apple Developer Site:
- Download the Command Line Tools for Xcode
- Double-Click on the .dmg Image
- Double-Click on the Package Installer
- Then Simply follow theInstallation Wizard
Accept the License.
Then eventually change the target location…
How-to Getting-Started Installing Brew Packages on Mac: