{
  "slug": "yaml-formatter",
  "name": "gizza-ai/yaml-formatter",
  "version": "0.1.0",
  "title": "YAML Formatter — Reindent, Sort & Beautify YAML — gizza.ai",
  "description": "Reindent and normalize messy YAML with consistent spacing. Pick indent width, sort keys, or switch between expanded block and compact flow style.",
  "tags": [
    "yaml formatter",
    "yaml beautifier",
    "yaml prettifier",
    "reindent yaml",
    "sort yaml keys",
    "yaml minifier",
    "format yaml online",
    "yaml validator"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/yaml-formatter/",
    "markdown": "https://gizza.ai/tools/yaml-formatter/index.md",
    "descriptor": "https://gizza.ai/tools/yaml-formatter/tool.json",
    "deep_link_example": "https://gizza.ai/tools/yaml-formatter/?yaml=name%3A%20%20%20gizza%0Atags%3A%20%5Ba%2C%20b%5D%0Anested%3A%20%7Bx%3A%201%7D&indent=2&style=block&sort_keys=preserve"
  },
  "cli": "gizza tool yaml-formatter \"name:   gizza\ntags: [a, b]\nnested: {x: 1}\"",
  "tool": {
    "description": "Reindent and normalize a YAML document with consistent spacing. indent is spaces per nesting level for block style (1-8, default 2; YAML forbids tabs). style is 'block' (expanded multi-line, default) or 'flow' (compact single-line). sort_keys is 'preserve' (default), 'asc' or 'desc' to alphabetize every mapping's keys recursively. Data is normalized round-trip; comments, blank lines and anchors are not preserved (aliases are expanded). Multi-document `---` streams are supported. Runs locally.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "indent": {
          "default": 2,
          "description": "Spaces of indentation per nesting level for block style (1-8). Ignored for flow style. YAML forbids tab indentation. Default 2.",
          "maximum": 8,
          "minimum": 1,
          "type": "integer"
        },
        "sort_keys": {
          "default": "preserve",
          "description": "Mapping key order: 'preserve' keeps the original order; 'asc'/'desc' sort every mapping's keys alphabetically (recursively). Default preserve.",
          "enum": [
            "preserve",
            "asc",
            "desc"
          ],
          "type": "string"
        },
        "style": {
          "default": "block",
          "description": "Output layout: 'block' is expanded multi-line YAML (beautify); 'flow' is compact single-line JSON-like YAML (minify). Default block.",
          "enum": [
            "block",
            "flow"
          ],
          "type": "string"
        },
        "yaml": {
          "description": "The YAML document (or `---` separated multi-document stream) to reindent and normalize. Messy or inconsistently-indented input is fine.",
          "type": "string"
        }
      },
      "required": [
        "yaml"
      ],
      "type": "object"
    }
  }
}