Automic VaultAutomic Vault

brew

Install stylua with Homebrew, apk, MacPorts, Nix, pacman, scoop, zypper

Opinionated Lua code formatter. Version 2.5.2 via Homebrew; verified 2026-05-16.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install stylua

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install stylua

MacPorts ports tree · lua/stylua/Portfile · source: api.github.com

Linux

Alpine Linux apkverified · 92%
sudo apk add stylua

Alpine Linux edge package indexes · stylua · source: dl-cdn.alpinelinux.org

Nixverified · 92%
nix profile install nixpkgs#stylua

nixpkgs package indexes · pkgs/by-name/st/stylua/package.nix · source: api.github.com

Arch Linux pacmanverified · 92%
sudo pacman -S stylua

Arch Linux sync databases · stylua · source: geo.mirror.pkgbuild.com

openSUSE zypperverified · 92%
sudo zypper install StyLua

openSUSE Tumbleweed package metadata · StyLua · source: download.opensuse.org

Windows

Scoopverified · 92%
scoop install main/stylua

Scoop official bucket manifest trees · bucket/stylua.json · source: api.github.com

overview

Package summary

Opinionated Lua code formatter

Commands and aliases

  • stylua

history

Project history and usage

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.

Project history

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.

Adoption history

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.

How it is used

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.

Why package nerds care

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.

Timeline

  • 2020-12-30: StyLua 0.1.0 released with CLI stdin support.
  • 2024-11-17: StyLua 2.0.0 changed release artifact names and added runtime syntax configuration.
  • 2025-09-14: StyLua 2.2.0 added language server mode.
  • 2026-05-16: StyLua 2.5.0 changed npm binary packaging to platform-specific optional packages.

Related projects

  • The README names full-moon as the parser foundation and Prettier as an inspiration, while also tying StyLua to Luau, Roblox style conventions, CfxLua/FiveM, pre-commit, GitHub Actions, Docker, npm, Cargo, Aftman, VS Code, Neovim, Sublime, and Zed.

security posture

No protected-tool coverage found yet

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.

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Build metadata lists 1 build dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

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

Config paths the tool may read or write during local use.

Unix
stylua.toml.stylua.toml$XDG_CONFIG_HOME/stylua~/.config/stylua
Windows
stylua.toml.stylua.toml

executables

Installed executables

CommandKindExposureNote
styluacliglobal executable

freshness

Version and 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.

page generated2026-07-08
manager version2.5.2
manager updated2026-05-16
local dataok
upstreamcurrent
latest detectedv2.5.2

https://github.com/JohnnyMorganz/StyLua

  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:stylua
Version2.5.2
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/stylua
Homepagehttps://github.com/JohnnyMorganz/StyLua
Repositoryhttps://github.com/JohnnyMorganz/StyLua
Upstream docshttps://github.com/JohnnyMorganz/StyLua#readme
LicenseMPL-2.0
Source archivehttps://github.com/JohnnyMorganz/StyLua/archive/refs/tags/v2.5.2.tar.gz
Last updated2026-05-16T18:32:04Z
Pulseupdated
Build dependenciesrust
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namestylua
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

stylua

nix profile install nixpkgs#stylua
  • normalized package name match
  • Matched by: Stylua
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/st/stylua/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
apk95%

stylua 2.5.2-r0

Opinionated Lua code formatter

https://github.com/JohnnyMorganz/StyLua

sudo apk add stylua
  • License: MPL-2.0
  • Architecture: x86_64
  • Source Package: stylua
  • 1 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Stylua
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: stylua from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
pacman95%

stylua 2.5.2-1

Deterministic code formatter for Lua

https://github.com/JohnnyMorganz/StyLua

sudo pacman -S stylua
  • License: MPL-2.0
  • Architecture: x86_64
  • 3 dependencies
  • normalized package name match
  • Matched by: Stylua
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: stylua from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz
zypper95%

StyLua 2.0.2-1.5

Opinionated Lua code formatter

https://github.com/JohnnyMorganz/StyLua

sudo zypper install StyLua
  • License: (Apache-2.0 OR MIT) AND Unicode-DFS-2016 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (MIT OR Unlicense) AND Apache-2.0 AND MIT AND MPL-2.0 AND
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: StyLua
  • 3 dependencies
  • 2 provides
  • normalized package name match
  • Matched by: Stylua
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: StyLua from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst
MacPorts95%

stylua

sudo port install stylua
  • normalized package name match
  • Matched by: Stylua
MacPorts ports tree · api.github.com · MacPorts ports tree: lua/stylua/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
Scoop95%

main/stylua

scoop install main/stylua
  • normalized package name match
  • Matched by: Stylua
Scoop official bucket manifest trees · api.github.com · Scoop official bucket manifest trees: bucket/stylua.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

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