cd, but it remembers
zoxide learns which directories you visit and ranks them by frecency (frequency × recency). After a day or two, z proj jumps straight to ~/projects/notes without typing the path.
Install and hook
brew install zoxide
echo 'eval "$(zoxide init zsh)"' >> ~/.zshrcBy default it adds the z command. zi opens an interactive picker (uses fzf if installed).
Daily use
z notes # jump to highest-ranked dir matching 'pippa'
z notes archive # match multiple substrings
z - # previous directory (like cd -)
zi note # interactive pickerDatabase
Stored at ~/.local/share/zoxide/db.zo. Survives reboots. zoxide query --list --score shows your ranked dirs. zoxide remove path drops a dir from the database.
How it pairs with autocd
If you have setopt AUTO_CD in zsh, you can also drop the cd: typing ../sibling jumps. Combined with zoxide's substring jumps, you barely type cd at all anymore.
Frecency is a prediction
When several directories match, zoxide chooses from learned history. Query and print the resolved path before destructive work, and keep exact paths in automation.
Keep exact and learned navigation distinct
Using z beside the shell's original cd makes the contract visible. Avoid a hand-written alias that silently changes established cd behavior.
Navigation history is personal data
Learned paths can reveal project, customer, and host names. Review storage, sync, and reset behavior before sharing the database or enabling synchronization.
Frecency compresses habits
That compression is useful for interactive movement, not a stable identifier. Keep exact paths in scripts and verify the resolved directory before destructive work.