A luxurious package manager for Lua.
Key Features • How To Use • Comparison with Luarocks • Related Projects • Contributing
- Create and manage Lua projects
- Easily manage dependencies, build steps and more through the
lux.toml
file.
- Easily manage dependencies, build steps and more through the
- Parallel builds and installs 🚀
- Add/remove dependencies with simple CLI commands
- Automatic generation of rockspecs
- Say goodbye to managing 10 different rockspec files in your source code 🎉
- Integrated code formatting via
lx fmt
- Powered by stylua.
- Easily specify compatible Lua versions
- Lux will take care of Lua header installation automatically
- Forget about users complaining they have the wrong Lua headers installed on their system
- Automatic code linting via
lx check
- Powered by
luacheck
.
- Powered by
- Powerful lockfile support
- Makes for fully reproducible developer environments.
- Makes Lux easy to integrate with Nix!
- Fully compatible
- Works with existing luarocks packages.
- Have a complex rockspec that you don't want to rewrite to TOML? No problem!
Lux allows the creation of an
extra.rockspec
file, everything just works. - Have a very complex build script? Lux can shell out to
luarocks
if it knows it has to preserve maximum compatibility.
Warning
Lux, while generally functional, is a work in progress
and does not have a 1.0
release yet.
Feel free to consult the documentation on how to get started with Lux!
It features a tutorial and several guides to make you good at managing Lua projects.
As this project is still a work in progress, some luarocks features have not been (fully) implemented yet. On the other hand, lux has some features that are not present in luarocks.
The following table provides a brief comparison:
lux | luarocks v3.11.1 | |
---|---|---|
project format | TOML / Lua | Lua |
add/remove dependencies | ✅ | ❌ |
parallel builds/installs | ✅ | ❌ |
proper lockfile support with integrity checks | ✅ | ❌ (basic, dependency versions only) |
run tests with busted | ✅ | ✅ |
linting with luacheck | ✅ | ❌ |
code formatting with stylua | ✅ | ❌ |
automatic lua detection/installation | ✅ | ❌ |
default build specs | ✅ | ✅ |
custom build backends | ✅1 | ✅ |
rust-mlua build spec |
✅ (builtin) | ✅ (external build backend) |
treesitter-parser build spec |
✅ (builtin) | ✅ (external build backend) |
install pre-built binary rocks | ✅ | ✅ |
install multiple packages with a single command | ✅ | ❌ |
install packages using version constraints | ✅ | ❌ |
auto-detect external dependencies and Lua headers with pkg-config |
✅ | ❌ |
resolve multiple versions of the same dependency at runtime | ✅ | ✅ |
pack and upload pre-built binary rocks | ✅ | ✅ |
luarocks.org manifest namespaces | ✅ | ✅ |
luarocks.org dev packages | ✅ | ✅ |
versioning | SemVer2 | arbitrary |
rockspecs with CVS/Mercurial/SVN/SSCM sources | ❌ (YAGNI3) | ✅ |
static type checking | ❌ (planned) | ❌ |
- luarocks - The original Lua package manager
- rocks.nvim - A Neovim plugin manager that uses
luarocks
under the hood, and will soon be undergoing a rewrite to use Lux instead.
Credits go to the Luarocks team for maintaining luarocks and luarocks.org for as long as they have. Without their prior work Lux would not be possible.
Contributions are more than welcome! See CONTRIBUTING.md for a guide.
- Lux is licensed under MIT.
- The Lux logo © 2025 by Kai Jakobi is licensed under CC BY-NC-SA 4.0.
Footnotes
-
Supported via a compatibility layer that uses luarocks as a backend. ↩
-
Mostly compatible with the luarocks version parser, which allows an arbitrary number of version components. To comply with SemVer, we treat anything after the third version component (except for the specrev) as a prerelease/build version. ↩