lux-cli(1) General Commands Manual lux-cli(1)

lux-cli - A luxurious package manager for Lua

lux-cli [--dev] [--server] [--extra-servers] [--only-sources] [--namespace] [--lua-dir] [--lua-version] [--tree] [--cache-dir] [--data-dir] [--vendor-dir] [--variables] [--verbose] [--no-progress] [--nvim] [--timeout] [--max-jobs] [--no-luarc] [-h|--help] [-V|--version] <subcommands>

A luxurious package manager for Lua

Enable the sub-repositories in luarocks servers for rockspecs of in-development versions
Fetch rocks/rockspecs from this server (takes priority over config file)
Fetch rocks/rockspecs from this server in addition to the main server{n} (overrides any entries in the config file)
Restrict downloads to paths matching the given URL
Specify the luarocks server namespace to use
Specify the directory in which to install Lua{n} if not found
Which Lua installation to use.{n} Valid versions are: '5.1', '5.2', '5.3', '5.4', 'jit' and 'jit52'
Which tree to operate on
Specifies the cache directory for e.g. luarocks manifests
Specifies the data directory (e.g. ~/.local/share/lux)
Specifies a directory with locally vendored sources and RockSpecs.{n} When building or installing a package with this flag,{n} Lux will fetch sources from the <vendor-dir> instead of from a remote server
Override config variables.{n} Example: `lx -v "LUA=/path/to/lua" ...`
Display verbose output of commands executed
Don't print any progress bars or spinners
Configure lux for installing Neovim packages
Timeout on network operations, in seconds.{n} 0 means no timeout (wait forever). Default is 30
Maximum buffer size for parallel jobs, such as downloading rockspecs and installing rocks. 0 means no limit. Default is 0
Do not generate or update a `.luarc.json` file when building{n} a project
Print help
Print version

Add a dependency to the current project
Build/compile a project
[EXPERIMENTAL]{n} Type check the current project based on EmmyLua/LuaCATS annotations.{n} Respects `.emmyrc.json` and `.luarc.json` files in the project directory
Interact with the lux configuration
Generate autocompletion scripts for the shell.{n} Example: `lx completion zsh > ~/.zsh/completions/_lx`
Internal commands for debugging Lux itself
Show documentation for an installed rock
Download a specific rock file from a luarocks server
Formats the codebase with stylua
Generate a rockspec file from a project
Show metadata for any rock
Install a rock for use on the system
Install a local rockspec for use on the system
Manually install and manage Lua headers for various Lua versions
Lint the current project using `luacheck`
List currently installed rocks
Run lua, with the `LUA_PATH` and `LUA_CPATH` set to the specified lux tree
Create a new Lua project
List outdated rocks
Create a packed rock for distribution, packing sources or binaries
Return the currently configured package path
Pin an existing rock, preventing any updates to the package
Remove all installed rocks from a tree
Remove a rock from the current project's lux.toml dependencies
Run the current project with the provided arguments
Execute a command that has been installed with lux. If the command is not found, a package named after the command will be installed
Query the luarocks servers
Run the test suite in the current project directory.{n} Lux supports the following test backends, specified by the `[test]` table in the lux.toml:{n} {n} - busted:{n} {n} https://lunarmodules.github.io/busted/{n} {n} Example:{n} {n} ```toml{n} [test]{n} type = "busted"{n} flags = [ ] # Optional CLI flags to pass to busted{n} ```{n} {n} `lx test` will default to using `busted` if no test backend is specified and:{n} * there is a `.busted` file in the project root{n} * or `busted` is one of the `test_dependencies`).{n} {n} - busted-nlua:{n}: {n} [currently broken on Windows]{n} A build backend for running busted tests with Neovim as the Lua interpreter. Used for testing Neovim plugins. {n} Example:{n} {n} ```toml{n} [test]{n} type = "busted-nlua"{n} flags = [ ] # Optional CLI flags to pass to busted{n} ```{n} {n} `lx test` will default to using `busted-nlua` if no test backend is specified and:{n} * there is a `.busted` file in the project root{n} * or `busted` and `nlua` are `test_dependencies`.{n} {n} - command:{n} {n} Name/file name of a shell command that will run the test suite.{n} Example:{n} {n} ```toml{n} [test]{n} type = "command"{n} command = "make"{n} flags = [ "test" ]{n} ```{n} {n} - script:{n} {n} Relative path to a Lua script that will run the test suite.{n} Example:{n} {n} ```toml{n} [test]{n} type = "script"{n} script = "tests.lua" # Expects a tests.lua file in the project root{n} flags = [ ] # Optional arguments passed to the test script{n} ```{n}
Uninstall a rock from the system
Unpins an existing rock, allowing updates to alter the package
Updates all rocks in a project
Generate a Lua rockspec for a Lux project and upload it to the public luarocks repository.{n} You can specify a source template for release and dev packages in the lux.toml.{n} {n} Example:{n} {n} ```toml{n} [source]{n} url = "https://host.com/owner/$(PACKAGE)/refs/tags/$(REF).zip"{n} dev = "git+https://host.com/owner/$(PACKAGE).git"{n} ```{n} {n} You can use the following variables in the source template:{n} {n} - $(PACKAGE): The package name.{n} - $(VERSION): The package version.{n} - $(REF): The git tag or revision (if in a git repository).{n} - You may also specify environment variables with `$(<VAR_NAME>)`.{n} {n} If the `version` is not set in the lux.toml, lux will search the current commit for SemVer tags and if found, will use it to generate the package version
Vendor the dependencies of a project or RockSpec locally. When building or installing a package with the `--vendor-dir` option{n} or the `[vendor_dir]` config option, Lux will fetch sources from the <vendor-dir>{n} instead of from a remote server
Tell which file corresponds to a given module name
Spawns an interactive shell with PATH, LUA_PATH, LUA_CPATH and LUA_INIT set
Print this message or the help of the given subcommand(s)

v0.25.1

vhyrro <vhyrro@gmail.com>, mrcjkb <marc@jakobi.dev>

lux-cli 0.25.1