lux-cli(1)
β¨ LUX-CLI(1) β The Most Iconic Package Manager for Lua π
Okay bestie, listen up. This is the manual for lux-cli(1) β yeah, the luxurious package manager for Lua. It's giving main character energy, and you're about to understand every single flag, option, and subcommand. No cap. Let's go. π
πΈ NAME πΈ
lux-cli β A luxurious package manager for Lua. Periodt. π
π¦ SYNOPSIS π¦
lux-cli [--dev] [--server] [--extra-servers] [--namespace] [--lua-dir]
[--lua-version] [--tree] [--cache-dir] [--no-manifest-cache]
[--data-dir] [--vendor-dir] [--variables] [--profile] [--verbose]
[--no-progress] [--no-prompt] [--preset] [--nvim] [--no-tfa] [--timeout]
[--max-jobs] [--no-luarc] [--no-wrap-bin] [--user-agent] [-h|--help]
[-V|--version] <subcommands>
π DESCRIPTION π
A luxurious package manager for Lua. It's literally that simple. Lux handles your rocks, your rockspecs, your projects, your trees β all of it. She's the moment. π
π OPTIONS π
Okay so here's the full rundown of every flag. Don't skip a single one β they all matter, iykyk.
--devβ Enables the sub-repositories in luarocks servers for rockspecs of in-development versions. Like, the pre-release vibes. π₯--server <server>β Fetches rocks/rockspecs from this server. Takes priority over the config file. You're in charge, bestie. π--extra-servers <extra-server>β Fetches rocks/rockspecs from these servers in addition to the main server. Overrides any entries in the config file. More sources, more slay. β¨--namespace <namespace>β Specifies the luarocks server namespace to use. Gotta keep your namespaces organized. π―--lua-dir <prefix>β Specifies the directory in which to install Lua if not found. Like a little home for your Lua installation. π--lua-version <ver>β Which Lua installation to use. Valid versions are:'5.1','5.2','5.3','5.4','5.5','jit'and'jit52'. If not set, Lux will attempt to detect the Lua version:- From the current project, if it has an exact Lua version requirement.
- From the Lua installation that is available on the
PATH.
--tree <tree>β Which tree to operate on. In a workspace, this can be used to specify a detached workspace tree. It's giving organizational queen. π³--cache-dir <cache-dir>β Specifies the cache directory, e.g. for luarocks manifests. Gotta cache 'em all. πΎ--no-manifest-cacheβ Disables the precomputed manifest cache. No cache for you. π ββοΈ--data-dir <data-dir>β Specifies the data directory, in which the default user install tree resides (e.g.~/.local/share/lux). That's where your stuff lives. π--vendor-dir <vendor-dir>β Specifies a directory with locally vendored sources and RockSpecs. When building or installing a package with this flag, Lux will fetch sources from the<vendor-dir>instead of from a remote server. Local love. π‘--variables <variable>β Override config variables. Example:lx -v "LUA=/path/to/lua" .... Because sometimes you need to tweak things. π§--profile <profile>β The build profile to use when compiling packages. Default:release.
Possible values:
releasedev
--verboseβ Displays verbose output of commands executed, enablingDEBUGlogs. To enableTRACElogs, setRUST_LOG=trace. Maximum spill-the-tea energy. π£οΈ--no-progressβ Don't print any progress bars or spinners. Just silence. Peaceful. π§ββοΈ--no-prompt <NO_PROMPT>β Skip prompts, selecting the default option. Prompting is enabled by default in terminal/TTY environments.
Possible values:
truefalse
--preset <preset>β Configure Lux for a specific environment. Valid presets are:'nvim'.
Possible values:
nvim: Configure Lux for Neovim plugins.
--nvimβ[DEPRECATED]Configure lux for installing Neovim packages. Use--preset nviminstead. (RIP to the old way, but we move. π)--no-tfaβ Disable prompts for two-factor authentication (2FA) codes. It is strongly recommended to enable 2FA instead β see https://luarocks.org/settings/two-factor-auth. > Security matters, bestie. Don't skip 2FA unless you absolutely have to. π--timeout <seconds>β Timeout on network operations, in seconds.0means no timeout (wait forever). Default is30. Ain't nobody got time to wait forever. β³--max-jobs <MAX_JOBS>β Maximum buffer size for parallel jobs, such as downloading rockspecs and installing rocks.0means no limit. Default is0. Parallel processing queen. β‘--no-luarcβ Do not generate or update a.luarc.jsonfile when building a project. No luarc for you. π--no-wrap-binβ Do not wrap Luabinscripts. Leave 'em unwrapped. π--user-agent <USER_AGENT>β The user agent to set when making web requests. Default is"lux/<version>". Gotta identify yourself online. π΅οΈββοΈ-h,--helpβ Print help (see a summary with-h). Your guide to everything. π-V,--versionβ Print version. Know your Lux. π
π SUBCOMMANDS π
Here's where the real magic happens. Every subcommand is its own little icon. Let's break 'em down. π«Ά
lux-cli-add(1)β Add a dependency to the current project. πlux-cli-build(1)β Build/compile a project. π¨lux-cli-check(1)β[EXPERIMENTAL]Type check the current project based on EmmyLua/LuaCATS annotations. Respects.emmyrc.jsonand.luarc.jsonfiles in the project directory. Type safety, slay. π§lux-cli-config(1)β Interact with the lux configuration. βοΈlux-cli-debug(1)β Internal commands for debugging Lux itself. For when you need to look under the hood. πlux-cli-dist(1)β Distribute a Lux project. Share the love. π¦lux-cli-doc(1)β Show documentation for an installed rock. Knowledge is power. πlux-cli-download(1)β Download a specific rock file from a luarocks server. Get that rock. πͺ¨lux-cli-fmt(1)β Formats the codebase with stylua. Pretty code, pretty vibes. β¨lux-cli-generate-rockspec(1)β Generate a rockspec file from a project. Rockspec magic. πͺlux-cli-generate-lockfile(1)β Generate a lockfile for the current project without installing its dependencies. Lock it in. πlux-cli-info(1)β Show metadata for any rock. The tea on your rocks. βlux-cli-install(1)β Install a rock for use on the system. System-wide slay. π₯οΈlux-cli-install-rockspec(1)β Install a local rockspec for use on the system. Local love. πlux-cli-install-lua(1)β Manually install and manage Lua headers for various Lua versions. Headers, headers, headers. πlux-cli-lint(1)β Lint the current project usingluacheck. Clean code = clean conscience. π§Όlux-cli-list(1)β List currently installed rocks. See what you've got. πlux-cli-lua(1)β Run lua, with theLUA_PATHandLUA_CPATHset to the specified lux tree. Lua, but make it lux. πlux-cli-new(1)β Create a new Lua project. Fresh start, new project. π±lux-cli-outdated(1)β List outdated rocks. Time to update, bestie. β°lux-cli-pack(1)β Create a packed rock for distribution, packing sources or binaries. Pack it up, pack it in. πlux-cli-path(1)β Return the currently configured package path. Where the packages at? πΊοΈlux-cli-pin(1)β Pin an existing rock, preventing any updates to the package. Locked in place. πlux-cli-purge(1)β Remove all installed rocks from a tree. Clean slate. π§Ήlux-cli-remove(1)β Remove a rock from the current project'slux.tomldependencies. Bye Felicia. πlux-cli-run(1)β Run the current project with the provided arguments. Run it. πββοΈlux-cli-exec(1)β Execute a command that has been installed with lux. If the command is not found, a package named after the command will be installed. Automatic. β¨lux-cli-search(1)β Query the luarocks servers. Search far and wide. πlux-cli-test(1)β Run the test suite in the current project directory. Lux supports the following test backends, specified by the[test]table in thelux.toml:
Example:
[test]
type = "busted"
flags = [ ] # Optional CLI flags to pass to busted
lx test will default to using busted if no test backend is specified and:
- there is a
.bustedfile in the project root - or
bustedis one of thetest_dependencies.
busted-nlua: A build backend for running busted tests with Neovim as the Lua interpreter. Used for testing Neovim plugins.
Example:
[test]
type = "busted-nlua"
flags = [ ] # Optional CLI flags to pass to busted
lx test will default to using busted-nlua if no test backend is specified and:
- there is a
.bustedfile in the project root - or
bustedandnluaaretest_dependencies.
command: Name/file name of a shell command that will run the test suite.
Example:
[test]
type = "command"
command = "make"
flags = [ "test" ]
script: Relative path to a Lua script that will run the test suite.
Example:
[test]
type = "script"
script = "tests.lua" # Expects a tests.lua file in the project root
flags = [ ] # Optional arguments passed to the test script
lux-cli-uninstall(1)β Uninstall a rock from the system. Remove it. ποΈlux-cli-unpin(1)β Unpins an existing rock, allowing updates to alter the package. Free it. ποΈlux-cli-update(1)β Updates all rocks in a project. Refresh. πlux-cli-upload(1)β Generate a Lua rockspec for a Lux project and upload it to the public luarocks repository. You can specify a source template for release and dev packages in thelux.toml.
Example:
[source]
url = "https://host.com/owner/$(PACKAGE)/refs/tags/$(REF).zip"
dev = "git+https://host.com/owner/$(PACKAGE).git"
You can use the following variables in the source template:
$(PACKAGE): The package name.$(VERSION): The package version.$(REF): The git tag or revision (if in a git repository).- You may also specify environment variables with
$(<VAR_NAME>).
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. Upload queen. π
lux-cli-util(1)β Infrequently used commands such as for generating shell completions and man pages. The utility belt. π οΈlux-cli-vendor(1)β Vendor the dependencies of a project or RockSpec locally. When building or installing a package with the--vendor-diroption or the[vendor_dir]config option, Lux will fetch sources from the<vendor-dir>instead of from a remote server. Local dependencies, local vibes. π‘lux-cli-which(1)β Tell which file corresponds to a given module name. Where's that module? ποΈlux-cli-shell(1)β Spawns an interactive shell withPATH,LUA_PATH,LUA_CPATHandLUA_INITset. Shell time. πlux-cli-sync(1)β Synchronize the project tree with the currentlux.toml, ensuring all packages are installed correctly. Sync it up. πlux-cli-help(1)β Print this message or the help of the given subcommand(s). Help is always here. π
π VERSION π
v0.48.0 β that's the version, bestie. Remember it. π
π«Ά AUTHORS π«Ά
vhyrro <vhyrro@gmail.com>mrcjkb <marc@jakobi.dev>
Legends, both of them. π
Okay that's the whole manual! You're now fully caught up on lux-cli(1). This was lux-cli 0.48.0, manual page lux-cli(1). Stay luxurious, bestie! π
β¨π
π¦ where this page comes from
- nixpkgs unstable: lux-cli 0.48.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms