Trino CLI
$ trino Foundation Med RiskThe Trino CLI (trino) connects to Trino coordinators to run federated SQL across Iceberg, Hive, PostgreSQL, Kafka, and S3 data lakes. Batch mode (--execute) paired with --output-format JSON or CSV produces clean stdout results for data agents.
brew install trino trino executes federated SQL files (-f) and inline queries (--execute) with --output-format JSON directly against coordinator HTTP endpoints.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --execute, -f, and --output-format JSON / CSV / TSV cleanly in batch mode, though each invocation pays JVM startup cost.
--executeand--output-format JSONemit machine-readable rows
Supports TRINO_PASSWORD, --access-token, TLS truststores, and SQL EXPLAIN, though it has no CLI --read-only flag.
- Env-var password and token auth; relies on coordinator RBAC for read-only enforcement
Executable JAR wrapped via Homebrew (brew install trino), requiring Java 22+ / JVM on the host.
- Packaged via Homebrew and Maven Central JAR; requires JVM
Queries across heterogeneous catalogs (Iceberg, Postgres, S3, Kafka) with a single ANSI SQL interface.
- Federated SQL across multiple catalogs via
--catalogand--schema
Maintained by the Trino Software Foundation (trinodb/trino) under Apache-2.0.
- Official
trinodb/trinorepository under Apache-2.0
Well-documented CLI flags and output formats in trino.io/docs/current/client/cli.html.
- Official CLI guide at trino.io
Security, Auth & Guardrails
Supports TRINO_PASSWORD env var with --password and TLS keystore/truststore flags (--truststore-path, --access-token).
Apache-2.0 open-source CLI; querying cloud-hosted Starburst/Trino clusters or object storage scans may incur compute/egress costs.
# Trino CLI (trino) Agent Rules - Always pass `--execute` (or `-f`) and `--output-format JSON` (or `CSV`) to avoid the interactive shell. - Inspect partitions and run `EXPLAIN` or `LIMIT` before scanning large data-lake tables. - Pass passwords via `TRINO_PASSWORD` or `--access-token` rather than inline flags.
Agent-Ready Command Recipes
Safe Read-Only Queries
trino --server http://localhost:8080 --execute "SHOW CATALOGS" --output-format JSON
Queries available Trino catalogs and prints JSON output in batch mode.
trino --server http://localhost:8080 --catalog iceberg --schema analytics --execute "DESCRIBE events" --output-format JSON
Retrieves table schema metadata as JSON before writing analytical queries.
Strengths for Agents
- + Clean
--execute+--output-format JSONbatch mode for federated SQL. - + Supports
--access-tokenandTRINO_PASSWORDfor headless auth.
Caveats & Pitfalls
- ! Requires a modern JVM runtime and has noticeable per-command startup latency.
- ! No built-in
--read-onlyclient flag; safety depends on Trino coordinator privileges.