{
  "id": "rpm",
  "name": "RPM",
  "homepage": "https://rpm.org/",
  "description": "The RPM Package Manager.",
  "executables": [
    "rpm",
    "rpmbuild"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/rpm/macros",
      "~/.rpmmacros"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Query packages",
    "description": "Query installed packages or package files with rpm -q. Installing, erasing, verifying and rpmbuild are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://man.archlinux.org/man/rpm.8",
        "revision": "RPM 6.0.1",
        "evidence": "rpm {-q|--query} [select-options] [query-options] [PACKAGE_FILE ...] [PACKAGE_NAME ...]\n-q, --query\nQuery package files or installed package(s).\n--qf QUERYFMT, --queryformat QUERYFMT\nOutput format of each queried package\n-a, --all [SELECTOR ...]\nQuery all installed packages.\n-f, --file FILE\nQuery package owning installed FILE.\n-p, --package PACKAGE_FILE\nQuery an (uninstalled) package PACKAGE_FILE.\n-i, --info\nDisplay package information, including name, version, and description.\n-l, --list\nList files in package.\n-R, --requires\nList capabilities on which this package depends.\n-c, --configfiles\nOnly include configuration files (implies -l).\n-d, --docfiles\nOnly include documentation files (implies -l).\n"
      }
    ],
    "field": [
      {
        "id": "query",
        "label": "Query mode",
        "fixed": [
          "-q"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "names",
        "label": "Package names",
        "description": "Installed package names; leave empty when using All installed.",
        "type": "string",
        "position": 0,
        "multiple": true,
        "sources": [
          "man"
        ]
      },
      {
        "id": "all",
        "label": "All installed packages",
        "type": "boolean",
        "option": [
          "--all",
          "-a"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "file",
        "label": "Owner of installed file",
        "type": "path",
        "option": [
          "--file",
          "-f"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "package",
        "label": "Package file",
        "description": "Query an uninstalled .rpm file.",
        "type": "path",
        "option": [
          "--package",
          "-p"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "info",
        "label": "Show information",
        "type": "boolean",
        "option": [
          "--info",
          "-i"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "list",
        "label": "List files",
        "type": "boolean",
        "option": [
          "--list",
          "-l"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "requires",
        "label": "List dependencies",
        "type": "boolean",
        "option": [
          "--requires",
          "-R"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "configfiles",
        "label": "Config files only",
        "type": "boolean",
        "option": [
          "--configfiles",
          "-c"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "docfiles",
        "label": "Doc files only",
        "type": "boolean",
        "option": [
          "--docfiles",
          "-d"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "queryformat",
        "label": "Output format",
        "description": "A queryformat string, for example '%{NAME}-%{VERSION}\\n'.",
        "type": "string",
        "option": [
          "--queryformat",
          "--qf"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "info",
        "label": "Package information",
        "set": {
          "info": [
            true
          ]
        },
        "fields": [
          "query",
          "names",
          "info"
        ],
        "required": [
          "names"
        ]
      },
      {
        "id": "files",
        "label": "List package files",
        "set": {
          "list": [
            true
          ]
        },
        "fields": [
          "query",
          "names",
          "list",
          "configfiles",
          "docfiles"
        ],
        "required": [
          "names"
        ]
      },
      {
        "id": "owner",
        "label": "Which package owns a file",
        "fields": [
          "query",
          "file"
        ],
        "required": [
          "file"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "query",
          "names",
          "all",
          "file",
          "package",
          "info",
          "list",
          "requires"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "configfiles",
          "docfiles",
          "queryformat"
        ]
      }
    ]
  }
}
