{
  "id": "yamlfmt",
  "name": "yamlfmt",
  "homepage": "https://github.com/google/yamlfmt",
  "description": "An extensible command line tool or library to format YAML files.",
  "executables": [
    "yamlfmt"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/yamlfmt/.yamlfmt",
      "%LOCALAPPDATA%/yamlfmt/.yamlfmt"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Format YAML",
    "description": "Format YAML files or directories, or preview/lint formatting. Flags must come before paths. Per-formatter options and stdin mode are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "docs",
        "kind": "manual",
        "url": "https://github.com/google/yamlfmt/blob/main/docs/command-usage.md",
        "revision": "main 2026-10-27",
        "evidence": "| Dry Run       | `-dry`           | `yamlfmt -dry .`            | Use Dry Run mode                              |\n| Lint          | `-lint`          | `yamlfmt -lint .`           | Use Lint mode                                    |\n| Quiet Mode    | `-quiet`, `-q`   | `yamlfmt -dry -q .`         | Use quiet mode. Only has effect in Dry Run or Lint modes. |\n| Verbose Mode  | `-verbose`, `-v` | `yamlfmt -v .`              | Use verbose mode. Only has effect in Format mode.         |\n| Config File Path      | `-conf`               | string            | `yamlfmt -conf ./config/.yamlfmt`                         |\n| Doublestar            | `-dstar`              | bool              | `yamlfmt -dstar \"**/*.yaml\"`                              |\n| Exclude               | `-exclude`            | []string          | `yamlfmt -exclude ./not/,these_paths.yaml`                |\n| Gitignore Excludes    | `-gitignore_excludes` | bool              | `yamlfmt -gitignore_excludes`                             |\n| Extensions            | `-extensions`         | []string          | `yamlfmt -extensions yaml,yml`                            |\n"
      }
    ],
    "field": [
      {
        "id": "dry",
        "label": "Dry run (print diffs only)",
        "type": "boolean",
        "option": [
          "-dry"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "lint",
        "label": "Lint (exit 1 on differences)",
        "type": "boolean",
        "option": [
          "-lint"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "quiet",
        "label": "Quiet (dry run / lint)",
        "type": "boolean",
        "option": [
          "-quiet",
          "-q"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose (format mode)",
        "type": "boolean",
        "option": [
          "-verbose",
          "-v"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "conf",
        "label": "Config file",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "option": [
          "-conf"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "dstar",
        "label": "Doublestar path patterns",
        "type": "boolean",
        "option": [
          "-dstar"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "exclude",
        "label": "Exclude patterns (comma separated)",
        "type": "string",
        "option": [
          "-exclude"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "gitignore_excludes",
        "label": "Exclude gitignored paths",
        "type": "boolean",
        "option": [
          "-gitignore_excludes"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "extensions",
        "label": "Extra extensions (comma separated)",
        "type": "string",
        "option": [
          "-extensions"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "paths",
        "label": "Paths",
        "type": "path",
        "path": {
          "kind": "any",
          "role": "input"
        },
        "position": 0,
        "multiple": true,
        "sources": [
          "docs"
        ]
      }
    ],
    "task": [
      {
        "id": "format",
        "label": "Format in place",
        "description": "Rewrites files.",
        "fields": [
          "paths"
        ],
        "required": [
          "paths"
        ]
      },
      {
        "id": "dry",
        "label": "Preview changes",
        "fields": [
          "dry",
          "paths"
        ],
        "required": [
          "paths"
        ],
        "set": {
          "dry": [
            true
          ]
        }
      },
      {
        "id": "lint",
        "label": "Lint formatting",
        "fields": [
          "lint",
          "paths"
        ],
        "required": [
          "paths"
        ],
        "set": {
          "lint": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "dry",
          "lint",
          "quiet",
          "verbose",
          "paths"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "conf",
          "dstar",
          "exclude",
          "gitignore_excludes",
          "extensions"
        ]
      }
    ]
  }
}
