https://github.com/codebycruz/lpm
lpm is a package manager for Lua, written in Lua.
https://github.com/codebycruz/lpm
lpm lpm-cli lua lua-package-manager luajit package-manager test-runner tools
Last synced: 26 days ago
JSON representation
lpm is a package manager for Lua, written in Lua.
- Host: GitHub
- URL: https://github.com/codebycruz/lpm
- Owner: codebycruz
- License: mit
- Created: 2025-12-27T09:13:40.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2026-02-26T03:32:12.000Z (about 1 month ago)
- Last Synced: 2026-02-26T07:55:24.015Z (about 1 month ago)
- Topics: lpm, lpm-cli, lua, lua-package-manager, luajit, package-manager, test-runner, tools
- Language: Lua
- Homepage: https://lualpm.com
- Size: 393 KB
- Stars: 8
- Watchers: 0
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
---
[](https://github.com/codebycruz/lpm/actions/workflows/build.yml) [](https://github.com/codebycruz/lpm/actions/workflows/test.yml) [](https://github.com/codebycruz/lpm/releases/latest) [](https://discord.gg/rHgp7DhkHm)
`lpm` is a package manager for Lua, written in Lua.
It was created due to my frustration with the current status quo of package management in the Lua ecosystem.
- [LuaRocks](https://luarocks.org) is sorely dated, difficult to manage, and hardly maintained.
- [Lux](https://github.com/lumen-oss/lux), while promising, is written in Rust and seems to be targeting backwards compatibility with LuaRocks.
A more in-depth comparison can be found below.
## Features
- Easy project creation with `lpm new` and `lpm init`
- Automatic local package management, avoid conflicting global installs
- `lpm add --path ` - Install local dependencies (good for monorepos)
- `lpm add --git ` - Install git dependencies (supports monorepos)
- `lpm run` - Runs your project's init file and installs dependencies
- `lpm compile` - Turn your project into a single executable, easily distributable
- `lpm test` - Run project tests with the built-in test framework, [`lpm-test`](./packages/lpm-test)
- `lpm bundle` - Bundle your project into a single lua file
- `lpm x` - Execute a project in another location, perfect for CLIs
- `lpm tree` - View your dependencies at a glance
## Installation
| OS | Command |
| ------- | ------------------------------------------------------------------------------------- |
| Linux | `curl -fsSL https://raw.githubusercontent.com/codebycruz/lpm/master/install.sh \| sh` |
| Windows | `irm https://raw.githubusercontent.com/codebycruz/lpm/master/install.ps1 \| iex` |
_To upgrade your `lpm` version, simply run `lpm upgrade`!_
## Quickstart
Create a project with dependencies..
```bash
lpm new myproject && cd myproject
lpm add hood --git https://github.com/codebycruz/hood
echo "print(require('hood'))" > ./src/init.lua
lpm run
# Output: table: 0x7f53326fd030
```
Or run a repository's code in a single command!
```bash
lpm x triangle --git https://github.com/codebycruz/hood
```
## Comparison to LuaRocks and Lux
I made this to the best of my ability with limited information about LuaRocks and Lux.
If anyone has any corrections, please do submit a pull request.
| | lpm | lux | luarocks |
| ----------------------- | -------------- | ------------ | ------------ |
| Written in | Lua | Rust | Teal |
| Project format | JSON | TOML/Lua | Lua |
| Add/remove deps | ✓ | ✓ | ❌ |
| Built-in test runner | ✓ (lpm-test) | ✓ (busted) | ❌ |
| Comes with luajit | ✓ | ❌ | ❌ |
| Lua version manager | ❌ | ✓ | ❌ |
| Compile to executable | ✓ | ❌ | ❌ |
| Git deps | ✓ | ✓ | ❌ |
| Registry deps | ❌ ([#4][4]) | ✓ (luarocks) | ✓ (luarocks) |
| Rockspec support | ❌ ([#53][53]) | ✓ | ✓ |
| Proper Lockfile Support | ❌ ([#16][16]) | ✓ | ❌ |
| Lua build scripts | build.lua | rockspec | rockspec |
[4]: https://github.com/codebycruz/lpm/issues/4
[16]: https://github.com/codebycruz/lpm/issues/16
[53]: https://github.com/codebycruz/lpm/issues/53