Luau Beautifier

A beautifier for Luau written in C++

Replit

You can use luau_beautifier without compiling with this replit.

Build

$ make -s

Build (web assembly)

$ make wasm

Usage

Usage: ./luau-beautifier [options] [file]

options:
  --minify: switches output mode from beautify to minify
  --nosolve: doesn't solve simple expressions

If there are errors parsing (both CLI options or the input code), you will see those in stderr.
Otherwise, the beautified code will appear in stdout.

Other notes

  1. The Luau version used is 0.630
  2. Currently there is no MINIMAL support