{
  "id": "pkg-config",
  "name": "pkg-config",
  "description": "Return metainformation about installed libraries.",
  "homepage": "https://www.freedesktop.org/wiki/Software/pkg-config/",
  "executables": [
    "pkg-config"
  ],
  "commands": {
    "format": 1,
    "label": "Query libraries",
    "description": "Print compile and link flags or test for a library. Pick one query flag per run.",
    "quality": "ai-draft",
    "base": "fig:pkg-config",
    "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/pkg-config.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "libraries",
        "label": "Libraries",
        "type": "string",
        "position": 0,
        "multiple": true,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "cflags",
        "label": "Compile flags",
        "type": "boolean",
        "option": [
          "--cflags"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "libs",
        "label": "Link flags",
        "type": "boolean",
        "option": [
          "--libs"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "modversion",
        "label": "Module version",
        "type": "boolean",
        "option": [
          "--mod-version"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "exists",
        "label": "Test that the library exists",
        "type": "boolean",
        "option": [
          "--exists"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "atleast_version",
        "label": "Require at least version",
        "type": "string",
        "option": [
          "--atleast-version"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "variable",
        "label": "Print a variable",
        "type": "string",
        "option": [
          "--variable"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "static",
        "label": "Static linking output",
        "type": "boolean",
        "option": [
          "--static"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "print_errors",
        "label": "Print errors",
        "type": "boolean",
        "option": [
          "--print-errors"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "list_all",
        "label": "List all modules",
        "type": "boolean",
        "option": [
          "--list-all"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "compile",
        "label": "Compile and link flags",
        "fields": [
          "cflags",
          "libs",
          "libraries"
        ],
        "required": [
          "libraries"
        ],
        "set": {
          "cflags": [
            true
          ],
          "libs": [
            true
          ]
        }
      },
      {
        "id": "exists",
        "label": "Library exists?",
        "fields": [
          "exists",
          "libraries"
        ],
        "required": [
          "libraries"
        ],
        "set": {
          "exists": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "libraries",
          "cflags",
          "libs",
          "modversion",
          "exists",
          "atleast_version",
          "variable"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "static",
          "print_errors",
          "list_all"
        ]
      }
    ]
  }
}
