Luap is a simple Lua Package Manager. It is designed to be simple and easy to use. Luap is based on GitHub for package management. With Luap, you can easily download, install, and manage Lua packages from GitHub. Whether for personal projects or team collaboration, Luap helps you efficiently manage dependencies, ensuring consistency and maintainability of your projects. It supports cloning packages from GitHub repositories and automatically handles submodule initialization, making package management more convenient.
To install Luap, you can either download the precompiled binaries from the releases page or compile it yourself.
- Go to the releases page.
- Download the appropriate binary for your operating system.
- Add the
luap
binary to your PATH.
Clone the repository:
git clone https://github.com/cppCXY/luap.git
cd luap
cargo build --release -p luap
If your computer does not have SSL, you may need to add --features "compile_ssl"
: for example:
cargo build --release -p luap --features "compile_ssl"
To initialize a new Lua project, run the following command in your project directory:
luap init
This will create a package.toml
file in your project directory. You can edit this file to specify the packages you want to use in your project.
To add a package to your project, run the following command:
luap add <package-name> <github-repo>
For example:
luap add resty https://github.com/LuaCATS/openresty.git
This will add the resty
package from the LuaCATS/openresty
repository to your project.
To install the packages specified in your package.toml
file, run the following command:
luap install
This will clone the packages from GitHub and initialize any submodules.
To update the packages in your project, run the following command:
luap update
This will update the packages to the latest version.
To update a specific package, run the following command:
luap update <package-name>
For example:
luap update resty
This will update the resty
package to the latest version.
To remove a package from your project, run the following command:
luap remove <package-name>
For example:
luap remove resty
This will remove the resty
package from your project.