7

I'm a Windows/Linux guy that just got my Macbook Air. I do web dev, and am currently trying to setup this machine for some on-the-go development.

After some research attempts, I'm wondering: what's the best way to install command line utilities in Lion, such as GIT? Best as in easiest to install, maintain, upgrade etc.

As I understand it, there are some alternatives: macports, homebrew etc. Or in the GIT example, maybe just download the installer from their website.

Thanks.

1
  • Install all CLI that support it with homebrew. Jul 22, 2021 at 9:42

3 Answers 3

1

I think it depends on how many tools/libraries you need to install.

If just git then use Xcode 4 which you will need for any port package. If you are doing pure HTML/Javascripy/CSS then the git installer will work.

For python and perl and similar interpreters the the language install tools can be used unless there are complex C/C++ libraries

If only a few others then build into /usr/local

However if you have several things to install or there are complex dependencies then I would use a ports package like Fink, macports or homebrew (which is best is debatable and should be a separate discussion)

3
  • To answer your follow up: I will also need to install apache, php, mysql, node.js, maybe python etc. Xcode's 3 GB foot print seams a little rough, since I currently only would need it for GIT. Aug 4, 2011 at 21:47
  • Given this question for python and mysql stackoverflow.com/questions/1448429/… - I suspect you will need a ports system and they require Xcode
    – mmmmmm
    Aug 5, 2011 at 7:57
  • Alright, thanks. I've installed brew now, so will try if it is sufficient, otherwise I'll check out macports. Aug 5, 2011 at 8:19
2

Git's bundled with the free version of Xcode 4 on the app store. That's about as easy and official as it gets in my book. You won't do wrong by choosing homebrew as it's solid and got great momentum plus mindshare presently.

3
  • Thanks. The 3 GB foot print of Xcode is a little daunting, since I currently only would need it for GIT. Do you know if there are any other CLI tools bundled with Xcode? Aug 4, 2011 at 21:57
  • clang, llvm, and tons of other tools (but no db nor node.js). Start with homebrew and grab the Xcode next time you're in an Apple store or other place with a fast pipe and a USB drive in your pocket.
    – bmike
    Aug 4, 2011 at 22:06
  • I think it comes with the Xcode Command Line Tools, which is a smaller download than the Xcode app.
    – benwiggy
    Jul 22, 2021 at 6:57
1

If it's just git then, by all means, their installation procedure works well. But you know it won't stay like that.

I really prefer homebrew over macports. I brew everyday =) It's super easy to install: https://github.com/mxcl/homebrew/wiki/installation And it hasn't bitten me yet. Their non-sudo approach rocks. Maybe there aren't always formulas for everything, but I most often take that as a hint. =)

3
  • Thanks. Any specific reason you prefer homebrew? Aug 4, 2011 at 21:51
  • 2
    I find it much less prone to end up in a dependency mess than macports. With Macports I often found myself with a broken package which could steal hours from time I didn't have. I'm sure it depended a lot on me, but homebrew just treats me nicer. It's super fast too.
    – PEZ
    Aug 4, 2011 at 21:58
  • With macports and fink everything is not in /usr/local so is sandboxed away from the standard compilers so is more repeatable (and I have not found many broken packages and with Unix security it is better to install as a different user to yourself) - note this is why I suggest macports vs fink vs homebrew discussions are not really part of the answer to this question
    – mmmmmm
    Aug 5, 2011 at 8:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .