{
  "slug": "toml-to-csv",
  "name": "gizza-ai/toml-to-csv",
  "version": "0.1.0",
  "title": "TOML to CSV Converter — gizza.ai",
  "description": "Turn a TOML array-of-tables into spreadsheet-ready CSV: one row per entry, a unioned header, and dot-notation columns for nested tables.",
  "tags": [
    "toml",
    "csv",
    "converter",
    "array-of-tables",
    "flatten",
    "spreadsheet",
    "config",
    "data-format"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/toml-to-csv/",
    "markdown": "https://gizza.ai/tools/toml-to-csv/index.md",
    "descriptor": "https://gizza.ai/tools/toml-to-csv/tool.json",
    "deep_link_example": "https://gizza.ai/tools/toml-to-csv/?input=%5B%5Busers%5D%5D%0Aname%20%3D%20%22Ada%22%0Arole%20%3D%20%22admin%22%0Atags%20%3D%20%5B%22founder%22%2C%20%22ops%22%5D%0A%0A%5B%5Busers%5D%5D%0Aname%20%3D%20%22Linus%22%0Arole%20%3D%20%22dev%22&table=users&nested=flatten&array_format=json&columns=union&delimiter=comma&include_header=true"
  },
  "cli": "gizza tool toml-to-csv '[[users]]\nname = \"Ada\"\nrole = \"admin\"\ntags = [\"founder\", \"ops\"]\n\n[[users]]\nname = \"Linus\"\nrole = \"dev\"'",
  "tool": {
    "description": "Convert a TOML document into CSV: each array-of-tables entry (e.g. every [[users]] section) becomes one row, and the header is the union of keys seen across entries so ragged entries keep their data. Pass the TOML text as 'input'. Leave 'table' empty to auto-detect the array-of-tables (first root-level one wins), or give a dotted path like 'servers.pool'; a document with no array-of-tables is emitted as a single row. nested=flatten (default) turns a nested table into dot-notation columns such as address.city, nested=json puts it in one cell as JSON, nested=skip drops it. array_format controls array values: json ([\"a\",\"b\"] in one cell), join ('a; b'), or columns (1-based tags.1, tags.2). columns picks the header order: union (first-seen document order), sorted (alphabetical), or first (the first row's keys only). delimiter is comma/semicolon/tab/pipe and include_header toggles the header row. Values are RFC 4180 quoted; dates and numbers keep their TOML text form. Comments are not preserved (TOML parsing drops them). Up to 20,000 rows and 2,000 columns per call. Runs locally; nothing is uploaded.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "array_format": {
          "default": "json",
          "description": "How to render an array value inside a row: json writes [\"a\",\"b\"] in one cell, join writes 'a; b' in one cell, columns expands to 1-based indexed columns (tags.1, tags.2). Default json.",
          "enum": [
            "json",
            "join",
            "columns"
          ],
          "type": "string"
        },
        "columns": {
          "default": "union",
          "description": "Header columns: union takes every key seen in any row in first-seen document order, sorted takes that same set alphabetically, first locks the header to the first row's keys and drops later extras. Default union.",
          "enum": [
            "union",
            "sorted",
            "first"
          ],
          "type": "string"
        },
        "delimiter": {
          "default": "comma",
          "description": "CSV field separator for the output. Values containing the separator, a quote, or a newline are RFC 4180 quoted. Default comma.",
          "enum": [
            "comma",
            "semicolon",
            "tab",
            "pipe"
          ],
          "type": "string"
        },
        "include_header": {
          "default": true,
          "description": "Write the header row of column names. Set false to append the rows to an existing sheet. Default true.",
          "type": "boolean"
        },
        "input": {
          "description": "The TOML document to convert, e.g. a file with repeated [[users]] sections. Each array-of-tables entry becomes one CSV row and each key becomes a column.",
          "type": "string"
        },
        "nested": {
          "default": "flatten",
          "description": "How to render a nested table inside a row: flatten makes dot-notation columns (address.city), json puts the whole subtable in one cell as JSON, skip drops it. Default flatten.",
          "enum": [
            "flatten",
            "json",
            "skip"
          ],
          "type": "string"
        },
        "table": {
          "default": "",
          "description": "Dotted path of the array-of-tables to convert, e.g. 'users' or 'servers.pool'. Leave empty to auto-detect: the first root-level array-of-tables wins, then nested ones; a document with none is emitted as a single row. Quoted TOML keys are not supported in this path.",
          "type": "string"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}