ZOXIDE(1)
πΈ ZOXIDE(1) πΈ
ok so bestie, welcome to zoxide β aka the manual page for the smartest little cd you will ever meet. this is zoxide(1), and i'm gonna walk you through literally everything, no skips, no gatekeeping. π
β¨ NAME β¨
zoxide β a smarter cd command
β¨ SYNOPSIS β¨
zoxide SUBCOMMAND [OPTIONS]
β¨ DESCRIPTION β¨
okay so picture this: zoxide is a smarter cd command for your terminal. it keeps track of the directories you use most frequently, and then uses a ranking algorithm to navigate you straight to the best match. it's giving personal assistant but for your filesystem. π§
β¨ USAGE β¨
here's the vibe in action:
z foo # cd into highest ranked directory matching foo
z foo bar # cd into highest ranked directory matching foo and bar
z foo / # cd into a subdirectory starting with foo
z ~/foo # z also works like a regular cd command
z foo/ # cd into relative path
z .. # cd one level up
z - # cd into previous directory
zi foo # cd with interactive selection (using fzf)
z foo<SPACE><TAB> # show interactive completions (bash 4.4+/fish/zsh only)
heads up bestie: that<SPACE><TAB>trick only works onbash 4.4+,fish, andzsh. know your shell, know your power. π
β¨ SUBCOMMANDS β¨
each one has its own whole manual page, so go read those too:
zoxide-add(1)β add a new directory to the database, or increment its rank. β¨zoxide-import(1)β import entries from another application. bring your friends, we're welcoming here. π«Άzoxide-init(1)β generate shell configuration. this is the one that sets you up.zoxide-query(1)β search for a directory in the database. πzoxide-remove(1)β remove a directory from the database. it's not you, it's the frecency score. π
β¨ OPTIONS β¨
-h,--helpβ print help information. the classic "wait what do i do" button.-V,--versionβ print version information. for when you gotta know which zoxide you're running, iykyk.
β¨ ENVIRONMENT VARIABLES β¨
ok so these are how you configure stuff. important: they have to be set before zoxide-init(1) is called, or they just won't take. set them first, bestie. π
_ZO_DATA_DIRβ specifies the directory in which the database is stored. the default value varies across OSes:- Linux/BSD β
$XDG_DATA_HOMEor$HOME/.local/share, eg./home/alice/.local/share - macOS β
$HOME/Library/Application Support, eg./Users/Alice/Library/Application Support - Windows β
%LOCALAPPDATA%, eg.C:\Users\Alice\AppData\Local
- Linux/BSD β
_ZO_ECHOβ when set to1,zwill print the matched directory before navigating to it. little spoiler alert. π_ZO_EXCLUDE_DIRSβ prevents the specified directories from being added to the database. this is provided as a list of globs, separated by OS-specific characters:- Linux/macOS/BSD β
:, eg.$HOME:$HOME/private/* - Windows β
;, eg.$HOME;$HOME/private/*
- Linux/macOS/BSD β
by default, this is set to $HOME. and after setting this up, you might need to use zoxide-remove(1) to remove any existing entries from the database. spring cleaning era. π§Ή
_ZO_FZF_OPTSβ custom options to pass tofzf(1)during interactive selection. see the manpage for the full list of options. β¨_ZO_MAXAGEβ configures the aging algorithm, which limits the maximum number of entries in the database. by default, this is set to10000._ZO_RESOLVE_SYMLINKSβ when set to1,zwill resolve symlinks before adding directories to the database.
β¨ ALGORITHM β¨
the math is mathing, and honestly? it's iconic. π
AGING
zoxide uses a parameter called _ZO_MAXAGE to limit the number of entries in the database based on usage patterns. if the total FRECENCY of the directories in the database exceeds this value, we divide each directory's score by a factor k β such that the new total becomes ~90% of _ZO_MAXAGE. thereafter, if the new score of any directory falls below 1, it is removed from the database.
theoretically, the maximum number of directories in the database is 4 * _ZO_MAXAGE, although it is lower in practice. theory vs. practice, the eternal saga. π
FRECENCY
each directory in zoxide is given a score, starting with 1 the first time it is accessed. every subsequent access increases the score by 1. when a query is made, we calculate frecency based on the last time the directory was accessed:
- within the last hour β
score * 4π₯ - within the last day β
score * 2β¨ - within the last week β
score / 2πΈ - otherwise β
score / 4π₯
β¨ REPORTING BUGS β¨
for any issues, feature requests, or questions, please visit:
https://github.com/ajeetdsouza/zoxide/issues
come through, we don't bite. π«Ά
β¨ AUTHOR β¨
Ajeet D'Souza <98ajeet@gmail.com>
and that's the whole page, bestie!! this was zoxide(1), from zoxide, dated 2021-04-12. go forth and z your way around the filesystem, you absolute main character. π
β¨π¦π
π¦ where this page comes from
- alpine 3.24: zoxide-doc 0.9.9-r0 Β· MIT
- arch rolling: zoxide 0.10.0-1 Β· MIT
- epel 9: zoxide 0.9.8-2.el9 Β· MIT AND MPL-2.0 AND (Apache-2.0 OR MIT) AND (MIT-0 OR Apache-2.0)
- fedora 43: zoxide 0.9.8-1.fc43 Β· MIT AND MPL-2.0 AND (Apache-2.0 OR MIT) AND (MIT-0 OR Apache-2.0)
- fedora 44: zoxide 0.9.8-2.fc44 Β· MIT AND MPL-2.0 AND (Apache-2.0 OR MIT) AND (MIT-0 OR Apache-2.0)
- nixos 26.05: zoxide 0.9.9
- nixpkgs unstable: zoxide 0.10.0
- opensuse-leap 16.0: zoxide 0.9.6-bp160.1.13 Β· MIT
- opensuse-leap 16.0: zoxide 0.9.6-bp160.1.13 Β· MIT
- opensuse-leap 16.0: zoxide 0.9.6-bp160.1.13 Β· MIT
- opensuse-leap 16.0: zoxide 0.9.6-bp160.1.13 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms