pub enum Commands {
Show 33 variants
Add(Add),
Build(Build),
Config(ConfigCmd),
Completion(Completion),
Debug(Debug),
Doc(Doc),
Download(Download),
Fmt(Fmt),
GenerateRockspec(GenerateRockspec),
Info(Info),
Install(Install),
InstallRockspec(InstallRockspec),
InstallLua,
Lint(Lint),
List(ListCmd),
Lua(RunLua),
New(NewProject),
Outdated(Outdated),
Pack(Pack),
Path(Path),
Pin(ChangePin),
Purge,
Remove(Remove),
Run(Run),
Exec(Exec),
Search(Search),
Test(Test),
Uninstall(Uninstall),
Unpin(ChangePin),
Update(Update),
Upload(Upload),
Which(Which),
Shell(Shell),
}
Variants§
Add(Add)
Add a dependency to the current project.
Build(Build)
Build/compile a project.
Config(ConfigCmd)
Interact with the lux configuration.
Completion(Completion)
Generate autocompletion scripts for the shell.{n}
Example: lx completion zsh > ~/.zsh/completions/_lx
Debug(Debug)
Internal commands for debugging Lux itself.
Doc(Doc)
Show documentation for an installed rock.
Download(Download)
Download a specific rock file from a luarocks server.
Fmt(Fmt)
Formats the codebase with stylua.
GenerateRockspec(GenerateRockspec)
Generate a rockspec file from a project.
Info(Info)
Show metadata for any rock.
Install(Install)
Install a rock for use on the system.
InstallRockspec(InstallRockspec)
Install a local rockspec for use on the system.
InstallLua
Manually install and manage Lua headers for various Lua versions.
Lint(Lint)
Lints the current project using luacheck
.
List(ListCmd)
List currently installed rocks.
Lua(RunLua)
Run lua, with the LUA_PATH
and LUA_CPATH
set to the specified lux tree.
New(NewProject)
Create a new Lua project.
Outdated(Outdated)
List outdated rocks.
Pack(Pack)
Create a packed rock for distribution, packing sources or binaries.
Path(Path)
Return the currently configured package path.
Pin(ChangePin)
Pin an existing rock, preventing any updates to the package.
Purge
Remove all installed rocks from a tree.
Remove(Remove)
Remove a rock from the current project’s lux.toml dependencies.
Run(Run)
Run the current project with the provided arguments.
Exec(Exec)
Execute a command that has been installed with lux. If the command is not found, a package named after the command will be installed.
Search(Search)
Query the luarocks servers.
Test(Test)
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}
[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 macOS and Windows]
A build backend for running busted tests with Neovim as the Lua interpreter.
Used for testing Neovim plugins.
{n}
Example:{n}
{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}
[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}
[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(Uninstall)
Uninstall a rock from the system.
Unpin(ChangePin)
Unpins an existing rock, allowing updates to alter the package.
Update(Update)
Updates all rocks in a project.
Upload(Upload)
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}
[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.
Which(Which)
Tell which file corresponds to a given module name.
Shell(Shell)
Spawns an interactive shell with PATH, LUA_PATH, LUA_CPATH and LUA_INIT set.
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self
can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnwindSafe for Commands
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more