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
luapbinary to your PATH.
Clone the repository:
git clone https://github.com/cppCXY/luap.git
cd luap
cargo build --release -p luapIf 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 initThis 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.gitThis 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 installThis will clone the packages from GitHub and initialize any submodules.
To update the packages in your project, run the following command:
luap updateThis 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 restyThis 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 restyThis will remove the resty package from your project.