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 for macOS on
Apple silicon and Intel; to put it somewhere else, set INSTALL_DIR, as in
curl ... | INSTALL_DIR="$HOME/bin" bash. Elsewhere, such as on Linux on
ARM64, 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 |
| Debian and Ubuntu, x86_64 | lez_<version>-1_amd64.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:
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.
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.
Note 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: