id = "trino"
name = "Trino CLI"
homepage = "https://trino.io/"
description = "Distributed SQL query engine command-line client."
executables = ["trino"]
platforms = ["macos", "linux"]
[dotfiles]
paths = []
exclude = []
secret = ["~/.trino_config", "[configHome]/trino/config"]
[commands]
format = 1
label = "Run a Trino query"
description = "Connect to a Trino coordinator and run a statement or a file non-interactively, or open the interactive shell. Authentication, TLS and Kerberos options are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.source]]
id = "docs"
kind = "manual"
url = "https://trino.io/docs/current/client/cli.html"
revision = "2026-10-27"
evidence = """
--catalog
Sets the default catalog.
--schema
Sets the default schema. Must be combined with --catalog.
--server
The HTTP/HTTPS address and port of the Trino coordinator.
--user
Sets the username for Username and password authentication.
--session
Sets one or more session properties.
--timezone
Sets the time zone for the session using the time zone name.
--debug
Enables display of debug information during CLI usage for
--execute=<execute>
Execute specified statements and exit.
-f, --file=<file>
Execute statements from file and exit.
--ignore-errors
Continue processing in batch mode when an error occurs.
--output-format=<format>
Specify the format to use for printing query results.
Defaults to CSV.
--output-format=JSON
--output-format=ALIGNED
--output-format=CSV
"""
[[commands.field]]
id = "server"
label = "Server"
description = "Coordinator address; defaults to http://localhost:8080."
type = "url"
option = ["--server"]
sources = ["docs"]
[[commands.field]]
id = "catalog"
label = "Catalog"
type = "string"
option = ["--catalog"]
sources = ["docs"]
[[commands.field]]
id = "schema"
label = "Schema"
description = "Needs a catalog."
type = "string"
option = ["--schema"]
sources = ["docs"]
[[commands.field]]
id = "user"
label = "User"
type = "string"
option = ["--user"]
sources = ["docs"]
[[commands.field]]
id = "execute"
label = "Statement to run"
type = "string"
option = ["--execute"]
sources = ["docs"]
[[commands.field]]
id = "file"
label = "SQL file"
type = "path"
path = { kind = "file", role = "input" }
option = ["--file", "-f"]
sources = ["docs"]
[[commands.field]]
id = "output_format"
label = "Output format"
description = "Defaults to CSV in batch mode."
type = "string"
option = ["--output-format"]
suggestions = [{ value = "CSV", label = "CSV" }, { value = "JSON", label = "JSON" }, { value = "ALIGNED", label = "Aligned table" }]
sources = ["docs"]
[[commands.field]]
id = "ignore_errors"
label = "Continue on errors"
type = "boolean"
option = ["--ignore-errors"]
sources = ["docs"]
[[commands.field]]
id = "debug"
label = "Debug output"
type = "boolean"
option = ["--debug"]
sources = ["docs"]
[[commands.task]]
id = "query"
label = "Run one statement"
fields = ["server", "catalog", "schema", "execute", "output_format"]
required = ["execute"]
[[commands.task]]
id = "run_file"
label = "Run a SQL file"
fields = ["server", "catalog", "schema", "file", "output_format", "ignore_errors"]
required = ["file"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["server", "catalog", "schema", "execute", "file"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["user", "output_format", "ignore_errors", "debug"]