What zoxide Does
- Frecency ranking — frequency + recency scoring for visited dirs
- z command — jump to any tracked dir by partial name
- zi — interactive fuzzy picker (uses fzf)
- Multi-keyword match —
z proj apifinds~/code/myproject/api - Last dir —
z -toggles previous directory - Shell integrations — bash, zsh, fish, PowerShell, nushell, elvish, xonsh, cmd
- Directly callable —
zoxide query foofor scripting
Architecture
Rust binary that maintains a SQLite-like flat-file database at ~/.local/share/zoxide/db.zo. Each time you cd, the shell hook calls zoxide add $PWD. The z command queries the DB and returns the best match. Interactive mode pipes candidates to fzf.
Self-Hosting
Local CLI tool.
Key Features
- Cross-shell support
- Frecency algorithm
- Fast matching (Rust)
- Fuzzy interactive mode (zi)
- Import from z, autojump, fasd
- Scripting friendly
- Dead entries auto-cleaned
- No database maintenance needed
Comparison
| Tool | Algorithm | Shells | Database |
|---|---|---|---|
| zoxide | Frecency | All | Rust flat file |
| z (shell script) | Frecency | Bash/Zsh | Text file |
| autojump | Frequency | Bash/Zsh/Fish | Python |
| fasd | Frecency | Bash/Zsh | Shell script |
FAQ
Q: Does it pair with fzf?
A: zi uses fzf automatically. Set the _ZO_FZF_OPTS environment variable to customize the appearance.
Q: How do I migrate data from z?
A: zoxide import --from z ~/.z. Also supports autojump, fasd, and z-lua formats.
Q: Does it work on Windows? A: Yes. Both PowerShell and cmd have init hooks.
Sources & Credits
- GitHub: https://github.com/ajeetdsouza/zoxide
- License: MIT