Skip to content
mikemcquaid edited this page Jan 22, 2013 · 4 revisions

Using Homebrew without the CLT

also known as: Xcode-only, no-CLT or NCLT.

Homebrew can be used with just Xcode only. Without the CLT ("Command Line Tools for Xcode). This is experimental, but it works pretty well.

You can open a sub-shell with the environment set up, such that cc, make, otool etc. are available with brew sh.

Alternatively:

Put this in your ~/.bash_profile:

if [ ! -x "/usr/bin/cc" ]; then
  if [ ! -x "/usr/local/bin/git" ]; then
    alias git='xcrun git'
    export GIT=`xcrun -find git`
  fi
  export MANPATH="/Applications/Xcode.app/Contents/Developer/usr/share/man:$MANPATH"
  export MANPATH="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/:$MANPATH"
  export PATH="$PATH:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin"
fi
Clone this wiki locally