# Install luarocks with Homebrew, apk, chocolatey, apt, dnf, Nix, pacman, scoop

Package manager for the Lua programming language. Version 3.13.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:luarocks
```

## Agent safety answer

luarocks manages Lua packages and can install or publish project dependencies.

- **Credential access:** Reads environment variables, server credentials, and local package config.
- **Remote mutation:** Can install packages and interact with package servers.
- **Publish/artifact risk:** Can publish Lua rocks and generated package artifacts.
- **Recommended control:** Gate upload, install scripts, and credentialed server operations.
- **Agent-use guidance:** Allow dependency queries; require approval for package publication and secret-backed actions.

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install luarocks
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add luarocks
```

  Evidence: Alpine Linux edge package indexes: luarocks from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install luarocks
```

  Evidence: Debian stable package indexes: luarocks from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install luarocks
```

  Evidence: Fedora Rawhide package metadata: luarocks from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#luarocks
```

  Evidence: nixpkgs package indexes: luarocks from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S luarocks
```

  Evidence: Arch Linux sync databases: luarocks from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Chocolatey (92%):

```sh
choco install luarocks
```

  Evidence: Chocolatey community package catalog: luarocks from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','librespeed-cli'

- Scoop (92%):

```sh
scoop install main/luarocks
```

  Evidence: Scoop official bucket manifest trees: bucket/luarocks.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:luarocks
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/luarocks>
- **Version:** 3.13.0
- **Source summary:** Package manager for the Lua programming language
- **Homepage:** <https://luarocks.org/>
- **Repository:** <https://github.com/luarocks/luarocks>
- **Upstream docs:** <https://luarocks.org/docs>
- **License:** MIT
- **Source archive:** <https://luarocks.org/releases/luarocks-3.13.0.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- luarocks (cli)
- luarocks-admin (cli)
- luarocks (alias)
- luarocks-admin (alias)

## Dependencies

- lua

## Uses from macOS

- unzip

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 3.13.0
- Local data: ok
- Upstream repository: https://luarocks.org/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

LuaRocks is the package manager and public package repository system for Lua modules. It introduced the rockspec-centered workflow that lets Lua packages declare metadata, dependencies, sources, and build rules in Lua.

### Project history

The LuaRocks project describes itself as the package manager for the Lua programming language. Its repository README and wiki say it installs modules as self-contained packages called rocks and supports local and remote repositories plus multiple local rocks trees.

LuaRocks' documentation centers on the rockspec: a Lua metadata file that tells the tool how to fetch, build, and install a package. This design made LuaRocks both a package installer and a lightweight build/publishing convention for Lua modules, including modules with native C extensions.

### Adoption history

LuaRocks became the default package-distribution culture for much of Lua outside application-specific ecosystems. The official site surfaces recent modules, labels, weekly download counts, root manifests, custom manifests, mirrors, and upload flows, showing that LuaRocks is both a CLI and the central package index.

The input metadata shows broad OS package coverage: LuaRocks is available through Homebrew, MacPorts, Debian, Ubuntu, Fedora, Alpine, Arch, Nix, Scoop, and Chocolatey. That matters because Lua projects often need LuaRocks before they can install testing tools, web frameworks, OpenResty libraries, or native-binding modules.

### How it is used

The command-line interface is luarocks. It supports installing, building, packing, uploading, searching, showing, removing, testing, and configuring rocks, and can operate against selected servers, trees, and dependency modes.

Package authors write a rockspec, tag or publish their source, and submit or upload the rockspec. LuaRocks can build from source, make from a local checkout, pack source or binary rocks, and publish artifacts that users install without needing the original source-control tool.

### Why package nerds care

LuaRocks is central package-nerd infrastructure for Lua because it defines the names, versions, build metadata, binary/source artifact formats, and repository manifests that other tools consume. It is the closest analogue to npm, RubyGems, or CPAN for Lua, but with Lua-specific details such as Lua-version-specific trees and native module paths.

It is also historically important because it works across stock Lua and LuaJIT ecosystems. That cross-runtime support, plus package-manager availability on Unix and Windows, made it the practical bootstrap path for Lua dependency management.

### Timeline

- 2000s: LuaRocks emerges as Lua's rockspec-based package manager.
- 2010s: Development and distribution consolidate around the GitHub repository and luarocks.org.
- 2020s: Documentation moves from the GitHub wiki into the repository docs folder.
- 2026: GitHub lists LuaRocks 3.13.0 as the latest release, dated Jan 28, 2026.

### Related projects

- Lua is the language ecosystem LuaRocks packages target.
- LuaJIT is a common LuaRocks runtime target and package dependency.
- OpenResty libraries such as lua-resty modules are commonly distributed through LuaRocks.

### Sources

- <https://github.com/luarocks/luarocks>
- <https://github.com/luarocks/luarocks/blob/main/docs/config_file_format.md>
- <https://github.com/luarocks/luarocks/blob/main/docs/creating_a_rock.md>
- <https://github.com/luarocks/luarocks/blob/main/docs/luarocks.md>
- <https://luarocks.org/>
- <https://luarocks.org/docs>
- source_facts.package-manager


## Security Notes

generalized runtime or code generation signal. infrastructure mutation or orchestration signal.

- **Geiger risk:** orange / medium
- generalized runtime or code generation signal
- infrastructure mutation or orchestration signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: $XDG_CONFIG_HOME/luarocks/upload_config.lua, ~/.config/luarocks/upload_config.lua, ~/.luarocks/upload_config.lua

## Credential files

- Unix: $XDG_CONFIG_HOME/luarocks/upload_config.lua, ~/.config/luarocks/upload_config.lua, ~/.luarocks/upload_config.lua
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** luarocks
- **Version Scheme:** 0
- **Revision:** 1
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - luarocks - 3.8.0+dfsg1-1: normalized package name match | Debian stable package indexes: luarocks from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | deployment and management system for Lua modules | https://luarocks.org/
- Nix - luarocks: normalized package name match | nixpkgs package indexes: luarocks from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - luarocks - 3.8.0+dfsg1-1: normalized package name match | Ubuntu 24.04 LTS package indexes: luarocks from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | deployment and management system for Lua modules | https://luarocks.org/
- apk - luarocks - 3.12.2-r1: normalized package name match | Alpine Linux edge package indexes: luarocks from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Deployment and management system for Lua modules | https://luarocks.org/
- apk - luarocks5.1 - 3.12.2-r1: normalized package name match | Alpine Linux edge package indexes: luarocks5.1 from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Deployment and management system for Lua 5.1 modules | https://luarocks.org/
- apk - luarocks5.2 - 3.12.2-r1: normalized package name match | Alpine Linux edge package indexes: luarocks5.2 from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Deployment and management system for Lua 5.2 modules | https://luarocks.org/
- apk - luarocks5.3 - 3.12.2-r1: normalized package name match | Alpine Linux edge package indexes: luarocks5.3 from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Deployment and management system for Lua 5.3 modules | https://luarocks.org/
- apk - luarocks5.4 - 3.12.2-r1: normalized package name match | Alpine Linux edge package indexes: luarocks5.4 from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Deployment and management system for Lua 5.4 modules | https://luarocks.org/
- dnf - luarocks - 3.13.0-2.fc45: normalized package name match | Fedora Rawhide package metadata: luarocks from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A deployment and management system for Lua modules | http://luarocks.org
- pacman - luarocks - 3.13.0-5: normalized package name match | Arch Linux sync databases: luarocks from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Deployment and management system for Lua modules | https://luarocks.org/
- Chocolatey - luarocks: normalized package name match | Chocolatey community package catalog: luarocks from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','librespeed-cli'
- Scoop - main/luarocks: normalized package name match | Scoop official bucket manifest trees: bucket/luarocks.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Related links

- [Package publisher tools](https://www.automicvault.com/pkg/package-publishers/) - Belongs to a package publishing or registry command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [lua](https://www.automicvault.com/pkg/brew/lua/) - Runtime dependency declared by Homebrew.
- [sile](https://www.automicvault.com/pkg/brew/sile/) - Popular package that depends on this formula.
- [jsonnet-bundler](https://www.automicvault.com/pkg/brew/jsonnet-bundler/) - Shares av.db curated category or tags: cli, dependency-management, developer-tools, package-manager.
- [rye](https://www.automicvault.com/pkg/brew/rye/) - Shares av.db curated category or tags: cli, dependency-management, developer-tools, package-manager.
- [rv](https://www.automicvault.com/pkg/brew/rv/) - Shares av.db curated category or tags: cli, developer-tools, package-manager.
- [scarb](https://www.automicvault.com/pkg/brew/scarb/) - Shares av.db curated category or tags: cli, developer-tools, package-manager.
- [smlpkg](https://www.automicvault.com/pkg/brew/smlpkg/) - Shares av.db curated category or tags: cli, developer-tools, package-manager.
- [clib](https://www.automicvault.com/pkg/brew/clib/) - Shares av.db curated category or tags: cli, dependency-management, developer-tools, package-manager.
- [jsrepo](https://www.automicvault.com/pkg/brew/jsrepo/) - Shares av.db curated category or tags: cli, developer-tools, package-manager.
- [opam](https://www.automicvault.com/pkg/brew/opam/) - Shares av.db curated category or tags: cli, dependency-management, developer-tools, package-manager.
- [zigmod](https://www.automicvault.com/pkg/brew/zigmod/) - Local package facts share a topical domain. Shared terms: cli, dependency, dependency-management, developer, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/luarocks.yml](https://github.com/automic-vault/db/blob/main/combined/luarocks.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
- curated agent safety answer
