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 yy
shell wrapper that provides the ability to change the current working directory when exiting Yazi.
- Bash / Zsh
- Fish
- Nushell
- PowerShell
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"
}
function yy
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
cd -- "$cwd"
end
rm -f -- "$tmp"
end
def --env yy [...args] {
let tmp = (mktemp -t "yazi-cwd.XXXXXX")
yazi ...$args --cwd-file $tmp
let cwd = (open $tmp)
if $cwd != "" and $cwd != $env.PWD {
cd $cwd
}
rm -fp $tmp
}
function yy {
$tmp = [System.IO.Path]::GetTempFileName()
yazi $args --cwd-file="$tmp"
$cwd = Get-Content -Path $tmp
if (-not [String]::IsNullOrEmpty($cwd) -and $cwd -ne $PWD.Path) {
Set-Location -Path $cwd
}
Remove-Item -Path $tmp
}
To use it, copy the function into the configuration file of your respective shell. Then use yy
instead of yazi
to start.
Keybindings
For all keybindings, see the default keymap.toml
file.
Navigation
To navigate between files and directories you can use the arrow keys ←, ↓, ↑ and → or Vim-like keys such as h, j, k, l:
Key binding | Alternate key | Action |
---|---|---|
k | ↑ | Move the cursor up |
j | ↓ | Move the cursor down |
l | → | Enter hovered directory |
h | ← | Leave the current directory and into its parent |
Further navigation commands can be found in the table below.
Key binding | Action |
---|---|
K | Move the cursor up 5 lines |
J | Move the cursor down 5 lines |
g ⇒ g | Move cursor to the top |
G | Move cursor to the bottom |
Selection
To select files and directories, the following commands are available.
Key binding | Action |
---|---|
Space | Toggle selection of hovered file/directory |
v | Enter visual mode (selection mode) |
V | Enter 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 binding | Action |
---|---|
o | Open the selected files |
O | Open the selected files interactively |
Enter | Open the selected files |
Ctrl + Enter | Open the selected files interactively (some terminals don't support it yet) |
y | Yank the selected files (copy) |
x | Yank the selected files (cut) |
p | Paste the yanked files |
P | Paste the yanked files (overwrite if the destination exists) |
Y or X | Cancel the yank state (unyank) |
- | Create a symbolic link to the yanked files (absolute path) |
_ | Create a symbolic link to the yanked files (relative path) |
d | Move the files to the trash |
D | Permanently delete the files |
a | Create a file or directory (ends with "/" for directories) |
r | Rename 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 |
z | Jump to a directory using zoxide |
Z | Jump to a directory, or reveal a file using fzf |
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 binding | Action |
---|---|
c ⇒ c | Copy absolute path |
c ⇒ d | Copy the path of the parent directory |
c ⇒ f | Copy the name of the file |
c ⇒ n | Copy the name of the file without the extension |
Filtering files/directories
Key binding | Action |
---|---|
f | Filter the files/directories in CWD |
Finding files/directories
Key binding | Action |
---|---|
/ | Forward find file/directory in CWD |
? | Backward find file/directory in CWD |
n | Jump to next occurrence |
N | Jump to previous occurrence |
Searching files/directories
Key binding | Action |
---|---|
s | Search files by name using fd |
S | Search 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 binding | Action |
---|---|
, ⇒ m | Sort by modified time |
, ⇒ M | Sort by modified time (reverse) |
, ⇒ c | Sort by creation time |
, ⇒ C | Sort by creation time (reverse) |
, ⇒ e | Sort by file extension |
, ⇒ E | Sort by file extension (reverse) |
, ⇒ a | Sort alphabetically |
, ⇒ A | Sort alphabetically (reverse) |
, ⇒ n | Sort naturally |
, ⇒ N | Sort naturally (reverse) |
, ⇒ s | Sort by size |
, ⇒ S | Sort by size (reverse) |
Flavors
Check out our flavors repository, or cooking a flavor!