# Zoxide zoxide is a smarter `cd`. It remembers the directories you actually use and lets you jump to any of them in a few keystrokes. Written in [[Rust]] by Ajeet D'Souza, [[MIT License]], works in every major shell. It is the modern successor to `z` and `autojump`, and it is already installed on my machine. ## How it's used ```sh z foo # jump to the highest-ranked directory matching foo z foo bar # match on both terms z foo / # into a subdirectory starting with foo z ~/foo # behaves like a normal cd z .. # up one z - # previous directory zi foo # interactive selection through fzf ``` The ranking is *frecency*: frequency combined with recency, so directories you visited often and recently win over ones you visited once last March. You never configure it. You just use your shell normally and the database builds itself. Tab completion works in bash 4.4+, fish and zsh. ## Why it earns its place The value isn't saved keystrokes, though there are plenty. It's that **the path stops being something you hold in your head.** Without it, moving around a machine means either remembering where things live or typing enough of the tree to get there. With it, you type the distinctive part of a directory name and arrive. The cognitive load of navigation drops to roughly nothing, and it happens dozens of times a day. That's the shape of a good tool: it removes a small tax you had stopped noticing you were paying. ## Installing ```sh curl -sSfL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | sh # or cargo install zoxide --locked ``` Also in most package managers (conda-forge, Homebrew, and the usual Linux distributions). One shell-init line in your rc file and it's live. Pair it with `fzf` to get `zi` working. ## Worth noting It is one of a cluster of Rust CLI replacements that are now effectively defaults on a modern setup: `ripgrep` for `grep`, `fd` for `find`, `bat` for `cat`, `eza` for `ls`, zoxide for `cd`. Each is individually small. Installed together they change what using a terminal feels like. Also worth knowing for agent work: because zoxide is a shell function rather than a binary on `PATH`, it doesn't exist inside a non-interactive agent shell. Scripts and agents still need real paths. `z` is for humans. ## References - [ajeetdsouza/zoxide](https://github.com/ajeetdsouza/zoxide) — source - [Matching algorithm](https://github.com/ajeetdsouza/zoxide/wiki/Algorithm) — how frecency ranking works - [Third-party integrations](https://github.com/ajeetdsouza/zoxide#third-party-integrations) ## Related - [[Rust]] - [[Linux]] - [[Open Source]] - [[MIT License]]