{
  "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
    },
    "source": [
      {
        "id": "docs",
        "kind": "manual",
        "url": "https://trino.io/docs/current/client/cli.html",
        "revision": "2026-10-27",
        "evidence": "--catalog\nSets the default catalog.\n--schema\nSets the default schema. Must be combined with --catalog.\n--server\nThe HTTP/HTTPS address and port of the Trino coordinator.\n--user\nSets the username for Username and password authentication.\n--session\nSets one or more session properties.\n--timezone\nSets the time zone for the session using the time zone name.\n--debug\nEnables display of debug information during CLI usage for\n--execute=<execute>\nExecute specified statements and exit.\n-f, --file=<file>\nExecute statements from file and exit.\n--ignore-errors\nContinue processing in batch mode when an error occurs.\n--output-format=<format>\nSpecify the format to use for printing query results.\nDefaults to CSV.\n--output-format=JSON\n--output-format=ALIGNED\n--output-format=CSV\n"
      }
    ],
    "field": [
      {
        "id": "server",
        "label": "Server",
        "description": "Coordinator address; defaults to http://localhost:8080.",
        "type": "url",
        "option": [
          "--server"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "catalog",
        "label": "Catalog",
        "type": "string",
        "option": [
          "--catalog"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "schema",
        "label": "Schema",
        "description": "Needs a catalog.",
        "type": "string",
        "option": [
          "--schema"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "user",
        "label": "User",
        "type": "string",
        "option": [
          "--user"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "execute",
        "label": "Statement to run",
        "type": "string",
        "option": [
          "--execute"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "file",
        "label": "SQL file",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "option": [
          "--file",
          "-f"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "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"
        ]
      },
      {
        "id": "ignore_errors",
        "label": "Continue on errors",
        "type": "boolean",
        "option": [
          "--ignore-errors"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "debug",
        "label": "Debug output",
        "type": "boolean",
        "option": [
          "--debug"
        ],
        "sources": [
          "docs"
        ]
      }
    ],
    "task": [
      {
        "id": "query",
        "label": "Run one statement",
        "fields": [
          "server",
          "catalog",
          "schema",
          "execute",
          "output_format"
        ],
        "required": [
          "execute"
        ]
      },
      {
        "id": "run_file",
        "label": "Run a SQL file",
        "fields": [
          "server",
          "catalog",
          "schema",
          "file",
          "output_format",
          "ignore_errors"
        ],
        "required": [
          "file"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "server",
          "catalog",
          "schema",
          "execute",
          "file"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "user",
          "output_format",
          "ignore_errors",
          "debug"
        ]
      }
    ]
  }
}
