Skip to main content

Quick Start

Once you've installed Yazi, start the program with:

yazi

Press q to quit and ~ to open the help menu.

Shell wrapper

We suggest using this y shell wrapper that provides the ability to change the current working directory when exiting Yazi.

function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}

To use it, copy the function into the configuration file of your respective shell.

Then use y instead of yazi to start, and press q to quit, you'll see the CWD changed. Sometimes, you don't want to change, press Q to quit.

Keybindings

tip

For all keybindings, see the default keymap.toml file.

To navigate between files and directories you can use the arrow keys , , and or Vim-like keys such as h, j, k, l:

Key bindingAlternate keyAction
kMove the cursor up
jMove the cursor down
lEnter hovered directory
hLeave the current directory and into its parent

Further navigation commands can be found in the table below.

Key bindingAction
KSeek up 5 units in the preview
JSeek down 5 units in the preview
ggMove cursor to the top
GMove cursor to the bottom
zJump to a directory using zoxide
ZJump to a directory or reveal a file using fzf

Selection

To select files and directories, the following commands are available.

Key bindingAction
SpaceToggle selection of hovered file/directory
vEnter visual mode (selection mode)
VEnter visual mode (unset mode)
Ctrl + aSelect all files
Ctrl + rInverse selection of all files
EscCancel selection

File operations

To interact with selected files/directories use any of the commands below.

Key bindingAction
oOpen selected files
OOpen selected files interactively
EnterOpen selected files
Shift + EnterOpen selected files interactively (some terminals don't support it yet)
TabShow the file information
yYank selected files (copy)
xYank selected files (cut)
pPaste yanked files
PPaste yanked files (overwrite if the destination exists)
Y or XCancel the yank status
dTrash selected files
DPermanently delete selected files
aCreate a file (ends with / for directories)
rRename selected file(s)
.Toggle the visibility of hidden files

Further file operation commands can be found in the table below.

Key bindingAction
;Run a shell command
:Run a shell command (block until finishes)
-Symlink the absolute path of yanked files
_Symlink the relative path of yanked files
Ctrl + -Hardlink yanked files

Copy paths

To copy paths, use any of the following commands below.

Observation: cd indicates pressing the c key followed by pressing the d key.

Key bindingAction
ccCopy the file path
cdCopy the directory path
cfCopy the filename
cnCopy the filename without extension

Filter files

Key bindingAction
fFilter files

Find files

Key bindingAction
/Find next file
?Find previous file
nGo to the next found
NGo to the previous found

Search files

Key bindingAction
sSearch files by name using fd
SSearch files by content using ripgrep
Ctrl + sCancel the ongoing search

Sorting

To sort files/directories use the following commands.

Observation: ,a indicates pressing the , key followed by pressing the a key.

Key bindingAction
,mSort by modified time
,MSort by modified time (reverse)
,bSort by birth time
,BSort by birth time (reverse)
,eSort by file extension
,ESort by file extension (reverse)
,aSort alphabetically
,ASort alphabetically (reverse)
,nSort naturally
,NSort naturally (reverse)
,sSort by size
,SSort by size (reverse)
,rSort randomly

Multi-tab

Key bindingAction
tCreate a new tab with CWD
1, 2, ..., 9Switch to the N-th tab
[Switch to the previous tab
]Switch to the next tab
{Swap current tab with previous tab
}Swap current tab with next tab
Ctrl + cClose the current tab

Flavors

Pick a color scheme you like from our flavors repository, or cooking a flavor!