{
  "id": "astyle",
  "name": "Artistic Style",
  "homepage": "https://astyle.sourceforge.net",
  "description": "A source code indenter, formatter, and beautifier for the C, C++, C++/CLI, Objective-C, C# and Java programming languages.",
  "executables": [
    "astyle"
  ],
  "dotfiles": {
    "paths": [
      "~/.astylerc",
      "%APPDATA%/astylerc"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Format source code",
    "description": "Reformat C, C++, C#, Java or Objective-C files in place with Artistic Style. Keeps a .orig backup unless disabled. Only the common style options are covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "manual",
        "kind": "manual",
        "url": "https://astyle.sourceforge.net/astyle.html",
        "revision": "2026-10-27",
        "evidence": "astyle [OPTIONS] SourceFilePath\n--style=allman / --style=bsd / --style=break / -A1\n--style=java / --style=attach / -A2\n--style=kr / --style=k&r / --style=k/r / -A3\n--style=stroustrup / -A4\n--style=google / -A14\nstyle=whitesmith style=vtk style=ratliff style=gnu style=linux style=horstmann style=1tbs style=mozilla style=webkit style=pico style=lisp\n--indent=spaces / --indent=spaces=# / -s#\n--indent=tab / --indent=tab=# / -t / -t#\n--pad-oper / -p\n--pad-header / -H\n--break-blocks / -f\n--add-braces / -j\n--suffix=none / -n\n--recursive / -r / -R\n--dry-run\n--formatted / -Q\n--quiet / -q\n--exclude=####\n--preserve-date / -Z\n--options=\n"
      }
    ],
    "field": [
      {
        "id": "files",
        "label": "Source files",
        "description": "Files or wildcards. With recursive, use a wildcard such as \"src/*.cpp\".",
        "type": "path",
        "path": {
          "kind": "any",
          "role": "input"
        },
        "position": 0,
        "multiple": true,
        "min": 1,
        "sources": [
          "manual"
        ]
      },
      {
        "id": "style",
        "label": "Brace style",
        "type": "enum",
        "option": [
          "--style"
        ],
        "choices": [
          {
            "value": "allman",
            "label": "Allman"
          },
          {
            "value": "java",
            "label": "Java"
          },
          {
            "value": "kr",
            "label": "K&R"
          },
          {
            "value": "stroustrup",
            "label": "Stroustrup"
          },
          {
            "value": "google",
            "label": "Google"
          }
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "indent_spaces",
        "label": "Indent with spaces",
        "description": "Spaces per indent, 2 to 20.",
        "type": "integer",
        "option": [
          "--indent=spaces"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "pad_oper",
        "label": "Pad operators",
        "type": "boolean",
        "option": [
          "--pad-oper",
          "-p"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "pad_header",
        "label": "Pad after if/for/while",
        "type": "boolean",
        "option": [
          "--pad-header",
          "-H"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "break_blocks",
        "label": "Blank lines around blocks",
        "type": "boolean",
        "option": [
          "--break-blocks",
          "-f"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "add_braces",
        "label": "Add braces to one-line statements",
        "type": "boolean",
        "option": [
          "--add-braces",
          "-j"
        ],
        "effect": "overwrite",
        "sources": [
          "manual"
        ]
      },
      {
        "id": "no_backup",
        "label": "Do not keep .orig backup",
        "type": "boolean",
        "option": [
          "--suffix=none",
          "-n"
        ],
        "effect": "overwrite",
        "sources": [
          "manual"
        ]
      },
      {
        "id": "recursive",
        "label": "Recurse into directories",
        "type": "boolean",
        "option": [
          "--recursive",
          "-r"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "dry_run",
        "label": "Dry run",
        "type": "boolean",
        "option": [
          "--dry-run"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "options_file",
        "label": "Options file",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "option": [
          "--options"
        ],
        "sources": [
          "manual"
        ]
      }
    ],
    "task": [
      {
        "id": "format",
        "label": "Format files",
        "fields": [
          "files",
          "style",
          "indent_spaces",
          "pad_oper",
          "no_backup"
        ],
        "required": [
          "files"
        ]
      },
      {
        "id": "preview",
        "label": "Preview changes",
        "set": {
          "dry_run": [
            true
          ]
        },
        "lock": [
          "dry_run"
        ],
        "fields": [
          "files",
          "style",
          "indent_spaces",
          "dry_run",
          "recursive"
        ],
        "required": [
          "files"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "files",
          "style",
          "indent_spaces",
          "recursive",
          "dry_run"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "pad_oper",
          "pad_header",
          "break_blocks",
          "add_braces",
          "no_backup",
          "options_file"
        ]
      }
    ]
  }
}
