macOS
brew install stylualocal Homebrew formula metadata
sudo port install styluaMacPorts ports tree · lua/stylua/Portfile · source: api.github.com
brew
Opinionated Lua code formatter. Version 2.5.2 via Homebrew; verified 2026-05-16.
install
brew install stylualocal Homebrew formula metadata
sudo port install styluaMacPorts ports tree · lua/stylua/Portfile · source: api.github.com
sudo apk add styluaAlpine Linux edge package indexes · stylua · source: dl-cdn.alpinelinux.org
nix profile install nixpkgs#styluanixpkgs package indexes · pkgs/by-name/st/stylua/package.nix · source: api.github.com
sudo pacman -S styluaArch Linux sync databases · stylua · source: geo.mirror.pkgbuild.com
sudo zypper install StyLuaopenSUSE Tumbleweed package metadata · StyLua · source: download.opensuse.org
scoop install main/styluaScoop official bucket manifest trees · bucket/stylua.json · source: api.github.com
overview
Opinionated Lua code formatter
history
StyLua is a deterministic Lua-family code formatter. Its README says it formats Lua 5.1 through 5.4, LuaJIT, Luau, and CfxLua/FiveM Lua by parsing code and printing it back out with a consistent style inspired by Prettier.
The official changelog begins with version 0.1.0 on 2020-12-30, adding CLI stdin support and formatting behavior for expanded tables. The project later grew from a Lua formatter into a multi-runtime tool with runtime syntax selection, language-server mode, prebuilt binaries, npm wrappers, Docker images, pre-commit hooks, and editor integrations.
The README documents installation through GitHub Releases, Cargo/crates.io, GitHub Actions, pre-commit, npm, Docker, Homebrew, pip/uv from Git, VS Code, Aftman, and community package repositories. The input package-manager facts also show packaging across APK, Homebrew, MacPorts, Nix, Pacman, Scoop, and zypper.
The usual workflow is `stylua` over files or directories, with `--check` in CI, stdin support for editors, `.styluaignore` for filtering, and `stylua.toml` or `.stylua.toml` for project configuration. The README recommends a project-root `.stylua.toml` so teams share the same formatting behavior.
StyLua is interesting to package nerds because it crosses ecosystems: Rust crate, standalone GitHub binary, npm binary wrapper, Docker image, Homebrew formula, pre-commit hook, and editor formatter. Its 2.x history includes packaging details such as platform-specific npm optional packages and changed release artifact names, both of which directly affect downstream packaging.
security posture
No matching local secret-handling manifest was found for stylua. Nucleus package metadata is still published here so future coverage has a stable package URL.
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
local files
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.
Config paths the tool may read or write during local use.
stylua.toml.stylua.toml$XDG_CONFIG_HOME/stylua~/.config/styluastylua.toml.stylua.tomlexecutables
| Command | Kind | Exposure | Note |
|---|---|---|---|
stylua | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/JohnnyMorganz/StyLua
install metadata
| Package key | brew:stylua |
|---|---|
| Version | 2.5.2 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/stylua |
| Homepage | https://github.com/JohnnyMorganz/StyLua |
| Repository | https://github.com/JohnnyMorganz/StyLua |
| Upstream docs | https://github.com/JohnnyMorganz/StyLua#readme |
| License | MPL-2.0 |
| Source archive | https://github.com/JohnnyMorganz/StyLua/archive/refs/tags/v2.5.2.tar.gz |
| Last updated | 2026-05-16T18:32:04Z |
| Pulse | updated |
| Build dependencies | rust |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | stylua |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
stylua
nix profile install nixpkgs#styluastylua 2.5.2-r0
Opinionated Lua code formatter
https://github.com/JohnnyMorganz/StyLua
sudo apk add styluastylua 2.5.2-1
Deterministic code formatter for Lua
https://github.com/JohnnyMorganz/StyLua
sudo pacman -S styluaStyLua 2.0.2-1.5
Opinionated Lua code formatter
https://github.com/JohnnyMorganz/StyLua
sudo zypper install StyLuastylua
sudo port install styluamain/stylua
scoop install main/styluasource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.