{
  "slug": "toml-formatter",
  "name": "gizza-ai/toml-formatter",
  "version": "0.1.0",
  "title": "TOML Formatter — Validate, Sort and Preserve Comments — gizza.ai",
  "description": "Format TOML in your browser with validation, key sorting, indentation, array layout controls and comment preservation.",
  "tags": [
    "toml formatter",
    "toml beautifier",
    "toml validator",
    "config formatter",
    "developer tools"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/toml-formatter/",
    "markdown": "https://gizza.ai/tools/toml-formatter/index.md",
    "descriptor": "https://gizza.ai/tools/toml-formatter/tool.json",
    "deep_link_example": "https://gizza.ai/tools/toml-formatter/?input=%23%20Package%20metadata%0A%5Bpackage%5D%0Aname%3D%27demo%27%0Aversion%20%3D%20%220.1.0%22%0Afeatures%3D%5B%22cli%22%2C%20%22web%22%5D&indent=0&sort_keys=preserve&spacing=standard&array_style=auto&column_width=80&align_values=true&blank_line_before_tables=true&keep_comments=true"
  },
  "cli": "gizza tool toml-formatter \"# Package metadata\n[package]\nname='demo'\nversion = \\\"0.1.0\\\"\nfeatures=[\\\"cli\\\", \\\"web\\\"]\"",
  "tool": {
    "description": "Validate and format a pasted TOML document. Pass the TOML text as `input`; choose indentation, key sorting, equals spacing, array layout, column width, value alignment, blank-line handling and whether to preserve comments. Invalid TOML returns a line and column error instead of emitting partial output. The formatter preserves comments and scalar literal spellings such as hex integers, underscores and literal strings where the requested layout can represent them.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "align_values": {
          "default": false,
          "description": "Pad keys so equals signs align within a run of table entries. Ignored when spacing=compact.",
          "type": "boolean"
        },
        "array_style": {
          "default": "auto",
          "description": "Array layout. 'auto' keeps short arrays on one line and expands long/commented arrays; 'expand' writes one element per line; 'collapse' forces one line.",
          "enum": [
            "auto",
            "expand",
            "collapse"
          ],
          "type": "string"
        },
        "blank_line_before_tables": {
          "default": true,
          "description": "Insert exactly one blank line before each table or array-of-tables header. Default true.",
          "type": "boolean"
        },
        "column_width": {
          "default": 80,
          "description": "Line-width budget used by array_style=auto before expanding arrays, from 20 to 200 columns.",
          "maximum": 200,
          "minimum": 20,
          "type": "integer"
        },
        "indent": {
          "default": 0,
          "description": "Spaces to indent entries inside tables, from 0 to 8. Default 0 keeps common Cargo.toml and pyproject.toml flat.",
          "maximum": 8,
          "minimum": 0,
          "type": "integer"
        },
        "input": {
          "description": "TOML document to validate and format. Comments, scalar literal spelling and key/value content are preserved where possible.",
          "type": "string"
        },
        "keep_comments": {
          "default": true,
          "description": "Preserve own-line and end-of-line comments when the selected layout can represent them. Disable to strip comments.",
          "type": "boolean"
        },
        "sort_keys": {
          "default": "preserve",
          "description": "Key ordering within each table and inline table: preserve the source order, sort ascending, or sort descending.",
          "enum": [
            "preserve",
            "asc",
            "desc"
          ],
          "type": "string"
        },
        "spacing": {
          "default": "standard",
          "description": "Whitespace around equals signs. 'standard' emits `key = value`; 'compact' emits `key=value`.",
          "enum": [
            "standard",
            "compact"
          ],
          "type": "string"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}