ajeetdsouza/zoxide
Developer ToolsCLI toolsA shell command that jumps to frequently used directories by rank, with fuzzy matching across major shells.
What it does
zoxide is a drop-in replacement for cd that remembers the directories you visit and ranks them by usage frequency. Instead of typing full paths, you type fragments like z foo bar and it resolves the highest-ranked directory matching all fragments. It is written in Rust and comes with shell integration for Bash, Zsh, Fish, Nushell, PowerShell, Elvish, Tcsh, Xonsh, and any POSIX shell.
The matching behavior is documented in the project wiki, and a companion aging algorithm caps how many entries the database keeps. Plain cd-style paths still work (z ~/foo, z .., z -), so you can adopt it gradually.
Install and set up
-
Install the binary with your platform's package manager (Homebrew,
winget,cargo install zoxide --locked, and many distro packages are listed in the installation section). On Linux and macOS the README also offers acurlinstall script. -
Append the init line for your shell to its config file, for example this for Bash:
eval "$(zoxide init bash)"For Zsh the line is
eval "$(zoxide init zsh)"and should come aftercompinit. Fish useszoxide init fish | source, and PowerShell usesInvoke-Expression (& { (zoxide init powershell | Out-String) }). Place these at the end of the config file. -
Optionally install fzf for interactive selection (
zi foo) andSpace+Tabcompletions; the minimum supported fzf version is 0.51.0. -
If you already use
z,autojump,fasd,z.lua,zsh-z, or atuin, runzoxide import <plugin>to bring existing history over.
After restarting the shell, z foo jumps to the best match and visits become part of the ranking.
Configuration and constraints
Several environment variables tune behavior and must be set before zoxide init runs: _ZO_DATA_DIR chooses the database location, _ZO_EXCLUDE_DIRS excludes paths (defaults to $HOME), _ZO_MAXAGE adjusts the aging cap, and _ZO_ECHO prints the matched directory before jumping. zoxide init also accepts flags such as --cmd to rename or replace the z command, --hook to control when scores are incremented, and --no-cmd to skip defining the wrapper functions.
Compatibility notes worth checking: Nushell requires v0.106.0+, Elvish requires v0.18.0+, and Warp provides its own completions so Space+Tab completions do not work there. Debian and Ubuntu derivatives ship zoxide packages slowly, so the README suggests the install script instead. The project is MIT-licensed.
HotRepo's take
The repository has 41,024 stars and 1,046 forks and was created in 2020, making it a long-lived CLI utility rather than a recent trend. In the Rust weekly ranking recorded on 2026-12-05 it gained 273 stars and placed 4th, so interest remains steady years after launch. Discussion on Hacker News is split in a way that is useful for evaluating the tool: one commenter found fuzzy matching made destinations unpredictable compared with shell history completion, while another said it became the single best command-line improvement in their workflow. For users working across a small set of project directories, the ranking behavior is likely the main draw; for those who navigate mostly by relative paths, plain cd and history search may be enough.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.
Hacker News
You might also like
- atuinsh/atuinA terminal history and agent-session store for shell users and AI coding agent workflows.
- nushell/nushellA cross-platform shell that treats command output as structured data for filtering, exploring, and scripting.
- starship/starshipCross-shell prompt that displays contextual Git, language, and tool info with fast, customizable rendering.
- BurntSushi/ripgrepA fast recursive regex search CLI for codebases that respects gitignore and skips hidden and binary files.
- sharkdp/fdA fast, user-friendly command-line tool for searching files and directories, an alternative to find.