{
  "id": "install",
  "name": "install",
  "description": "Copy files and set attributes (mode, owner, group) on the copies.",
  "executables": [
    "install"
  ],
  "commands": {
    "format": 1,
    "label": "Install files",
    "description": "Copy files to a destination with the given mode, owner and group, or create directories. The last path is the destination. File flags (-f) and mmap control (-M) are left out.",
    "quality": "ai-draft",
    "base": "fig:install",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "src",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/install.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "paths",
        "label": "Sources and destination",
        "description": "Source files followed by the destination file or directory as the last entry.",
        "type": "path",
        "position": 0,
        "multiple": true,
        "path": {
          "kind": "any",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "src"
        ]
      },
      {
        "id": "mode",
        "label": "Mode",
        "description": "Octal or symbolic mode; the default is rwxr-xr-x (0755).",
        "type": "string",
        "option": [
          "-m"
        ],
        "suggestions": [
          {
            "value": "755",
            "label": "755"
          },
          {
            "value": "644",
            "label": "644"
          },
          {
            "value": "600",
            "label": "600"
          }
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "owner",
        "label": "Owner",
        "description": "Owner name or numeric UID.",
        "type": "string",
        "option": [
          "-o"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "group",
        "label": "Group",
        "description": "Group name or numeric GID.",
        "type": "string",
        "option": [
          "-g"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "mkdirs",
        "label": "Create directories",
        "description": "Create directories instead of copying; missing parents are created.",
        "type": "boolean",
        "option": [
          "-d"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "backup",
        "label": "Back up existing files",
        "description": "Rename existing targets to file.old before overwriting.",
        "type": "boolean",
        "option": [
          "-b"
        ],
        "effect": "overwrite",
        "sources": [
          "src"
        ]
      },
      {
        "id": "backup_suffix",
        "label": "Backup suffix",
        "description": "Suffix used with the backup option.",
        "type": "string",
        "option": [
          "-B"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "compare",
        "label": "Compare and copy",
        "description": "Do not change the target modification time when the files are the same.",
        "type": "boolean",
        "option": [
          "-C"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "preserve",
        "label": "Preserve modification time",
        "description": "Preserve the source modification time.",
        "type": "boolean",
        "option": [
          "-p"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "strip",
        "label": "Strip binaries",
        "description": "Run strip(1) on the installed binaries.",
        "type": "boolean",
        "option": [
          "-s"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "safe",
        "label": "Safe copy",
        "description": "Install through a temporary file so a failed copy leaves the target untouched.",
        "type": "boolean",
        "option": [
          "-S"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "description": "Show when compare-and-copy actually installs something.",
        "type": "boolean",
        "option": [
          "-v"
        ],
        "sources": [
          "src"
        ]
      }
    ],
    "task": [
      {
        "id": "install_file",
        "label": "Install files with a mode",
        "fields": [
          "paths",
          "mode",
          "owner",
          "group"
        ],
        "required": [
          "paths"
        ]
      },
      {
        "id": "make_dirs",
        "label": "Create directories",
        "fields": [
          "paths",
          "mkdirs",
          "mode"
        ],
        "required": [
          "paths",
          "mkdirs"
        ],
        "set": {
          "mkdirs": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "paths",
          "mode",
          "owner",
          "group",
          "mkdirs"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "backup",
          "backup_suffix",
          "compare",
          "preserve",
          "strip",
          "safe",
          "verbose"
        ]
      }
    ]
  }
}
