Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've just read with pleasure, and learned a lot from these questions :

But I didn't find in these some of my favorites tools, which I use on a daily basis, and I think that's because these are OSX/Terminal intended tools, not fitting well in above questions.

My favorites are, by order of preference: oh-my-zsh, homebrew (but also macports), janus...

These tools having in common :

  • Terminal: install and use
  • OSX Intended: brew is, git is not!
  • Easy Install: one liner, ie. git clone; wget ... etc.
  • Extensible: possibly has extensions or simple API (eg. oh-my-zsh with plugins, brew with formulas, janus with bundled vim plugins...)
  • Often open source, free, hosted on github, scripted, mostly (but not only!) with ruby...

Do you know any other similar must-have tools? I would love to discover new ones!

Please only include one utility per answer. Also, please don't add duplicates. Check first before posting. If you see a duplicate, kindly downvote the answer and inform the author by leaving a comment.

share|improve this question
    
homebrew and macports together could have issues as macports will read files installed by homebrew and they will not necessarily be the correct version –  Mark Apr 16 '11 at 7:51
    
true, but 95% of time there is no major issue, and for remaining 5% cases, just changing temporarily the $PATH is often the solution... I prefer brew for ease and lightweight, but macports has many more packages we will probably never see in homebrew... –  Vincent Apr 16 '11 at 9:29
    
@Vincent - the whole point of homebrew is that you can fairly easily build your own formula's so the "never see in homebrew" seems to miss the point of it entirely. MacPorts is convenient, since you don't really have to do much, effectively giving you a BSD port or Debian apt-get style installer. –  Slomojo Aug 30 '11 at 0:55
    
It's OK to answer your own question - why not split off the "answers" and just leave the question. –  bmike Aug 30 '11 at 3:23
    
@slojomo, look at some very complex macports "ports" with tons of dependencies like deluge, you will understand... plus the fact that homebrew has a policy of no formula overriding system components... (like mysql...) –  Vincent Aug 30 '11 at 8:27

22 Answers 22

Homebrew

The missing package manager for OS X.

It is an amazing package manager, very light and easy to use. KIS Principle, that makes me think of archlinux. Its community is big and very active.

(see also macports which brew doesn't replace completely, I prefer installing packages with brew, but some complex ones are only on macports)

See also brew tap command which provides some missing formulas that can be useful like when you need latest php version > brew tap josegonzalez/php.

(Homebrew has a policy of not replacing system components, but hey, sometimes you have to)

share|improve this answer
    
Your FormulaAlt link is down. (404) –  ottel142 Apr 22 '13 at 10:52
    
edited to mention brew tap which is now the built in solution to handle external "formulas". –  Vincent Apr 23 '13 at 18:17
    
Note you can also specify an "external" formula directly via URL to it's formula.rb –  Slomojo Dec 31 '13 at 3:36

iTerm2 (Free)

Mentioned in comments, but it's essential, so for emphasis...

share|improve this answer
5  
Seriously, forget OSX Terminal + Visor, iTerm2 is so much better, I'm splitting panes all day in full screen with a hotkey à la visor... There are also many other wonderful features... –  Vincent Aug 30 '11 at 7:51
1  
Strangely, it hasn't had an update of the stable release since July 2011, and a beta came out in July 2012 which never got promoted. Is this project dead? –  Yar Oct 12 '12 at 23:30
1  
@Yar it's still being developed. The author maintains the official repo here: github.com/gnachman/iTerm2 –  mh. Dec 4 '12 at 5:21

Ack (Free)

Great for searching text files, you'll never have to use a find/grep combination again.


Ack has two nice integration plugins for major OSX text editors:

share|improve this answer
3  
+1 Ack is such an awesome grep replacement, if it wasn't for the fact that grep is in my muscle memory, I'd never use it at all. –  Slomojo Aug 30 '11 at 23:13
    
Ack is a must have tool, makes grep developer friendly, but this one is a bit off-topic since it is not related to OSX, editing this answer to add Vim/AckMate information. –  Vincent Sep 6 '11 at 13:28
1  
grin is also a good alternative. –  Gerald Kaszuba Oct 25 '12 at 21:13
    
grin is wonderful, here's the link: pypi.python.org/pypi/grin –  Lorin Hochstein Nov 14 '12 at 3:55
1  
These days, it’s all about The Silver Searcher. –  Zev Eisenberg Oct 25 '13 at 21:28

oh-my-zsh (Free)

A handful of functions, auto-complete helpers, and stuff that makes you shout…

“OH MY ZSHELL!”

Made me love shell when I was just using it when I had to... Zsh is "bash on steroids", with oh-my-zsh and all its plugins, many specifics to OSX, shell is a lot more user friendly and powerful... Oh also themes are pretty cool.


Also worth giving a look, some alternatives / complements zsh based stuff :

  • prezto Is a complete rewrite of oh-my-zsh, clean and a lot more active, now using it :)
  • zsh-users (Free) Some very nice zsh stuff (love the syntax highlighting)
  • zcm (Free) zsh configuration manager (inspired from oh-my-zsh)
share|improve this answer
    
zsh with oh-my-zsh really is awesome, it will even do path completion over an scp/ssh command if you've enabled public key authentication to the server you're looking at, it rocks. (awesomely-powerful completion... /v/m/s/ TAB' expands to /Volumes/MyDrive/Src) –  Slomojo Aug 30 '11 at 23:17
    
+1 for prezto. I love the approach of using git submodules. –  Acorn Mar 23 '13 at 2:00
    
Also check out github.com/zsh-users/antigen –  Slomojo Dec 31 '13 at 3:35
    
Prezto is much faster than oh-my-zsh. You should try it. –  Rnhmjoj Sep 16 at 15:33

lolcat (Free)

lolcat

share|improve this answer
1  
Surely the most useful terminal tool, evah! (After cowsay and figlet that is.) –  Slomojo Aug 30 '11 at 4:00
7  
Clearly the reason 256-color support was addd to Lion Terminal. –  Chris Page Sep 4 '11 at 9:42
1  
nice one (lol) but a bit off-topic, not really OSX related –  Vincent Sep 6 '11 at 13:26
    
Who cares ? =) It is a nice tool ! –  Matthieu Riegler Jan 8 at 16:42

TotalTerminal (Free)

Tabs, visor, hotkeys, very simple and reliable. Well maintained with frequent updates.

TotalTerminal

share|improve this answer

Inconsolata-dz (Free)

This is a slight modification of the original Inconsolata. It is a fantastic monospaced font for use with Terminal.app, TextMate, MacVim and anywhere else you need one. A must have for any coder. enter image description here

share|improve this answer
    
+1 I like this one better than ProfontX –  EmmEff Aug 30 '11 at 12:27
1  
Unfortunately, it doesn't look very good to me on your screenshot. –  Peter Štibraný Sep 6 '11 at 13:32
    
Seems it suffered some compression artifacts - replaced it with a (hopefully) better one! –  Ingmar Hupp Mar 4 '13 at 14:17
    
Thank you. This is now my default font in almost every text writing application. –  Rnhmjoj Jul 20 '13 at 1:55

Solarized (Free)

Color scheme for Terminal.

Lion supports ANSI colors so hack-y things like SIMBL are no longer required.

For Snow Leopard and earlier, you'll need SIMBL installed to make the most of it since color support in Terminal.app is limited.

share|improve this answer
    
fyi, its vim version comes with janus ;) –  Vincent May 7 '11 at 10:03
    
Solarized for Lion Terminal doesn't look quite right for me -- the colors are off compared to Vim and iTerm. Anyone encountered this? –  yjsoon Aug 29 '11 at 6:41
3  
@yjsoon forget Lion Terminal, use iTerm2... –  Vincent Aug 30 '11 at 7:54
1  
@Vincent I liked iTerm2... until Lion Terminal came out, and could open new tabs in the same directory as the current tab, and greyed out history. Waiting for iTerm to get those. –  yjsoon Sep 5 '11 at 15:21
    
@yjsoon I would not be surprise that you can get this behavior with some oh-my-zsh plugins... or with a bit of scripting ;) omz ftw! –  Vincent Sep 6 '11 at 13:15

Autojump (free)

Great command line utility that stores cd commands and automatically creates an autocomplete shortcut to your most accessed directories.

Even better, if several directories have a similar name (starting with the same characters), Autojump will simply pick the one you most commonly go to. You won't have to type the whole name.

Example:

cd project1

j p will now take you straight to the full project1 path.

Now what if you create a similar folder called project2 which you also access often (but less than project1), Autojump will assign a lesser weight to project2 and take you straight to project1.

If you hit TAB after typing "pro" for instance, your shell will display project__, hinting at the fact that there are more than 1 matching directory. Another TAB hit will display the list of matching directories and allow you to select the one you mean.

Note: I've recently installed ZSH and noted some interference due to the autocomplete features. Autojump works perfectly on a vanilla Terminal.

share|improve this answer
    
While using zsh just try cd -[TAB] see how you get on. –  Slomojo Dec 31 '13 at 3:39

MTR (Free) by BitWizard - combines ping and traceroute

Installation: brew install mtr --no-gtk

                                            Packets               Pings
 Host                                     Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. 217.70.191.253                         0.0%    32    0.5   1.7   0.3  17.6   3.8
 2. p252-core4-d.paris.gandi.net           0.0%    32    0.5   1.1   0.3  17.8   3.1
 3. xe2-1-24-vcore1-dc1.balt.gandi.net     0.0%    32   97.4 105.7  96.9 187.7  22.0
 4. eqixva-google-gige.google.com         80.0%    31  100.8 100.2  99.6 100.8   0.4
 5. 209.85.252.80                          0.0%    31  100.3 108.0 100.0 210.4  24.3
 6. 209.85.243.114                         0.0%    31  111.9 112.6 111.7 118.6   1.2
 7. 64.233.174.87                          0.0%    31  119.8 112.7 111.6 119.8   1.9
    64.233.174.117
 8. 209.85.242.181                        16.1%    31  112.0 117.0 111.8 125.2   5.1
    209.85.253.185
    209.85.242.177
    209.85.253.181
 9. vx-in-f105.1e100.net                   0.0%    31  112.0 112.3 111.6 116.4   0.8

whatmask (Free) by Laffey Computer Imaging - IPv4 subnet calculator

Download OS X binary. Also online.

$ whatmask 192.168.5.6/22

------------------------------------------------
           TCP/IP NETWORK INFORMATION
------------------------------------------------
IP Entered = ..................: 192.168.5.6
CIDR = ........................: /22
Netmask = .....................: 255.255.252.0
Netmask (hex) = ...............: 0xfffffc00
Wildcard Bits = ...............: 0.0.3.255
------------------------------------------------
Network Address = .............: 192.168.4.0
Broadcast Address = ...........: 192.168.7.255
Usable IP Addresses = .........: 1,022
First Usable IP Address = .....: 192.168.4.1
Last Usable IP Address = ......: 192.168.7.254
share|improve this answer
    
nice, but a bit off-topic, not really OSX related :) –  Vincent Sep 6 '11 at 13:22
    
wow, that thing is amazing. thx for sharing –  jupp0r Mar 29 '12 at 3:06

DTerm (Free) by Decimus Software

Similar to Visor, but with some extra friendly features (also appears to be in active development)

share|improve this answer

Shell functions

I can't live without this.

  • One command to update them all.

    update() {
        local brew="brew update; brew upgrade;"
        local gisty="gisty pull_all; gisty sync_delete"
        local gem="gem update;"
        local pip="pip freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs pip install -U -q"
        sh -c $brew$gisty; sudo sh -c $gem$pip
    }
    

    Obviously you can add more commands according to the package managers you use. This is made by me.

  • Change directory to the current Finder directory

    cdf() {
        target=`osascript -e 'tell application "Finder" to if (count of Finder windows) > 0 then get POSIX path of (target of front Finder window as text)'`
        if [ "$target" != "" ]; then
            cd "$target"; pwd
        else
            echo 'No Finder window found' >&2
        fi
    }
    

    cdf to open the Finder directory in the terminal and open . to open in Finder the directory terminal directory.

    Source

  • Get colors in manual pages

    man() {
        env \
        LESS_TERMCAP_mb=$(printf "\e[1;31m") \
        LESS_TERMCAP_md=$(printf "\e[1;31m") \
        LESS_TERMCAP_me=$(printf "\e[0m") \
        LESS_TERMCAP_se=$(printf "\e[0m") \
        LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
        LESS_TERMCAP_ue=$(printf "\e[0m") \
        LESS_TERMCAP_us=$(printf "\e[1;32m") \
        man "$@"
    }
    

    Source

  • Use a RSA private key in git

    git(){
        trap 'rm -f /tmp/.git_ssh.$$' 0
        SSH_KEY="~/.ssh/id_rsa"
        echo "ssh -i $SSH_KEY \$@" > /tmp/.git_ssh.$$
        chmod +x /tmp/.git_ssh.$$
        export GIT_SSH=/tmp/.git_ssh.$$
        [ "$1" = "git" ] && shift
        git "$@"
    }
    

    I noticed that putting this into your .rc will slow down git. If you want to avoid this you should unpack the function and save it as a shell script in your $PATH

    Source (I modified it a bit. The original asks every time for the key path.)

share|improve this answer
1  
cdf is invaluable. thanks! –  Phil Cohen Feb 17 at 1:17
    
using RSA private key in git better with configuring SSH via ~/.ssh/config. –  Eir Nym Jun 8 at 11:36

MacPorts

The MacPorts Project is an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the Mac OS X operating system.

Many people will tell you don't use macport, use homebrew instead. That is mostly true, homebrew is lighter and easier to use. But macports offers way more packages, and some of them will never come to homebrew, because of their different philosophy. (I use both, for different needs)

For example, I recommend GTK in its quartz (native OSX) variant :

sudo port install gtk2 +no_x11+quartz

Then when you install a package that can benefit from it, like wireshark... You will get a native OSX UI, faster and looking much better than X11...

share|improve this answer

Janus + macvim

Janus is a basic distribution of vim plugins and tools intended to be run on top of the latest MacVIM snapshot

install macvim with homebrew brew install macvim and follow the (easy) janus instructions, and you are set with a powerfull text editor that has been pre-configured for you by brilliants minds. The learning curve of vim is scary at first sight, but once you are confortable with it, you'll never go back (or maybe to emacs...) (fyi, TextMate has been abandoned to its profit by many coders)

That might sounds strange, but I prefer using vim in iTerm2 than macvim... (vim is bundled in macvim, just use brew install macvim --override-system-vim)

share|improve this answer

Lunchy (Free)

A friendly wrapper for launchctl. Start your agents and go to lunch!

A convenient tool to manage (start/stop/restart) OSX services/daemons...

That's a ruby gem: gem install lunchy

share|improve this answer

The Silver Searcher (Free)

A code-searching tool similar to ack, but faster.

Install it with brew

brew install the_silver_searcher
share|improve this answer

ProfontX (Free)

My favorite programming and terminal font on MacOS. (ProfontX is a corrected version of Profont which had issues with some characters)

share|improve this answer
    
Nice font, thanks, didn't knew that one, will give it a try, even if I guess I'll finally fallback to that good old Monaco (which renders great in iTerm2) –  Vincent Aug 30 '11 at 10:29
    
Monaco won, better readability for my eyes :), would love to switch to modern Menlo, but its special UTF-8 characters like ✭ are too small for shell pleasure. –  Vincent Sep 6 '11 at 13:38
    
definitely a matter of taste ;), there's something about monaco i just can't stand, it's just too crispy to my taste I guess –  apouche Sep 6 '11 at 14:05
1  
oh yeah, definitely a personal choice. Dunno if there is not already one, but a community wiki exclusively about fixed-size dev fonts for OSX would be nice... ;) –  Vincent Sep 6 '11 at 17:26

Visor

is an interesting utility. It describes itself as:

a system-wide terminal on a hot-key

Quite cool. It drops down a terminal on the press of a key-combination.

EDIT:

Visor has been renamed to TotalTerminal... (see other answer, this could/should be deleted)

share|improve this answer
3  
fyi, I switched from Terminal to iTerm2, which has a native visor like feature, and much much more like splitpanes! :) –  Vincent May 7 '11 at 10:04

bash-it (Free)

An alternative to oh-my-zsh (see above). A really useful collection of scripts, aliases and functions for bash. Also provides a nice plugin system for adding your own additions.

share|improve this answer

Bwana (Free)

Not technically a terminal command but very handy for quick manpage lookups by allowing url of: "man:ls" to show html page of the manpage in your browser.

share|improve this answer

Go2Shell (Free)

Not a terminal utility, but a utility for using Terminal. It puts a button in the Finder toolbar and when pressed it creates a new Terminal window cd'ed to that directory.

share|improve this answer

Boxen - Automated Mac OS configuration and build, install/update software. It helps saving a lot of time when you want exactly the same setup, (software, version) in the development team and also allow each individual to install other tools to increase productivity.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.