explaingit

luarocks/luarocks

Analysis updated 2026-07-03

3,691LuaAudience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

The official package manager for Lua that lets you install and manage Lua libraries with a single command, similar to pip for Python or npm for JavaScript.

Mindmap

mindmap
  root((luarocks))
    What it does
      Lua package manager
      Install libraries
      Manage dependencies
    Concepts
      Rocks packages
      Local trees
      luarocks.org registry
    Sources
      Public registry
      Remote repos
      Local directory
    Use cases
      Game scripting
      Embedded apps
      Server-side Lua
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Install a Lua library from the public luarocks.org registry with a single command instead of downloading and configuring it by hand.

USE CASE 2

Set up separate package trees for different Lua projects on the same machine so their dependencies do not conflict.

USE CASE 3

Package your own Lua module as a rock and publish it to the public registry for others to install.

What is it built with?

Lua

How does it compare?

luarocks/luarocksleandromoreira/cdn-up-and-runningfacebookresearch/fairseq-lua
Stars3,6913,6673,727
LanguageLuaLuaLua
Setup difficultymoderatemoderatehard
Complexity2/54/54/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a working Lua installation, some rocks also need a C compiler to build native extensions.

MIT license, use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

LuaRocks is the official package manager for Lua, a lightweight programming language commonly used for scripting inside games (including Roblox), for embedding in applications, and for high-performance server-side work. A package manager is a tool that lets you install, update, and manage libraries written by others so you do not have to track down and install them by hand. In LuaRocks, each installable unit is called a rock. A rock is a self-contained package that bundles a Lua module together with the information needed to install it correctly, including any dependencies. You can install rocks from the central public registry at luarocks.org, from other remote repositories, or from a local directory. LuaRocks also supports multiple local trees, which means you can maintain separate sets of installed packages for different projects on the same machine without them interfering with each other. This is similar to virtual environments in Python or local node_modules folders in JavaScript projects. The README for this repository is very brief and does not describe the command-line interface, configuration options, or how to create and publish your own rocks. Full documentation and a searchable registry of available packages are available at luarocks.org. LuaRocks is free and open source, released under the MIT license, the same license that covers Lua itself.

Copy-paste prompts

Prompt 1
Show me the LuaRocks command to install the 'lua-socket' library and then import it in a Lua script to make an HTTP request.
Prompt 2
I'm working on two Lua projects that need different versions of the same library. How do I use LuaRocks local trees to keep them separate?
Prompt 3
Write a .rockspec file for my Lua library called 'mylib' version 1.0.0 so I can publish it to luarocks.org.
Prompt 4
I'm building a Roblox-adjacent Lua tool. Which LuaRocks packages are most commonly used for JSON parsing, HTTP requests, and testing?

Frequently asked questions

What is luarocks?

The official package manager for Lua that lets you install and manage Lua libraries with a single command, similar to pip for Python or npm for JavaScript.

What language is luarocks written in?

Mainly Lua. The stack also includes Lua.

What license does luarocks use?

MIT license, use freely for any purpose including commercial, as long as you keep the copyright notice.

How hard is luarocks to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is luarocks for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub luarocks on gitmyhub

Verify against the repo before relying on details.