Yazi

Yazi (means “duck”) is a terminal file manager written in Rust, based on non-blocking async I/O. It aims to provide an efficient, user-friendly, and customizable file management experience.

Features

  • 🚀 Full Asynchronous Support: All I/O operations are asynchronous, CPU tasks are spread across multiple threads, making the most of available resources.
  • 💪 Powerful Async Task Scheduling and Management: Provides real-time progress updates, task cancellation, and internal task priority assignment.
  • 🖼️ Built-in Support for Multiple Image Protocols: Also integrated with Überzug++, covering almost all terminals.
  • 🌟 Built-in Code Highlighting and Image Decoding: Combined with the pre-loading mechanism, greatly accelerates image and normal file loading.
  • 🔌 Concurrent Plugin System: UI plugins (rewriting most of the UI), functional plugins, custom previewer, and custom preloader; Just some pieces of Lua.
  • 🧰 Integration with fd, rg, fzf, zoxide
  • 💫 Vim-like input/select/notify component, auto-completion for cd paths
  • 🏷️ Multi-Tab Support, Cross-directory selection, Scrollable Preview (for videos, PDFs, archives, directories, code, etc.)
  • 🔄 Bulk Renaming, Visual Mode, File Chooser
  • 🎨 Theme System, Custom Layouts, Trash Bin, CSI u
  • … and more!

Screenshot

Dependencies

To use Yazi, you must have the following prerequisites installed:

  • file (for file type detection)

Yazi can be optionally extended with other command line tools to enable additional features.

  • nerd-fonts (recommended)
  • ffmpegthumbnailer (for video thumbnails)
  • unar (for archive preview)
  • jq (for JSON preview)
  • poppler (for PDF preview)
  • fd (for file searching)
  • rg (for file content searching)
  • fzf (for quick file subtree navigation)
  • zoxide (for historical directories navigation)

Shell Wrapper

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

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

Keybindings

To navigate between files and directories you can use the arrow keys , , and or Vim-like commands 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
KMove the cursor up 5 lines
JMove the cursor down 5 lines
ggMove cursor to the top
GMove cursor to the bottom

Selection

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

Key bindingAction
<Space>Toggle selection of hovered file/directory
vEnter visual mode (selection mode)
VEnter visual mode (unset mode)
<Ctrl-a>Select all files
<Ctrl-r>Inverse selection of all files
<Esc>Cancel selection

File/directory operations

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

Key bindingAction
oOpen the selected files
OOpen the selected files interactively
<Enter>Open the selected files
<Ctrl-Enter>Open the selected files interactively (some terminals don’t support it yet)
yYank the selected files (copy)
xYank the selected files (cut)
pPaste the yanked files
PPaste the yanked files (overwrite if the destination exists)
-Create a symbolic link to the yanked files (absolute path)
_Create a symbolic link to the yanked files (relative path)
dMove the files to the trash
DPermanently delete the files
aCreate a file or directory (ends with ”/” for directories)
rRename a file or directory
;Run a shell command
:Run a shell command (block the UI until the command finishes)
.Toggle the visibility of hidden files
<Ctrl-s>Cancel the ongoing search
zJump to a directory using zoxide
ZJump to a directory, or reveal a file using fzf
wShow task manager

Copying paths

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

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

Key bindingAction
ccCopy absolute path
cdCopy the path of the parent directory
cfCopy the name of the file
cnCopy the name of the file without the extension

Filtering files/directories

Key bindingAction
fFilter the files/directories in CWD

Finding files/directories

Key bindingAction
/Forward find file/directory in CWD
?Backward find file/directory in CWD
nJump to next occurrence
NJump to previous occurrence

Searching files/directories

Key bindingAction
sSearch files by name using fd
SSearch files by content using ripgrep

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)
,cSort by creation time
,CSort by creation 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)

Line Mode

You can change the output of the line mode with the following commands:

Key bindingAction
msSet linemode to size
mpSet linemode to permissions
mmSet linemode to mtime
mnSet linemode to none

Changing directories

You can quickly change directories with these commands:

Key bindingAction
ghGo to the home directory
gcGo to the config directory
gdGo to the downloads directory
gtGo to the temporary directory
g + <Space>Go to a directory interactively

Tabs

You can use tabs with the following commands:

Key bindingAction
<Ctrl-q>Close current tab
tCreate a new tab using current path
1-9Switch to tab with number
[Switch to the previous tab
]Switch to the next tab
{Swap the current tab with the previous tab
}Swap the current tab with the next tab

Configuration

There are three configuration files for Yazi:

  • yazi.toml - General configuration.
  • keymap.toml - Keybindings configuration.
  • theme.toml - Color scheme configuration.

You can find the default configuration files at https://github.com/sxyazi/yazi/tree/latest/yazi-config/preset. You can change the Yazi configuration directory by exporting the YAZI_CONFIG_HOME environment variable.