lez is available for macOS, Linux, and Windows across several installation channels.
Install from the official fxrdhan tap:
brew install fxrdhan/tap/lezOr install the latest development build from main:
brew install --HEAD fxrdhan/tap/lezDownload and install the latest prebuilt binary to ~/.local/bin in one step:
curl -fsSL https://raw.githubusercontent.com/fxrdhan/lez/main/packaging/install.sh | bashIt downloads the release's prebuilt binary for Linux on x86_64 and ARM64 and for
macOS on Apple silicon and Intel; to put it somewhere else, set INSTALL_DIR,
as in curl ... | INSTALL_DIR="$HOME/bin" bash. On a Linux system whose C
library is musl, such as Alpine, it takes the static musl binary. Where the
release has no binary for the platform, it builds the same release with Cargo
if Cargo is installed, which puts lez in ~/.cargo/bin.
Every release carries a build for each of these platforms, with their SHA-256 checksums in its notes:
| Platform | File |
|---|---|
| Linux, x86_64 | lez_x86_64-unknown-linux-gnu.tar.gz |
| Linux, ARM64 | lez_aarch64-unknown-linux-gnu.tar.gz |
| Linux, x86_64, static (musl) | lez_x86_64-unknown-linux-musl.tar.gz |
| Linux, ARM64, static (musl) | lez_aarch64-unknown-linux-musl.tar.gz |
| Debian and Ubuntu, x86_64 | lez_<version>-1_amd64.deb |
| Debian and Ubuntu, ARM64 | lez_<version>-1_arm64.deb |
| macOS, Apple silicon | lez_aarch64-apple-darwin.tar.gz |
| macOS, Intel | lez_x86_64-apple-darwin.tar.gz |
| Windows, x86_64 | lez_x86_64-pc-windows-msvc.zip |
| Windows, ARM64 | lez_aarch64-pc-windows-msvc.zip |
Each archive holds the lez binary (lez.exe on Windows), to put in a
directory on your PATH. The .deb also installs the man pages and the bash,
zsh and fish completions; on ARM64, it is the one ending in _arm64.deb:
sudo apt install ./lez_<version>-1_amd64.debThe man pages and the completions for every shell are attached to each release
as well, as man-v<version>.tar.gz and completions-v<version>.tar.gz.
The -musl archives hold a statically linked binary, which asks the system for
no C library. It is the one for Alpine, where the -gnu binary does not start,
and for a distribution whose glibc is older than the -gnu binary asks for.
Elsewhere, prefer the -gnu binary. A static binary cannot load the system's
NSS modules, so it reads user and group names from /etc/passwd and
/etc/group alone: an owner known only through LDAP, SSSD or systemd-homed is
listed by number. It is also the slower of the two on a large listing.
Download lez_x86_64-pc-windows-msvc.zip, or lez_aarch64-pc-windows-msvc.zip
on ARM, from the latest release.
Extract lez.exe into a folder of your choice and add that folder to your
PATH.
cargo install lez builds it on Windows too, with the Visual Studio C++ build
tools that Rust's MSVC toolchain needs. By default lez reads its configuration
from %APPDATA%\lez. For PowerShell completions, see PowerShell.
Install lez from crates.io:
cargo install lezOr install the precompiled binary instantly via cargo-binstall:
cargo binstall lezTo track the latest commit on main instead:
cargo install --git https://github.com/fxrdhan/lez.gitOr clone and build from your local copy:
git clone https://github.com/fxrdhan/lez.git
cd lez
cargo install --path .Cargo will compile the lez binary and install it to your Cargo binary directory ($HOME/.cargo/bin).
Building requires a C compiler and libgit2 for the git2 crate. To skip Git
support entirely and drop that requirement:
cargo install lez --no-default-featuresNote Installing packages imperatively isn't idiomatic Nix, as this can lead to many issues.
lez ships a flake, so you can run it without installing anything:
nix run github:fxrdhan/lezPass arguments after --, for example nix run github:fxrdhan/lez -- -la --icons.
To install it into a profile:
nix profile install github:fxrdhan/lezTo add it to a NixOS or home-manager configuration, add this repository as a
flake input and use its packages.${system}.default output.
Binary cache
Every commit on main is built in CI and pushed to a public Cachix
cache, so you can substitute the build instead of compiling it:
cachix use lez
nix run github:fxrdhan/lezgit clone https://github.com/fxrdhan/lez.git
cd lez
cargo build --release
sudo install -m 755 target/release/lez /usr/local/bin/lezMan pages are generated from the sources in man/ with pandoc; the just man
recipe builds them and just mangen writes them into the target directory.
Shell completions live in completions/, and each release
attaches them as completions-v<version>.tar.gz. Homebrew, the .deb and the
Nix package install the bash, zsh and fish ones for you. For any other install,
and for nushell and PowerShell, wire them up yourself.
The binary carries the same scripts, so an install that brings the binary alone,
such as mise or aqua, needs no clone: lez --completions=SHELL prints the one
for bash, zsh, fish, nushell or powershell. Save it where the steps
below put the file, or, in bash, load it directly:
source <(lez --completions=bash)
lez --completions=zsh > ~/.zfunc/_lez # a folder in $fpath
lez --completions=fish > ~/.config/fish/completions/lez.fishNote Change
~/.zshrcto your preferred zsh config file.
Clone the repository, then point FPATH at the completion directory —
replacing <path_to_lez> with wherever you cloned it:
git clone https://github.com/fxrdhan/lez.git
echo 'export FPATH="<path_to_lez>/completions/zsh:$FPATH"' >> ~/.zshrc
source ~/.zshrcsudo install -m 644 completions/bash/lez /usr/share/bash-completion/completions/lezinstall -m 644 completions/fish/lez.fish ~/.config/fish/completions/lez.fishAdd this line to your config.nu, replacing <path_to_lez> with wherever the
file is:
source <path_to_lez>/completions/nush/lez.nuOr copy lez.nu into one of the directories in $nu.user-autoload-dirs, whose
files nushell loads at startup.
Add this line to your profile (the file $PROFILE names), replacing
<path_to_lez> with wherever the file is:
. <path_to_lez>\completions\pwsh\_lez.ps1In case zsh completions don't work out of the box with homebrew, add the
following to your ~/.zshrc:
if type brew &>/dev/null; then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
autoload -Uz compinit
compinit
fiFor reference: