Skip to content

CLI Reference

Global options available on every command:

FlagDescription
--version / -VPrint version and exit
--debugEnable debug logging to stderr
--helpShow help

List running and recent queries.

trinops queries [OPTIONS]
FlagDefaultDescription
--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 / -n25Max queries per page; 0 for all
--page / -p1Page number (1-based)
--jsonfalseJSON output
--select / -s(all)Comma-separated fields for JSON output

Examples:

Terminal window
# List your running queries
trinops queries
# All users, only RUNNING state, as JSON
trinops queries --query-user all --state RUNNING --json
# Page 2, 10 per page
trinops queries -n 10 -p 2
# Select specific fields
trinops queries --json -s "query_id,state,user"

Show details for a specific query.

trinops query QUERY_ID [OPTIONS]
FlagDefaultDescription
--server(config)Trino server host:port
--profile(default)Config profile name
--user(config)Trino user
--auth(config)Auth method
--jsonfalseJSON output
--select / -s(all)Comma-separated fields to include in JSON

Examples:

Terminal window
trinops query 20240315_123456_00001_abcde
# Raw JSON with selected fields
trinops query 20240315_123456_00001_abcde --json -s "queryId,state,queryStats.elapsedTime"

Kill a running query.

trinops kill QUERY_ID [OPTIONS]
FlagDefaultDescription
--server(config)Trino server host:port
--profile(default)Config profile name
--user(config)Trino user
--auth(config)Auth method
--yes / -yfalseSkip 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:

Terminal window
trinops kill 20240315_123456_00001_abcde
# Skip confirmation
trinops kill 20240315_123456_00001_abcde -y

Launch the interactive TUI dashboard.

trinops top [OPTIONS]
FlagDefaultDescription
--server(config)Trino server host:port
--profile(default)Config profile name
--user(config)Trino user
--auth(config)Auth method
--interval30.0Refresh interval in seconds

Examples:

Terminal window
trinops top
trinops top --interval 10
trinops top --profile staging

Alias for top. Identical flags and behavior.

trinops tui [OPTIONS]

Create or overwrite the config file. Prompts for missing values unless all required options are provided.

trinops config init [OPTIONS]
FlagDefaultDescription
--config-path~/.config/trinops/config.tomlConfig 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 / -yfalseOverwrite without confirmation

Examples:

Terminal window
# Interactive
trinops config init
# Non-interactive
trinops config init --server trino.example.com --scheme https --user alice --auth none -y

Set a single config value.

trinops config set KEY VALUE [OPTIONS]
FlagDefaultDescription
--config-path~/.config/trinops/config.tomlConfig file path
--profiledefaultProfile to update

Valid keys: server, scheme, user, auth, catalog, schema, password, password_cmd, jwt_token, query_limit, allow_kill, confirm_kill.

Examples:

Terminal window
trinops config set query_limit 100
trinops config set auth basic --profile staging
trinops config set allow_kill false

Show current configuration.

trinops config show [OPTIONS]
FlagDefaultDescription
--config-path~/.config/trinops/config.tomlConfig file path
--profile(default)Show a specific profile

Examples:

Terminal window
trinops config show
trinops config show --profile staging

Show the current authentication state.

trinops auth status [OPTIONS]
FlagDefaultDescription
--config-path~/.config/trinops/config.tomlConfig file path
--profile(default)Config profile name

Run the OAuth2 authentication flow and cache the token. Only works when the profile’s auth method is oauth2.

trinops auth login [OPTIONS]
FlagDefaultDescription
--config-path~/.config/trinops/config.tomlConfig file path
--profile(default)Config profile name

Fetch schema metadata from Trino and cache it locally.

trinops schema refresh [OPTIONS]
FlagDefaultDescription
--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
--allfalseDiscover and fetch all catalogs

Examples:

Terminal window
trinops schema refresh --catalog hive
trinops schema refresh --all
trinops schema refresh --all --profile staging

Search cached schema metadata for tables or columns using glob patterns.

trinops schema search PATTERN [OPTIONS]
FlagDefaultDescription
--profile(default)Config profile name
--catalog(all)Limit search to a specific catalog
--columnsfalseSearch column names instead of table names
--jsonfalseJSON output

Examples:

Terminal window
trinops schema search "*order*"
trinops schema search "analytics.*" --catalog hive
trinops schema search --columns "email"
trinops schema search "*event*" --json

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.

FlagDefaultDescription
--profile(default)Config profile name
--catalog(all)Limit to a specific catalog (for full dump)
--recursive / -rfalseExpand the full tree below the current level
--jsonfalseJSON output

Examples:

Terminal window
# Browse hierarchy
trinops schema show
trinops schema show hive
trinops schema show hive.analytics
# Show table columns
trinops schema show users
trinops schema show hive.analytics.page_views
# Recursive tree
trinops schema show hive --recursive
# JSON dump
trinops schema show --json
trinops schema show hive.analytics --json --recursive

List all cached catalogs.

trinops schema list [OPTIONS]
FlagDefaultDescription
--profile(default)Config profile name

Examples:

Terminal window
trinops schema list
trinops schema list --profile staging