# JohnnyMorganz/StyLua

A Lua code formatter

Repository: https://github.com/JohnnyMorganz/StyLua
Canonical: https://ross.abutalabs.com/products/stylua
Language: Rust
License: MPL-2.0
License Family: copyleft
Topics: lua, formatter, pretty-printer, printer, luau, stylua, luaformatter, hacktoberfest
Last push: 2026-08-11T00:05:31+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 84, longevity 100
- inputs: {"age_days": 2087, "days_push": 23, "days_rel": 109, "gap_med": 30, "n_releases_24m": 12}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2284, forks 108 (observed 2026-08-28T04:06:33.994506+00:00)

## What it is
StyLua is a deterministic, opinionated code formatter for Lua and its dialects (Lua 5.1-5.4, LuaJIT, Luau, CfxLua), written in Rust and built on the full-moon parser. It parses code and reprints it from scratch to enforce a consistent style, similar to Prettier.

## Use cases
- format lua code
- enforce consistent lua code style
- format luau scripts for roblox
- add lua formatting to ci pipeline
- set up pre-commit hook for lua formatting
- auto-format lua files in editor

## When to choose
- you write Lua or Luau and want Prettier-like deterministic formatting
- you need CI or pre-commit integration for Lua style enforcement
- you work across multiple Lua dialects including LuaJIT and FiveM

## When to avoid
- you need a configurable formatter with many style presets rather than an opinionated one
- your project is not Lua-based

## Facets
- artifact type: cli-tool
- maturity: active
- function: formatter, cli, parser
- domain: developer-tools, programming-languages
- platform: cli, windows, rust
- tags: lua, luau, code-style, prettier-inspired, pre-commit, roblox, command-line, linux, macos

## Member repositories
- JohnnyMorganz/StyLua (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:33.994506+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:41:05.355377+00:00, confidence not recorded.
  - readme: https://github.com/JohnnyMorganz/StyLua (fetched 2026-08-28T04:06:33.994506+00:00, sha c5982d80274c)
  - registry_crates: https://crates.io/api/v1/crates/stylua (fetched 2026-08-29T10:21:19.362905+00:00, sha 7b5109762c86)
- Data as of 2026-08-30T08:39:29.467469+00:00.
