Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsApr 11, 2026·2 min de lecture

zoxide — A Smarter cd Command That Learns Your Habits

zoxide is a smarter cd command written in Rust. It tracks directories you visit and lets you jump to any of them with just a few keystrokes. Inspired by z and autojump. Works with bash, zsh, fish, PowerShell, nushell, and more.

Introduction

zoxide is a smarter cd command written in Rust. It learns which directories you use most frequently and lets you jump to any of them with a few keystrokes. Inspired by the classic z script and autojump, but faster and supporting every major shell.

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 matchz proj api finds ~/code/myproject/api
  • Last dirz - toggles previous directory
  • Shell integrations — bash, zsh, fish, PowerShell, nushell, elvish, xonsh, cmd
  • Directly callablezoxide query foo for 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

Discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires