Change directories faster with autojump

You know the drill, each and every day you open your terminal, cd into /Users/bob/projects/projectX and you launch your favourite editor/IDE.

If you have a lot of projects this can quickly become a pain in the ass.
So some of you will probably end up with some aliases to quickly change to your project directory like alias projectX = “cd /Users/bob/projects/projectX”.

Introducing autojump: a cd command that learns.

autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line.

Using autojump on OSX

Sidenote: autojump is made in python, so it should work on most machines.

After installing the package you still have to add a single line to your terminal configuration. I’m using fish shell so in my case the following line should be added to ~/.config/fish/

After this autojump will remember all the paths you cd into.
So if you use cd /Users/bob/projects/projectX regularly, you can now just use

To add already known paths to autojump you can use the script found below. This saves you some time not having to cd into each directory for autojump to remember it