Installation
Packages
Lux includes the following packages and libraries:
-
lux-cli
: The main CLI for interacting with projects and installing Lua packages from the command line. -
lux-lua
: The Lux Lua API, which provides:lux.loader
for resolving potentially conflicting dependencies onrequire
at runtime.- A work-in-progress API for embedding Lux into Lua applications.
We provide builds of
lux-lua
for Lua 5.1, 5.2, 5.3, 5.4 and Luajit.
-
lux-lib
: The Lux library for Rust. A dependency oflux-cli
andlux-lua
.
Binary distributions
We provide pre-built binary distributions on our GitHub repository's releases page.
These come bundled with shell completions, man pages and lux-lua
for each supported Lua version.
Linux
AppImage
- Download the AppImage for your architecture:
lx_<version>_<arch>.AppImage
- Run
chmod u+x lx_<version>_<arch>.AppImage
to make it executable.
If you system does not have FUSE, you can extract the AppImage:
./lx_<version>_<arch>.AppImage --appimage-extract
./squashfs-root/usr/bin/lx
Debian-based distributions
Download and install the .deb
package for your architecture:
lx_<version>_<arch>.deb
Arch Linux
Download the PKGBUILD
and lx_<version>_86_64.tar.gz
and install using makepkg
.
macOS
- Download the
lux-cli_<version>_<arch>.dmg
archive for your architecture. - Extract the
.app
bundle to yourApplications
. - Make sure the path containing the
lx
binary (/Applications/lux-cli.app/Contents/MacOS
) is on yourPATH
. Or, create azsh
alias to the bundledlx
binary.
As a young FOSS project, we do not notarize the macOS package, so you may have to configure Gatekeeper to allow you to use it.
Windows
- Download and run the installer:
lx_<version>_x64-setup.exe
- or
lx_<version>_x64_en-US.msi
As a young FOSS project, we do not sign the Windows package with a CA, so you will be shown a "Windows protected your PC" warning when running the installer.
- Add the install directory to your
PATH
.
Installing Lux With a Distribution's Package Manager
Nix and NixOS
If you are using Nix or NixOS,
you can install lux-cli
and lux-lua
for various Lua versions.
You may also need to configure pkg-config
so that it can find lux-lua
and Lua.
If you would like to use the latest release, our source repository also provides a Nix flake.
Arch Linux (Arch User Repository)
For the best experience, we recommend you install the lux-cli-bin
package from the AUR.
It comes bundled with shell completions, man pages and lux-lua
for each Lua version.
Installing The Latest Release Using Cargo
Due to the fact that we have no stable release yet, you must install the project
through cargo
if you want the latest release and are not using the Nix flake.
We recommend installing through cargo binstall
for fastest install times:
cargo binstall lux-cli --locked
If you don't have cargo binstall
installed, you can install Lux normally with:
cargo install lux-cli --locked
Make sure that ~/.cargo/bin/
is part of your shell's $PATH
!
- bash / zsh
- fish
- powershell
export PATH="$HOME/.cargo/bin:$PATH"
fish_add_path ~/.cargo/bin
$env:Path = "$HOME\.cargo\bin;$env:Path"
Checking Installation
Ensure that installation was successful by running lx help
.
You should see output similar to the following:
A fast and efficient Lua package manager
Usage: lx [OPTIONS] <COMMAND>
...
If you do, you're now ready to move on to the next section!