{
  "id": "basex",
  "name": "BaseX",
  "homepage": "https://basex.org/",
  "description": "A light-weight and high-performance XML database engine.",
  "executables": [
    "basex"
  ],
  "dotfiles": {
    "paths": [
      "~/basex/.basex",
      "~/basex/.basexgui"
    ],
    "exclude": [
      "~/basex/.basexhistory"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Run an XQuery",
    "description": "Evaluate an XQuery expression or file with the BaseX standalone CLI. Command scripts, server options and toggles are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "docs",
        "kind": "manual",
        "url": "https://docs.basex.org/12/Command-Line_Options",
        "revision": "12",
        "evidence": "Usage: basex [options...] [input]\n  -b<var>     Bind query variable (name=value)\n  -i<input>   Bind file or database to context\n  -o<path>    Write output to local file\n  -q<expr>    Execute XQuery expression\n  -Q<file>    Execute XQuery file\n  -r<num>     Run query multiple times\n  -s<param>   Set serialization parameter (name=value)\n-Q query.xq\n"
      }
    ],
    "field": [
      {
        "id": "expr",
        "label": "XQuery expression",
        "type": "string",
        "option": [
          "-q"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "query_file",
        "label": "XQuery file",
        "type": "path",
        "option": [
          "-Q"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "docs"
        ]
      },
      {
        "id": "context",
        "label": "Context file or database",
        "type": "path",
        "option": [
          "-i"
        ],
        "path": {
          "kind": "any",
          "role": "input"
        },
        "sources": [
          "docs"
        ]
      },
      {
        "id": "bind",
        "label": "Bind variable (name=value)",
        "type": "string",
        "option": [
          "-b"
        ],
        "multiple": true,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "serialize",
        "label": "Serialization parameter (name=value)",
        "type": "string",
        "option": [
          "-s"
        ],
        "multiple": true,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "output",
        "label": "Output file",
        "type": "path",
        "option": [
          "-o"
        ],
        "path": {
          "kind": "file",
          "role": "output"
        },
        "effect": "overwrite",
        "sources": [
          "docs"
        ]
      },
      {
        "id": "runs",
        "label": "Run count",
        "type": "integer",
        "option": [
          "-r"
        ],
        "sources": [
          "docs"
        ]
      }
    ],
    "task": [
      {
        "id": "expression",
        "label": "Evaluate an expression",
        "fields": [
          "expr",
          "context",
          "output"
        ],
        "required": [
          "expr"
        ]
      },
      {
        "id": "file",
        "label": "Run a query file",
        "fields": [
          "query_file",
          "context",
          "output"
        ],
        "required": [
          "query_file"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "expr",
          "query_file",
          "context",
          "output"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "bind",
          "serialize",
          "runs"
        ]
      }
    ]
  }
}
