repobenchmarks // terminal speed
PRODUCTIVITY
$ z api && pwd # /Users/dev/repos/enterprise/backend/api

zoxide Smart Directory Jumper

A smarter cd command written in Rust. Jump to frequently used directories with just a couple keystrokes using frecency scoring.

Algorithm: Frecency (Frequency + Recency) Integration: fzf Interactive Picker Speed: Sub-millisecond Rust
$ cd ~/code/projects/web/frontend (Slow) $ z front (Instant!) → Jumped to /home/dev/code/projects/web/frontend 🔍 Press `zi` for interactive fzf search

Navigating deeply nested directory structures using standard cd ../../other-folder/subfolder commands is repetitive and slow. While tools like autojump and fasd pioneered shortcut navigation, they relied on Python or shell scripts that introduced noticeable shell startup latency. zoxide is a modern, high-performance directory navigation utility written in pure Rust that tracks your directory navigation habits and allows you to jump anywhere instantly using a calibrated "frecency" algorithm.

zoxide Frecency Matching Algorithm Diagram showing how zoxide evaluates frequency and recency scores to determine the best matching directory. Input Query $ z blog Partial String Match Frecency Scoring Engine Score = Frequency × Decay(Time) Rank 1: ~/code/my-blog (Score: 94.2) Rank 2: ~/docs/archive/blog (Score: 12.1) Target cd ~/code/ my-blog
Figure 1: Frecency scoring formula evaluating visits weighted by time decay to select the optimal destination.

How Frecency Works

The term frecency combines frequency (how many times you visited a folder) and recency (how recently you visited it). A directory you visited 20 times ten minutes ago ranks far higher than a folder you visited 100 times six months ago. As you use your shell normally, zoxide quietly builds an index in ~/.local/share/zoxide/db.zo.

zoxide vs Traditional Navigation

Command Keystrokes Required Cognitive Effort
cd ../../../var/log/nginx 28 keystrokes + tab completion Requires knowing exact directory hierarchy
z ngi 5 keystrokes Zero effort — zoxide calculates best match
zi Interactive fzf search Fuzzy search across your entire directory history
✓ 1-Minute Setup Guide
  • Install: Run brew install zoxide fzf (macOS) or sudo apt install zoxide (Ubuntu).
  • Add Shell Hook: Add eval "$(zoxide init zsh)" to your ~/.zshrc (or bash / fish).
  • Replace cd completely: Use eval "$(zoxide init zsh --cmd cd)" to transparently replace standard cd so your existing typing habits automatically use zoxide!

Conclusion

zoxide is one of those rare command-line tools that once adopted, feels indispensable within hours. It cuts down navigation friction and saves thousands of keystrokes every single week.

// Primary Sources & Documentation
Editorial Note: Features verified against zoxide v0.9+ releases.