{
  "id": "js-beautify",
  "name": "js-beautify",
  "homepage": "https://github.com/beautifier/js-beautify",
  "description": "Beautifier for javascript.",
  "icon": "https://raw.githubusercontent.com/beautifier/js-beautify/main/web/icon.svg",
  "executables": [
    "js-beautify",
    "css-beautify",
    "html-beautify"
  ],
  "dotfiles": {
    "paths": [
      "~/.jsbeautifyrc"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Beautify code",
    "description": "Reformat JavaScript, CSS or HTML with js-beautify. Only the common indentation and wrapping options are offered; run css-beautify or html-beautify for the other languages.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "readme",
        "kind": "help",
        "url": "https://github.com/beautifier/js-beautify/blob/main/README.md",
        "revision": "2026-10-27",
        "evidence": "  -f, --file       Input file(s) (Pass '-' for stdin)\n  -r, --replace    Write output in-place, replacing input\n  -o, --outfile    Write output to file (default stdout)\n  --config         Path to config file\n  --type           [js|css|html] [\"js\"] Select beautifier type\n  -q, --quiet      Suppress logging to stdout\n  -s, --indent-size                 Indentation size [4]\n  -t, --indent-with-tabs            Indent with tabs, overrides -s and -c\n  -n, --end-with-newline            End output with newline\n  -p, --preserve-newlines           Preserve line-breaks (--no-preserve-newlines disables)\n  -b, --brace-style                 [collapse|expand|end-expand|none][,preserve-inline] [collapse,preserve-inline]\n  -w, --wrap-line-length            Wrap lines that exceed N characters [0]\n"
      }
    ],
    "field": [
      {
        "id": "file",
        "label": "Input file",
        "description": "Reads standard input when empty and no file is given.",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "option": [
          "--file",
          "-f"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "outfile",
        "label": "Output file",
        "description": "Defaults to standard output.",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "output"
        },
        "option": [
          "--outfile",
          "-o"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "replace",
        "label": "Replace input file in place",
        "type": "boolean",
        "option": [
          "--replace",
          "-r"
        ],
        "effect": "overwrite",
        "sources": [
          "readme"
        ]
      },
      {
        "id": "type",
        "label": "Beautifier type",
        "type": "enum",
        "option": [
          "--type"
        ],
        "choices": [
          {
            "value": "js",
            "label": "JavaScript"
          },
          {
            "value": "css",
            "label": "CSS"
          },
          {
            "value": "html",
            "label": "HTML"
          }
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "indent_size",
        "label": "Indent size",
        "type": "integer",
        "option": [
          "--indent-size",
          "-s"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "indent_with_tabs",
        "label": "Indent with tabs",
        "type": "boolean",
        "option": [
          "--indent-with-tabs",
          "-t"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "end_with_newline",
        "label": "End output with newline",
        "type": "boolean",
        "option": [
          "--end-with-newline",
          "-n"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "wrap_line_length",
        "label": "Wrap line length",
        "description": "0 disables wrapping.",
        "type": "integer",
        "option": [
          "--wrap-line-length",
          "-w"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "config",
        "label": "Config file",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "option": [
          "--config"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "quiet",
        "label": "Quiet",
        "type": "boolean",
        "option": [
          "--quiet",
          "-q"
        ],
        "sources": [
          "readme"
        ]
      }
    ],
    "task": [
      {
        "id": "print",
        "label": "Print formatted output",
        "fields": [
          "file",
          "indent_size"
        ],
        "required": [
          "file"
        ]
      },
      {
        "id": "in_place",
        "label": "Format file in place",
        "fields": [
          "file",
          "replace",
          "indent_size"
        ],
        "required": [
          "file",
          "replace"
        ],
        "set": {
          "replace": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "file",
          "outfile",
          "replace",
          "type",
          "indent_size",
          "indent_with_tabs",
          "end_with_newline"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "wrap_line_length",
          "config",
          "quiet"
        ]
      }
    ]
  }
}
