{
  "id": "ditto",
  "name": "ditto",
  "description": "Copy directory hierarchies and create or extract archives (macOS).",
  "executables": [
    "ditto"
  ],
  "platforms": [
    "macos"
  ],
  "commands": {
    "format": 1,
    "label": "Copy or archive",
    "description": "Copy a directory tree, or create/extract a CPIO or zip archive. Resource-fork, ACL and HFS compression switches are left out.",
    "quality": "ai-draft",
    "base": "fig:ditto",
    "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/ditto.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "sources",
        "label": "Source",
        "type": "path",
        "path": {
          "kind": "any",
          "role": "input"
        },
        "position": 0,
        "multiple": true,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "dest",
        "label": "Destination",
        "type": "path",
        "path": {
          "kind": "any",
          "role": "output"
        },
        "position": 1,
        "effect": "overwrite",
        "sources": [
          "fig"
        ]
      },
      {
        "id": "create",
        "label": "Create an archive",
        "type": "boolean",
        "option": [
          "-c"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "extract",
        "label": "Extract archive sources",
        "type": "boolean",
        "option": [
          "-x"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "zip",
        "label": "Use PKZip instead of CPIO",
        "type": "boolean",
        "option": [
          "-k"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "keep_parent",
        "label": "Embed parent directory name in archive",
        "type": "boolean",
        "option": [
          "--keepParent"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "verbose",
        "label": "Print each source directory copied",
        "type": "boolean",
        "option": [
          "-v"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "one_device",
        "label": "Do not cross device boundaries",
        "type": "boolean",
        "option": [
          "-X"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "copy",
        "label": "Copy a tree",
        "fields": [
          "sources",
          "dest",
          "verbose",
          "one_device"
        ],
        "required": [
          "sources",
          "dest"
        ]
      },
      {
        "id": "zip",
        "label": "Create a zip archive",
        "set": {
          "create": [
            true
          ],
          "zip": [
            true
          ],
          "keep_parent": [
            true
          ]
        },
        "lock": [
          "create",
          "zip"
        ],
        "fields": [
          "sources",
          "dest",
          "create",
          "zip",
          "keep_parent"
        ],
        "required": [
          "sources",
          "dest"
        ]
      },
      {
        "id": "unzip",
        "label": "Extract a zip archive",
        "set": {
          "extract": [
            true
          ],
          "zip": [
            true
          ]
        },
        "lock": [
          "extract",
          "zip"
        ],
        "fields": [
          "sources",
          "dest",
          "extract",
          "zip"
        ],
        "required": [
          "sources",
          "dest"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "sources",
          "dest",
          "create",
          "extract",
          "zip"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "keep_parent",
          "verbose",
          "one_device"
        ]
      }
    ]
  }
}
