CLI Reference
Global options available on every command:
| Flag | Description |
|---|---|
--version / -V | Print version and exit |
--debug | Enable debug logging to stderr |
--help | Show help |
queries
Section titled “queries”List running and recent queries.
trinops queries [OPTIONS]| Flag | Default | Description |
|---|---|---|
--server | (config) | Trino server host:port |
--profile | (default) | Config profile name |
--user | (config) | Trino user |
--auth | (config) | Auth method (none/basic/jwt/oauth2/kerberos) |
--query-user | (you) | Filter by query owner; all for everyone |
--state | (any) | Filter by query state |
--limit / -n | 25 | Max queries per page; 0 for all |
--page / -p | 1 | Page number (1-based) |
--json | false | JSON output |
--select / -s | (all) | Comma-separated fields for JSON output |
Examples:
# List your running queriestrinops queries
# All users, only RUNNING state, as JSONtrinops queries --query-user all --state RUNNING --json
# Page 2, 10 per pagetrinops queries -n 10 -p 2
# Select specific fieldstrinops queries --json -s "query_id,state,user"Show details for a specific query.
trinops query QUERY_ID [OPTIONS]| Flag | Default | Description |
|---|---|---|
--server | (config) | Trino server host:port |
--profile | (default) | Config profile name |
--user | (config) | Trino user |
--auth | (config) | Auth method |
--json | false | JSON output |
--select / -s | (all) | Comma-separated fields to include in JSON |
Examples:
trinops query 20240315_123456_00001_abcde
# Raw JSON with selected fieldstrinops query 20240315_123456_00001_abcde --json -s "queryId,state,queryStats.elapsedTime"Kill a running query.
trinops kill QUERY_ID [OPTIONS]| Flag | Default | Description |
|---|---|---|
--server | (config) | Trino server host:port |
--profile | (default) | Config profile name |
--user | (config) | Trino user |
--auth | (config) | Auth method |
--yes / -y | false | Skip confirmation prompt |
The kill command respects allow_kill and confirm_kill in your profile. If allow_kill is false, the command exits with an error.
Examples:
trinops kill 20240315_123456_00001_abcde
# Skip confirmationtrinops kill 20240315_123456_00001_abcde -yLaunch the interactive TUI dashboard.
trinops top [OPTIONS]| Flag | Default | Description |
|---|---|---|
--server | (config) | Trino server host:port |
--profile | (default) | Config profile name |
--user | (config) | Trino user |
--auth | (config) | Auth method |
--interval | 30.0 | Refresh interval in seconds |
Examples:
trinops toptrinops top --interval 10trinops top --profile stagingAlias for top. Identical flags and behavior.
trinops tui [OPTIONS]config init
Section titled “config init”Create or overwrite the config file. Prompts for missing values unless all required options are provided.
trinops config init [OPTIONS]| Flag | Default | Description |
|---|---|---|
--config-path | ~/.config/trinops/config.toml | Config file path |
--server | (prompt) | Trino server host:port |
--scheme | (prompt, default https) | http or https |
--user | (prompt) | Trino user |
--auth | (prompt, default none) | Auth method |
--catalog | (none) | Default catalog |
--schema | (none) | Default schema |
--query-limit | (none) | Default query limit |
--yes / -y | false | Overwrite without confirmation |
Examples:
# Interactivetrinops config init
# Non-interactivetrinops config init --server trino.example.com --scheme https --user alice --auth none -yconfig set
Section titled “config set”Set a single config value.
trinops config set KEY VALUE [OPTIONS]| Flag | Default | Description |
|---|---|---|
--config-path | ~/.config/trinops/config.toml | Config file path |
--profile | default | Profile to update |
Valid keys: server, scheme, user, auth, catalog, schema, password, password_cmd, jwt_token, query_limit, allow_kill, confirm_kill.
Examples:
trinops config set query_limit 100trinops config set auth basic --profile stagingtrinops config set allow_kill falseconfig show
Section titled “config show”Show current configuration.
trinops config show [OPTIONS]| Flag | Default | Description |
|---|---|---|
--config-path | ~/.config/trinops/config.toml | Config file path |
--profile | (default) | Show a specific profile |
Examples:
trinops config showtrinops config show --profile stagingauth status
Section titled “auth status”Show the current authentication state.
trinops auth status [OPTIONS]| Flag | Default | Description |
|---|---|---|
--config-path | ~/.config/trinops/config.toml | Config file path |
--profile | (default) | Config profile name |
auth login
Section titled “auth login”Run the OAuth2 authentication flow and cache the token. Only works when the profile’s auth method is oauth2.
trinops auth login [OPTIONS]| Flag | Default | Description |
|---|---|---|
--config-path | ~/.config/trinops/config.toml | Config file path |
--profile | (default) | Config profile name |
schema refresh
Section titled “schema refresh”Fetch schema metadata from Trino and cache it locally.
trinops schema refresh [OPTIONS]| Flag | Default | Description |
|---|---|---|
--server | (config) | Trino server host:port |
--profile | (default) | Config profile name |
--user | (config) | Trino user |
--auth | (config) | Auth method |
--catalog | (profile default) | Catalog to fetch |
--all | false | Discover and fetch all catalogs |
Examples:
trinops schema refresh --catalog hivetrinops schema refresh --alltrinops schema refresh --all --profile stagingschema search
Section titled “schema search”Search cached schema metadata for tables or columns using glob patterns.
trinops schema search PATTERN [OPTIONS]| Flag | Default | Description |
|---|---|---|
--profile | (default) | Config profile name |
--catalog | (all) | Limit search to a specific catalog |
--columns | false | Search column names instead of table names |
--json | false | JSON output |
Examples:
trinops schema search "*order*"trinops schema search "analytics.*" --catalog hivetrinops schema search --columns "email"trinops schema search "*event*" --jsonschema show
Section titled “schema show”Browse the schema hierarchy or show columns for a specific table.
trinops schema show [NAME] [OPTIONS]The name determines the level of detail: no argument lists catalogs, one part lists schemas in a catalog, two parts (catalog.schema) lists tables, three parts (catalog.schema.table) shows columns. An unqualified name is matched as a table across all catalogs.
| Flag | Default | Description |
|---|---|---|
--profile | (default) | Config profile name |
--catalog | (all) | Limit to a specific catalog (for full dump) |
--recursive / -r | false | Expand the full tree below the current level |
--json | false | JSON output |
Examples:
# Browse hierarchytrinops schema showtrinops schema show hivetrinops schema show hive.analytics
# Show table columnstrinops schema show userstrinops schema show hive.analytics.page_views
# Recursive treetrinops schema show hive --recursive
# JSON dumptrinops schema show --jsontrinops schema show hive.analytics --json --recursiveschema list
Section titled “schema list”List all cached catalogs.
trinops schema list [OPTIONS]| Flag | Default | Description |
|---|---|---|
--profile | (default) | Config profile name |
Examples:
trinops schema listtrinops schema list --profile staging