lux-cli(1)

πŸ“¦ version 0.48.0, in nixpkgs unstable

✨ 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:

  • release
  • dev
  • --verbose β€” Displays verbose output of commands executed, enabling DEBUG logs. To enable TRACE logs, set RUST_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:

  • true
  • false
  • --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 nvim instead. (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. 0 means no timeout (wait forever). Default is 30. 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. 0 means no limit. Default is 0. Parallel processing queen. ⚑
  • --no-luarc β€” Do not generate or update a .luarc.json file when building a project. No luarc for you. πŸ“
  • --no-wrap-bin β€” Do not wrap Lua bin scripts. 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.json and .luarc.json files 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 using luacheck. Clean code = clean conscience. 🧼
  • lux-cli-list(1) β€” List currently installed rocks. See what you've got. πŸ“‹
  • lux-cli-lua(1) β€” Run lua, with the LUA_PATH and LUA_CPATH set 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's lux.toml dependencies. 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 the lux.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 .busted file in the project root
  • or busted is one of the test_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 .busted file in the project root
  • or busted and nlua are test_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 the lux.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-dir option 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 with PATH, LUA_PATH, LUA_CPATH and LUA_INIT set. Shell time. 🐚
  • lux-cli-sync(1) β€” Synchronize the project tree with the current lux.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