{
  "id": "dar",
  "name": "DAR",
  "homepage": "https://dar.sourceforge.io",
  "description": "Backup directory tree and files.",
  "executables": [
    "dar"
  ],
  "dotfiles": {
    "paths": [],
    "secret": [
      "~/.darrc"
    ],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Dar archive",
    "description": "Create, extract, list or test a dar backup. Pick one action; each takes the archive basename (slice number and .dar are appended by dar). Encryption, differential backups, isolation, hooks and remote repositories are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://manpages.debian.org/unstable/dar/dar.1.en.html",
        "revision": "Debian unstable dar(1)",
        "evidence": "-c, --create\n-x, --extract\n-l, --list\n-t, --test\n-N, --noconf\n-n, --no-overwrite\n-e, --dry-run\n-v, --verbose\n-R, --fs-root\n    <path>\n-X, --exclude\n    <mask>\n-I, --include\n    <mask>\n-P, --prune <path>\n-g, --go-into\n    <path>\n-z, --compression={ [algo] | level\n    | algo:level | algo:level:block-size }\n--compression=9, --compression=lzo, --compression=gzip,\n--compression=bzip2, --compression=lzo:6, --compression=bzip2:2,\n--compression=gzip:1 --compression=xz:9 and so on.\n-s, --slice\n    <number>\n-s 10k\n-D, --empty-dir\n"
      }
    ],
    "field": [
      {
        "id": "create",
        "label": "Create archive (basename)",
        "type": "path",
        "option": [
          "-c",
          "--create"
        ],
        "path": {
          "kind": "any",
          "role": "output",
          "must_exist": false
        },
        "effect": "overwrite",
        "sources": [
          "man"
        ]
      },
      {
        "id": "extract",
        "label": "Extract archive (basename)",
        "type": "path",
        "option": [
          "-x",
          "--extract"
        ],
        "path": {
          "kind": "any",
          "role": "input",
          "must_exist": false
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "list",
        "label": "List archive (basename)",
        "type": "path",
        "option": [
          "-l",
          "--list"
        ],
        "path": {
          "kind": "any",
          "role": "input",
          "must_exist": false
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "test",
        "label": "Test archive (basename)",
        "type": "path",
        "option": [
          "-t",
          "--test"
        ],
        "path": {
          "kind": "any",
          "role": "input",
          "must_exist": false
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "fs_root",
        "label": "Root directory",
        "description": "Directory tree to back up, or where to restore.",
        "type": "path",
        "option": [
          "--fs-root",
          "-R"
        ],
        "path": {
          "kind": "directory",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "compression",
        "label": "Compression",
        "description": "algo, level, algo:level, e.g. gzip:6 or xz:9.",
        "type": "string",
        "option": [
          "--compression"
        ],
        "value_style": "equals",
        "suggestions": [
          {
            "value": "gzip:6",
            "label": "gzip level 6"
          },
          {
            "value": "bzip2:2",
            "label": "bzip2 level 2"
          },
          {
            "value": "xz:9",
            "label": "xz level 9"
          },
          {
            "value": "lzo:6",
            "label": "lzo level 6"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "slice",
        "label": "Slice size",
        "description": "Bytes, or with k, M, G suffix (e.g. 10k).",
        "type": "string",
        "option": [
          "--slice",
          "-s"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "exclude",
        "label": "Exclude masks",
        "type": "string",
        "option": [
          "--exclude",
          "-X"
        ],
        "multiple": true,
        "sources": [
          "man"
        ]
      },
      {
        "id": "include",
        "label": "Include masks",
        "type": "string",
        "option": [
          "--include",
          "-I"
        ],
        "multiple": true,
        "sources": [
          "man"
        ]
      },
      {
        "id": "prune",
        "label": "Prune paths",
        "type": "path",
        "option": [
          "--prune",
          "-P"
        ],
        "multiple": true,
        "path": {
          "kind": "any",
          "role": "input",
          "must_exist": false
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "empty_dir",
        "label": "Keep empty directories for excluded ones",
        "type": "boolean",
        "option": [
          "--empty-dir",
          "-D"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "no_overwrite",
        "label": "Do not overwrite",
        "type": "boolean",
        "option": [
          "--no-overwrite",
          "-n"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "dry_run",
        "label": "Dry run",
        "type": "boolean",
        "option": [
          "--dry-run",
          "-e"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "noconf",
        "label": "Ignore ~/.darrc and /etc/darrc",
        "type": "boolean",
        "option": [
          "--noconf",
          "-N"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "type": "boolean",
        "option": [
          "--verbose",
          "-v"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "backup",
        "label": "Create a backup",
        "fields": [
          "create",
          "fs_root",
          "compression",
          "slice",
          "exclude",
          "include",
          "prune",
          "empty_dir",
          "verbose"
        ],
        "required": [
          "create",
          "fs_root"
        ]
      },
      {
        "id": "restore",
        "label": "Extract a backup",
        "fields": [
          "extract",
          "fs_root",
          "include",
          "exclude",
          "no_overwrite",
          "dry_run",
          "verbose"
        ],
        "required": [
          "extract"
        ]
      },
      {
        "id": "inspect",
        "label": "List archive contents",
        "fields": [
          "list"
        ],
        "required": [
          "list"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "create",
          "extract",
          "list",
          "test",
          "fs_root",
          "compression",
          "slice"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "exclude",
          "include",
          "prune",
          "empty_dir",
          "no_overwrite",
          "dry_run",
          "noconf",
          "verbose"
        ]
      }
    ]
  }
}
