Installation
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)- 7-Zip (for archive extraction and 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)- ImageMagick (for SVG, Font, HEIC, and JPEG XL preview)
xclip
/wl-clipboard
/xsel
(for system clipboard support)
If the functions are not working properly, please try upgrading them to the latest version.
Packaging statusβ
Most packages on this page are maintained by the community, and they may not always be the latest. Please check their versions before installation:
Arch Linuxβ
sudo pacman -S yazi ffmpegthumbnailer p7zip jq poppler fd ripgrep fzf zoxide imagemagick
If you want to use the latest Git version, you can install it from AUR or Arch Linux CN:
paru -S yazi-git ffmpegthumbnailer p7zip jq poppler fd ripgrep fzf zoxide imagemagick
You can also install the official nightly release binary from AUR, which is built from the latest code within the past 6 hours:
paru -S yazi-nightly-bin ffmpegthumbnailer p7zip jq poppler fd ripgrep fzf zoxide imagemagick
Nixβ
A Nix package for Yazi is available.
# NixOS:
nix-env -iA nixos.yazi
# Not NixOS:
nix-env -iA nixpkgs.yazi
Or add the following to your configuration:
# configuration.nix
environment.systemPackages = with pkgs; [
yazi
];
You can also manage Yazi's configuration using home-manager, here is a configuration template example:
Demonstrate configuring Yazi with home-manager
{pkgs, ...}: let
yazi-plugins = pkgs.fetchFromGitHub {
owner = "yazi-rs";
repo = "plugins";
rev = "...";
hash = "sha256-...";
};
in {
programs.yazi = {
enable = true;
enableZshIntegration = true;
shellWrapperName = "y";
settings = {
manager = {
show_hidden = true;
};
preview = {
max_width = 1000;
max_height = 1000;
};
};
plugins = {
chmod = "${yazi-plugins}/chmod.yazi";
full-border = "${yazi-plugins}/full-border.yazi";
max-preview = "${yazi-plugins}/max-preview.yazi";
starship = pkgs.fetchFromGitHub {
owner = "Rolv-Apneseth";
repo = "starship.yazi";
rev = "...";
sha256 = "sha256-...";
};
};
initLua = ''
require("full-border"):setup()
require("starship"):setup()
'';
keymap = {
manager.prepend_keymap = [
{
on = "T";
run = "plugin --sync max-preview";
desc = "Maximize or restore the preview pane";
}
{
on = ["c" "m"];
run = "plugin chmod";
desc = "Chmod on selected files";
}
];
};
};
}
Nix flakesβ
The upstream repository provides a flake so that Nix users can easily keep up with the bleeding edge. A basic flake.nix
setup to get you started:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
yazi.url = "github:sxyazi/yazi";
};
outputs = { nixpkgs, home-manager, yazi, ... }: {
# To install Yazi system-wide:
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
modules = [
({ pkgs, ... }: {
environment.systemPackages = [ yazi.packages.${pkgs.system}.default ];
})
];
};
};
# To install it for a specific user:
homeConfigurations = {
"alice@nixos" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
({ pkgs, ... }: {
home.packages = [ yazi.packages.${pkgs.system}.default ];
})
];
};
};
};
}
If you want to override the package inside nixpkgs with the one from the flake, you can use overlays:
nixpkgs.overlays = [ yazi.overlays.default ];
A module is also available for both NixOS and home-manager:
programs.yazi = {
enable = true;
package = yazi.packages.${pkgs.system}.default; # if you use overlays, you can omit this
};
Cacheβ
Pre-built artifacts are served at https://yazi.cachix.org, so that Nix users don't have to build Yazi on their machine.
You can make use of it by adding the following options to nix.settings
, either in your NixOS or home-manager configuration:
extra-substituters = [ "https://yazi.cachix.org" ];
extra-trusted-public-keys = [ "yazi.cachix.org-1:Dcdz63NZKfvUCbDGngQDAZq6kOroIrFoyO064uvLh8k=" ];
Note that the cache will only be applied after you rebuild your Nix config. If you want to ensure that the cache gets applied right away, add the options above to your flake's nixConfig
attribute.
If you're having any problems, refer to this entry from Cachix's FAQ.
Homebrewβ
First, make sure that Homebrew is fully up-to-date with brew update
.
Then you can install Yazi (and the optional dependencies):
brew install yazi ffmpegthumbnailer sevenzip jq poppler fd ripgrep fzf zoxide imagemagick font-symbols-only-nerd-font
If you prefer to use the most recent code, use the --HEAD
flag when installing Yazi.
brew install yazi --HEAD
MacPortsβ
sudo port install yazi ffmpegthumbnailer 7zip jq poppler fd ripgrep fzf zoxide ImageMagick
NetBSDβ
pkgin install yazi ffmpegthumbnailer p7zip jq poppler fd ripgrep fzf zoxide ImageMagick
Windowsβ
Yazi relies on file(1)
to detect the mime-type of the file, and the easiest and most reliable way to get it on Windows is to install Git for Windows and use the file.exe
that comes with it.
- Install Git for Windows by running the official installer, or through your package manager of choice.
- To allow Yazi to use
file(1)
, add<Git_Installed_Directory>\usr\bin\file.exe
to yourYAZI_FILE_ONE
environment variable, which differs depending on how you installed Git:- If you installed Git with the installer, it would be
C:\Program Files\Git\usr\bin\file.exe
. - If you installed Git with Scoop, it would be
C:\Users\<Username>\scoop\apps\git\current\usr\bin\file.exe
.
- If you installed Git with the installer, it would be
- Restart your terminal.
This is the ONLY way we recommend. We do not recommend install file
via Scoop or Chocolatey, since they cannot handle Unicode filenames (such as oliver-sjoΜstroΜm.jpg
) properly and lack some required parameters.
Most users already have Git installed, and Yazi is also hosted via Git, so this usually isn't an issue. But if you really don't have/want to install it, the mime-ext.yazi
plugin can help, which use a extension database instead of relying on the file(1)
binary.
Install with Scoopβ
scoop install yazi
# Install the optional dependencies (recommended):
scoop install 7zip jq poppler fd ripgrep fzf zoxide imagemagick
Install with WinGetβ
winget install sxyazi.yazi
# Install the optional dependencies (recommended):
winget install 7zip.7zip jqlang.jq sharkdp.fd BurntSushi.ripgrep.MSVC junegunn.fzf ajeetdsouza.zoxide ImageMagick.ImageMagick
Poppler is not yet on WinGet, install with Scoop or manually download from poppler-windows.
AOSC OSβ
sudo oma install yazi
x-cmdβ
x env use yazi fzf 7za jq fd rg zoxide
Official binariesβ
You can download the latest official binaries from GitHub Releases: https://github.com/sxyazi/yazi/releases
On this page, we offer GNU/Musl builds to meet the needs of different users.
This page also includes a nightly release, which is built from the latest code within the past 6 hours.
Cargoβ
Setup the latest stable Rust toolchain via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup update
Now you can install Yazi from crates.io:
cargo install --locked yazi-fm yazi-cli
Or install the latest Git version:
cargo install --locked --git https://github.com/sxyazi/yazi.git yazi-fm yazi-cli
If it fails to build, please check if make
and gcc
is installed on your system.
Build from sourceβ
Setup the latest stable Rust toolchain via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup update
Clone the repository and build Yazi:
git clone https://github.com/sxyazi/yazi.git
cd yazi
cargo build --release --locked
Then, you can run:
./target/release/yazi
If it fails to build, please check if make
and gcc
is installed on your system.