fasd automatically builds a list of directories and files, sorted by “frecency”. fasd is a newer alternative to autojump.
You can change directory via command alias “z”
z <directory path last component>
how to install
On macOS you can install via Homebrew:
brew install fasd