{
  "slug": "lua-formatter",
  "name": "gizza-ai/lua-formatter",
  "version": "0.1.0",
  "title": "Lua Formatter — beautify & re-indent Lua code — gizza.ai",
  "description": "Format, beautify and re-indent Lua source in your browser. Configurable indent width or tabs, optional quote-style normalization, comments preserved. Nothing is uploaded.",
  "tags": [
    "lua formatter",
    "lua beautifier",
    "format lua",
    "lua code formatter",
    "pretty print lua",
    "lua indenter",
    "beautify lua",
    "luau formatter"
  ],
  "category": "developer",
  "urls": {
    "page": "https://gizza.ai/tools/lua-formatter/",
    "markdown": "https://gizza.ai/tools/lua-formatter/index.md",
    "descriptor": "https://gizza.ai/tools/lua-formatter/tool.json",
    "deep_link_example": "https://gizza.ai/tools/lua-formatter/?input=if%20x%20then%0Aprint%281%29%0Aend&indent=2&indent_char=space&quote_style=preserve"
  },
  "cli": "gizza tool lua-formatter \"if x then\nprint(1)\nend\"",
  "tool": {
    "description": "Re-indent and beautify Lua source code. A forgiving tokenizer rebuilds the source line by line: leading indentation is recomputed from block structure (function/then/do/repeat and (/[/{ open a level; end/until and closers close one), commas get one space after and none before, runs of blank lines collapse, and — optionally — short-string quotes are normalized to a single style. It never wraps long lines, never renames or reorders anything, and never touches the interior of a long string or long comment, so it is safe on any Lua dialect (5.1-5.4, LuaJIT, Luau). indent = spaces per level (1-8, default 2); indent_char = space (default) or tab; quote_style = preserve (default), double, or single. Runs locally.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "indent": {
          "default": 2,
          "description": "Spaces of indentation per nesting level (1-8). Ignored when indent_char is 'tab'. Default 2.",
          "maximum": 8,
          "minimum": 1,
          "type": "integer"
        },
        "indent_char": {
          "default": "space",
          "description": "Indent with spaces or one tab character per level. Default space.",
          "enum": [
            "space",
            "tab"
          ],
          "type": "string"
        },
        "input": {
          "description": "The Lua source code to re-indent and beautify (any dialect: 5.1-5.4, LuaJIT, Luau). Minified or messy input is fine.",
          "type": "string"
        },
        "quote_style": {
          "default": "preserve",
          "description": "Normalize short-string quotes: preserve (default, keep each string's own quote), double (\"...\"), or single ('...'). Re-escapes as needed; long strings [[...]] are never touched.",
          "enum": [
            "preserve",
            "double",
            "single"
          ],
          "type": "string"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}