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 }
[[commands.source]]
id = "docs"
kind = "manual"
url = "https://docs.basex.org/12/Command-Line_Options"
revision = "12"
evidence = """
Usage: basex [options...] [input]
-b<var> Bind query variable (name=value)
-i<input> Bind file or database to context
-o<path> Write output to local file
-q<expr> Execute XQuery expression
-Q<file> Execute XQuery file
-r<num> Run query multiple times
-s<param> Set serialization parameter (name=value)
-Q query.xq
"""
[[commands.field]]
id = "expr"
label = "XQuery expression"
type = "string"
option = ["-q"]
sources = ["docs"]
[[commands.field]]
id = "query_file"
label = "XQuery file"
type = "path"
option = ["-Q"]
path = { kind = "file", role = "input", must_exist = true }
sources = ["docs"]
[[commands.field]]
id = "context"
label = "Context file or database"
type = "path"
option = ["-i"]
path = { kind = "any", role = "input" }
sources = ["docs"]
[[commands.field]]
id = "bind"
label = "Bind variable (name=value)"
type = "string"
option = ["-b"]
multiple = true
sources = ["docs"]
[[commands.field]]
id = "serialize"
label = "Serialization parameter (name=value)"
type = "string"
option = ["-s"]
multiple = true
sources = ["docs"]
[[commands.field]]
id = "output"
label = "Output file"
type = "path"
option = ["-o"]
path = { kind = "file", role = "output" }
effect = "overwrite"
sources = ["docs"]
[[commands.field]]
id = "runs"
label = "Run count"
type = "integer"
option = ["-r"]
sources = ["docs"]
[[commands.task]]
id = "expression"
label = "Evaluate an expression"
fields = ["expr", "context", "output"]
required = ["expr"]
[[commands.task]]
id = "file"
label = "Run a query file"
fields = ["query_file", "context", "output"]
required = ["query_file"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["expr", "query_file", "context", "output"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["bind", "serialize", "runs"]