Skip to content

Yazi

Blazing fast terminal file manager written in Rust with async I/O, image preview, plugin system, and multi-tab support.

CommandDescription
brew install yazi ffmpegthumbnailer unar jq poppler fd ripgrep fzf zoxide imagemagickFull install on macOS with all preview dependencies
brew install yaziMinimal install on macOS
cargo install --locked yazi-fm yazi-cliInstall from crates.io
pacman -S yazi ffmpegthumbnailer unarchiver jq poppler fd ripgrep fzf zoxideFull install on Arch Linux
scoop install yaziInstall on Windows with Scoop
winget install sxyazi.yaziInstall on Windows with winget
nix-env -i yaziInstall on NixOS
snap install yazi --classicInstall on Ubuntu via Snap
CommandDescription
yaziLaunch Yazi in current directory
yazi /path/to/dirOpen Yazi in specific directory
yazi --versionShow installed version
ya --versionShow CLI helper version
yazi --cwd-file=/tmp/cwdSave last directory on exit
# Bash/Zsh — add to ~/.bashrc or ~/.zshrc
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"
  done
  rm -f -- "$tmp"
}
# Fish — add to ~/.config/fish/config.fish
function y
  set tmp (mktemp -t "yazi-cwd.XXXXXX")
  yazi $argv --cwd-file="$tmp"
  if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
    builtin cd -- "$cwd"
  end
  rm -f -- "$tmp"
end
CommandDescription
j or Move cursor down
k or Move cursor up
h or Go to parent directory
l or or EnterEnter directory or open file
g gGo to first item
GGo to last item
~Go to home directory
BackspaceGo to parent directory
Ctrl + uScroll half page up
Ctrl + dScroll half page down
Ctrl + bScroll full page up
Ctrl + fScroll full page down
CommandDescription
zJump to directory with zoxide
ZJump with zoxide (interactive fzf)
-Go to previous directory
Ctrl + oGo back in navigation history
Ctrl + iGo forward in navigation history
CommandDescription
oOpen file with default program
OOpen file interactively (choose program)
EnterOpen file or enter directory
qQuit Yazi
QQuit without writing cwd-file
CommandDescription
yYank (copy) selected files
xCut selected files
pPaste yanked/cut files
PPaste with overwrite
Y or XCancel yank/cut
- then pPaste as symlink (absolute)
_ then pPaste as symlink (relative)
Ctrl + pPaste as hardlink
CommandDescription
aCreate new file or directory (trailing / = dir)
rRename selected file
cRename with cursor at end
dTrash selected files
DPermanently delete selected files
.Toggle hidden files visibility
Creating files and directories:
  a myfile.txt      → Creates a new file
  a mydir/          → Creates a new directory (trailing slash)
  a path/to/file    → Creates nested structure

Bulk rename:
  Select multiple files → r → Opens $EDITOR
  Each line = one filename, edit and save to rename all
CommandDescription
SpaceToggle selection on current file
VEnter visual (multi-select) mode
Ctrl + aSelect all files
Ctrl + rInvert selection
EscapeClear selection
CommandDescription
mSave current directory as bookmark
'Jump to a bookmark
"Delete a bookmark
CommandDescription
tCreate new tab in current directory
Ctrl + cClose current tab
1 - 9Switch to tab by number
[Switch to previous tab
]Switch to next tab
{Swap tab with previous
}Swap tab with next
CommandDescription
/Search files in current directory
?Search files backwards
nGo to next search match
NGo to previous search match
CommandDescription
fFilter files (show only matching)
sSearch files using fd (recursive)
SSearch file contents using ripgrep
: then type commandOpen command mode
File search with fd (press 's'):
  Recursively finds files by name pattern
  Uses fd under the hood for fast searching
  Results shown in picker — Enter to jump

Content search with ripgrep (press 'S'):
  Searches file contents recursively
  Uses ripgrep for fast text search
  Results show file + matching line
CommandDescription
Preview pane shows file contentsAutomatic for supported types
TabToggle preview pane visibility
Ctrl + Shift + =Increase preview pane width
Ctrl + Shift + -Decrease preview pane width
TypeRequirement
Text filesBuilt-in with syntax highlighting
Images (PNG, JPG, GIF)Kitty, iTerm2, or Sixel protocol
SVG filesImageMagick
PDF documentsPoppler (pdftoppm)
Video thumbnailsffmpegthumbnailer
Archives (zip, tar, etc.)unar or 7z
MarkdownBuilt-in rendering
JSON/YAMLBuilt-in formatting
DirectoriesBuilt-in listing
Image preview protocols (auto-detected):

Kitty    — Kitty terminal (best quality)
iTerm2   — iTerm2, WezTerm, Mintty
Sixel    — Many terminals (foot, mlterm, etc.)
X11/Wayland — Via ueberzugpp (fallback)

Set protocol manually in yazi.toml:
  [preview]
  image_quality = 75
CommandDescription
,mSort by modified time
,MSort by modified time (reversed)
,cSort by created time
,CSort by created time (reversed)
,eSort by extension
,ESort by extension (reversed)
,sSort by size
,SSort by size (reversed)
,nSort by name (natural)
,NSort by name (reversed)
,rRandom sort
wToggle tasks manager
TToggle layout (1/2/3 columns)
FilePurpose
~/.config/yazi/yazi.tomlMain configuration
~/.config/yazi/keymap.tomlCustom key bindings
~/.config/yazi/theme.tomlColor theme
~/.config/yazi/init.luaLua init script (plugins)
# ~/.config/yazi/yazi.toml

[manager]
ratio = [1, 4, 3]          # Column ratios (parent, current, preview)
sort_by = "natural"         # natural, modified, created, extension, size
sort_sensitive = false       # Case-sensitive sorting
sort_reverse = false         # Reverse sort order
sort_dir_first = true        # Directories before files
linemode = "size"           # none, size, permissions, mtime
show_hidden = false          # Show hidden files
show_symlink = true          # Show symlink targets

[preview]
tab_size = 2                # Tab width in previews
max_width = 600             # Max preview width
max_height = 900            # Max preview height
image_quality = 75          # JPEG quality for image previews
sixel_fraction = 15         # Sixel resolution fraction

[opener]
edit = [
  { run = '${EDITOR:-vi} "$@"', block = true, for = "unix" },
  { run = 'code "%*"', orphan = true, for = "windows" },
]

[tasks]
micro_workers = 10          # Small file operations
macro_workers = 25          # Large file operations
bizarre_retry = 5           # Retry on error
# ~/.config/yazi/keymap.toml

[[manager.prepend_keymap]]
on = ["g", "d"]
run = "cd ~/Downloads"
desc = "Go to downloads"

[[manager.prepend_keymap]]
on = ["g", "p"]
run = "cd ~/projects"
desc = "Go to projects"

[[manager.prepend_keymap]]
on = ["g", "c"]
run = "cd ~/.config"
desc = "Go to config"

# Open terminal in current directory
[[manager.prepend_keymap]]
on = ["!"]
run = 'shell "$SHELL" --block'
desc = "Open terminal here"

# Compress selected files
[[manager.prepend_keymap]]
on = ["C"]
run = 'shell "zip -r archive.zip $@" --block'
desc = "Compress selection"
# ~/.config/yazi/theme.toml

[filetype]
rules = [
  { name = "*/", fg = "#7aa2f7" },           # Directories
  { mime = "text/*", fg = "#c0caf5" },        # Text files
  { mime = "image/*", fg = "#bb9af7" },       # Images
  { mime = "video/*", fg = "#e0af68" },       # Videos
  { mime = "audio/*", fg = "#9ece6a" },       # Audio
  { name = "*.rs", fg = "#ff9e64" },          # Rust files
  { name = "*.py", fg = "#7aa2f7" },          # Python files
  { name = "*.md", fg = "#73daca" },          # Markdown
]
CommandDescription
ya pack -a owner/pluginInstall a plugin
ya pack -iInstall all plugins from package.toml
ya pack -uUpdate all installed plugins
ya pack -lList installed plugins
PluginDescription
yazi-rs/plugins:full-borderFull border around panes
yazi-rs/plugins:gitGit status indicators
yazi-rs/plugins:chmodChange file permissions
yazi-rs/plugins:max-previewMaximize preview pane
yazi-rs/plugins:jump-to-charVim-style jump to character
DreamMaoMao/searchjump.yaziSearch and jump to files
# ~/.config/yazi/package.toml
[plugin]
prepend_previewers = [
  { name = "*.md", run = "glow" },
]

# Install and activate
# ya pack -a yazi-rs/plugins:full-border
# ya pack -a yazi-rs/plugins:git
# ya pack -i
-- ~/.config/yazi/init.lua
-- Activate installed plugins
require("full-border"):setup()
require("git"):setup()
  1. Install all preview dependencies — Install ffmpegthumbnailer, poppler, unar, jq, fd, ripgrep, and imagemagick for the full preview experience. Without them, many file types show raw text.

  2. Use the shell wrapper — Set up the y function wrapper so you cd to the last directory when exiting Yazi, making it a true navigation tool instead of just a viewer.

  3. Add directory bookmarks — Configure custom keybindings for frequent directories (g d for Downloads, g p for projects) in keymap.toml to navigate instantly.

  4. Enable zoxide integration — With zoxide installed, pressing z in Yazi lets you fuzzy-jump to any previously visited directory without navigating manually.

  5. Use tabs for multi-location work — Press t to open new tabs when you need to work across multiple directories, then use 1-9 to switch instantly.

  6. Customize column ratios — Adjust ratio = [1, 4, 3] in yazi.toml to balance parent listing, current directory, and preview pane for your screen size.

  7. Install the git plugin — The yazi-rs/plugins:git plugin shows git status indicators next to files, making it easy to see modified, staged, and untracked files.

  8. Use visual mode for bulk operations — Press V to enter visual mode, then j/k to extend selection, then y/x/d for batch copy/cut/delete.

  9. Configure your theme — Customize theme.toml with colors that match your terminal theme for a cohesive look. Set different colors per file type for quick visual identification.

  10. Use content search — Press S to search file contents with ripgrep — it’s like having grep -r with an interactive file picker built in.