The spiritual successor to Ranger, rewritten in Rust—ten times faster.
Yazi is a Rust-based terminal file manager aiming to be “Finder in the terminal.” It supports async I/O, parallel preview, and a built-in plugin system, delivering a very modern experience.
Installation#
In NixOS home.nix or configuration.nix:
home.packages = with pkgs; [
yazi
];Or install via cargo:
cargo install --locked yazi-fm yazi-cliBasic Operations#
Launch: yazi
| Key | Action |
|---|---|
j/k or ↓/↑ | Move up/down |
h/l or ←/→ | Enter/exit directory |
Enter | Open file |
Space | Select/deselect |
y | Copy |
d | Cut |
p | Paste |
D | Delete (to trash) |
/ | Search |
z | Jump (zoxide integration) |
~ | Go to home directory |
Killer Features#
1. Real-time Preview#
Preview content without opening files:
- Images: Display directly in terminal (requires sixel/kitty/iTerm2 support)
- PDF: First page thumbnail
- Video: First frame screenshot
- Code: Syntax highlighting
Works best with Kitty terminal on NixOS.
2. Async Operations#
Copying a 10GB folder won’t block the UI. You can continue browsing while the operation runs in the background.
3. Zoxide Integration#
If you use zoxide (the z command), Yazi has built-in support:
Press z → type "doc" → Enter
Jumps directly to ~/Documents4. Shell Integration#
Add to .bashrc / .zshrc / config.fish:
# Auto-cd to current directory on quit
function yy() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd"
fi
rm -f -- "$tmp"
}Usage: yy to launch Yazi, press q to quit, and your shell automatically cds to the last visited directory.
Configuration#
Yazi config lives in ~/.config/yazi/:
~/.config/yazi/
├── yazi.toml # Main config
├── keymap.toml # Key bindings
├── theme.toml # Theme
└── plugins/ # PluginsMy keymap.toml snippet#
[[manager.prepend_keymap]]
on = [ "g", "d" ]
run = 'cd ~/Documents'
desc = "Go to Documents"
[[manager.prepend_keymap]]
on = [ "g", "D" ]
run = 'cd ~/Downloads'
desc = "Go to Downloads"
[[manager.prepend_keymap]]
on = [ "g", "c" ]
run = 'cd ~/.config'
desc = "Go to Config"Ranger vs Yazi#
| Feature | Ranger | Yazi |
|---|---|---|
| Language | Python | Rust |
| Startup | Slow (~1s) | Instant (<50ms) |
| Async I/O | No | Native |
| Image Preview | Extra config needed | Works out of the box |
| Plugin Ecosystem | Rich | Growing |
| Memory | Higher | Very low |
If you’re still using Ranger, I highly recommend trying Yazi. Same muscle memory, but several levels better.
Next up: Fish Shell Configuration Guide