{
  "id": "xxd",
  "name": "xxd",
  "description": "Makes a hexdump or reverses one.",
  "executables": [
    "xxd"
  ],
  "commands": {
    "format": 1,
    "label": "Hexdump a file",
    "description": "Dump a file as hex, or reverse a dump with revert. Only short flags are used.",
    "quality": "ai-draft",
    "base": "fig:xxd",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/xxd.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "revert",
        "label": "Revert hexdump to binary",
        "type": "boolean",
        "option": [
          "-r"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "plain",
        "label": "Plain hex (postscript)",
        "type": "boolean",
        "option": [
          "-p"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "bits",
        "label": "Binary digits",
        "type": "boolean",
        "option": [
          "-b"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "include",
        "label": "C include style",
        "type": "boolean",
        "option": [
          "-i"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "upper",
        "label": "Upper-case hex",
        "type": "boolean",
        "option": [
          "-u"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "cols",
        "label": "Octets per line",
        "type": "integer",
        "option": [
          "-c"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "groupsize",
        "label": "Group size (bytes)",
        "type": "integer",
        "option": [
          "-g"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "len",
        "label": "Stop after N octets",
        "type": "integer",
        "option": [
          "-l"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "infile",
        "label": "Input file",
        "type": "path",
        "position": 0,
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "outfile",
        "label": "Output file",
        "type": "path",
        "position": 1,
        "path": {
          "kind": "file",
          "role": "output",
          "must_exist": false
        },
        "effect": "overwrite",
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "dump",
        "label": "Hexdump",
        "fields": [
          "infile",
          "cols",
          "groupsize",
          "len",
          "upper"
        ],
        "required": [
          "infile"
        ]
      },
      {
        "id": "revert",
        "label": "Hexdump to binary",
        "fields": [
          "infile",
          "outfile",
          "plain"
        ],
        "set": {
          "revert": [
            true
          ]
        },
        "lock": [
          "revert"
        ],
        "required": [
          "infile",
          "outfile"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "infile",
          "outfile",
          "revert",
          "plain",
          "cols",
          "groupsize",
          "len"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "bits",
          "include",
          "upper"
        ]
      }
    ]
  }
}
