Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Trino CLI

$ trino Foundation Med Risk
Trino Software Foundation · Database & Data · Apache-2.0 · macos / linux / windows

The 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.

FCRS-1.0 Score
82 /100
Good
Medium Confidence
Zero-Friction Install
brew install trino
CLI vs MCP Decision CLI Preferred vs MCP

trino executes federated SQL files (-f) and inline queries (--execute) with --output-format JSON directly against coordinator HTTP endpoints.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Supports --execute, -f, and --output-format JSON / CSV / TSV cleanly in batch mode, though each invocation pays JVM startup cost.

  • --execute and --output-format JSON emit machine-readable rows
Trust & Safety 20 / 25

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
Setup & Portability 11 / 15

Executable JAR wrapped via Homebrew (brew install trino), requiring Java 22+ / JVM on the host.

  • Packaged via Homebrew and Maven Central JAR; requires JVM
Utility & Efficiency 14 / 15

Queries across heterogeneous catalogs (Iceberg, Postgres, S3, Kafka) with a single ANSI SQL interface.

  • Federated SQL across multiple catalogs via --catalog and --schema
Maintenance & Lineage 9 / 10

Maintained by the Trino Software Foundation (trinodb/trino) under Apache-2.0.

  • Official trinodb/trino repository under Apache-2.0
Docs & Verifiability 7 / 10

Well-documented CLI flags and output formats in trino.io/docs/current/client/cli.html.

  • Official CLI guide at trino.io

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key OAuth Browser Config File
Credential Storage

Supports TRINO_PASSWORD env var with --password and TLS keystore/truststore flags (--truststore-path, --access-token).

Side Effects
Read-Only Remote Write Destructive Billing Impact
Cost & Quotas

Apache-2.0 open-source CLI; querying cloud-hosted Starburst/Trino clusters or object storage scans may incur compute/egress costs.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

List catalogs as JSON
trino --server http://localhost:8080 --execute "SHOW CATALOGS" --output-format JSON

Queries available Trino catalogs and prints JSON output in batch mode.

Inspect table columns with EXPLAIN or DESCRIBE
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 JSON batch mode for federated SQL.
  • + Supports --access-token and TRINO_PASSWORD for headless auth.

Caveats & Pitfalls

  • ! Requires a modern JVM runtime and has noticeable per-command startup latency.
  • ! No built-in --read-only client flag; safety depends on Trino coordinator privileges.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI