I’m a great fan of homebrew, the package manager for OS X that gives access to a raft of useful tools. However, it’s designed for a single user, really, which is OK for a developer’s laptop but less cool for a shared computer or one that uses network accounts. For these cases, here’s a solution.

I make the assumption here that you have the developer tools installed and know your way around the OS X Terminal/iTerm/etc.

Create a separate user account for homebrew, for example brew. Give it a home directory of /usr/local, make the UID less than 500 (such as 401) and hide this user from the graphical logins. The following script does that lot for you.