Skip to main content

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 on require 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 of lux-cli and lux-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

  1. Download the AppImage for your architecture:
  • lx_<version>_<arch>.AppImage
  1. 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

  1. Download the lux-cli_<version>_<arch>.dmg archive for your architecture.
  2. Extract the .app bundle to your Applications.
  3. Make sure the path containing the lx binary (/Applications/lux-cli.app/Contents/MacOS) is on your PATH. Or, create a zsh alias to the bundled lx binary.
note

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

  1. Download and run the installer:
  • lx_<version>_x64-setup.exe
  • or lx_<version>_x64_en-US.msi
note

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.

  1. Add the install directory to your PATH.

Installing Lux With a Distribution's Package Manager

Packaging status

Nix and NixOS

nixpkgs unstable package

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
For new cargo users

Make sure that ~/.cargo/bin/ is part of your shell's $PATH!

export PATH="$HOME/.cargo/bin:$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!