stylua
brew install stylua
v2.5.2
MPL-2.0
Opinionated Lua code formatter
1.1k
30-day installs · #1276
4.4k
90-day · #1162
13.6k
365-day · #1278
2.2k
★ GitHub stars · updated 2mo ago
Build dependencies
GitHub topics
formatter
hacktoberfest
lua
luaformatter
luau
pretty-printer
printer
stylua
Links
- https://github.com/JohnnyMorganz/StyLua
- GitHub: JohnnyMorganz/StyLua
- Brew formula source: Formula/s/stylua.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [
"rust"
],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Opinionated Lua code formatter",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:41:25+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "stylua",
"github_default_branch": "main",
"github_last_commit_at": "2026-06-20T17:46:15Z",
"github_readme_excerpt": "\u003cdiv align=\"center\"\u003e\n\t\u003ch1\u003e\n\t\tStyLua\u003cbr\u003e\n\t\t\u003ca href=\"https://crates.io/crates/stylua\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/stylua.svg\"\u003e\u003c/a\u003e\n \u003ca href=\"https://github.com/JohnnyMorganz/StyLua/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/JohnnyMorganz/StyLua/actions/workflows/ci.yml/badge.svg\"\u003e\u003c/a\u003e\n \u003ca href=\"https://codecov.io/gh/JohnnyMorganz/StyLua\"\u003e\u003cimg src=\"https://codecov.io/gh/JohnnyMorganz/StyLua/branch/main/graph/badge.svg\"/\u003e\u003c/a\u003e\n\t\u003c/h1\u003e\n\u003c/div\u003e\n\nA deterministic code formatter for Lua 5.1, 5.2, 5.3, 5.4, LuaJIT, [Luau](https://luau.org/) and [CfxLua/FiveM Lua](https://docs.fivem.net/docs/scripting-manual/runtimes/lua/), built using [full-moon](https://github.com/Kampfkarren/full-moon).\nStyLua is inspired by the likes of [prettier](https://github.com/prettier/prettier), it parses your Lua codebase, and prints it back out from scratch,\nenforcing a consistent code style.\n\nStyLua mainly follows the [Roblox Lua Style Guide](https://roblox.github.io/lua-style-guide/), with a few deviations.\n\n## Installation\n\nThere are multiple ways to install StyLua:\n\n### With Github Releases\n\nPre-built binaries are available on the [GitHub Releases Page](https://github.com/JohnnyMorganz/StyLua/releases).\n\nBy default, these are built with **all syntax variants enabled (Lua 5.2, 5.3, 5.4, LuaJIT and Luau)**, to cover all possible codebases.\nSee [configuring runtime syntax selection](#configuring-runtime-syntax-selection) if you need to select a particular syntax of Lua to format.\nAlternatively, see [installing from crates.io](#from-cratesio) on how to install a particular flavour of StyLua.\n\n### From Crates.io\n\nIf you have [Rust](https://www.rust-lang.org/) installed, you can install StyLua using cargo.\nBy default, this builds for just Lua 5.1.\nYou can pass the `--features \u003cflag\u003e` argument to add extra syntax variants:\n\n```sh\ncargo install stylua\ncargo install stylua --features lua52\ncargo install stylua --features lua53\ncargo install stylua --features lua54\ncargo ins",
"github_repo": "JohnnyMorganz/StyLua",
"github_stars": 2236,
"github_topics": [
"formatter",
"hacktoberfest",
"lua",
"luaformatter",
"luau",
"pretty-printer",
"printer",
"stylua"
],
"homepage": "https://github.com/JohnnyMorganz/StyLua",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 1059,
"installs_365d": 13550,
"installs_90d": 4392,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "MPL-2.0",
"llm_generated_at": null,
"llm_model": null,
"name": "stylua",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 1276,
"rank_365d": 1278,
"rank_90d": 1162,
"raw_hash": "f7fcef4ecfc0bf20",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/s/stylua.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [],
"version_head": null,
"version_stable": "2.5.2",
"versioned_formulae": [],
"why_use_this": null
}