Skip to content

Configuration

trinops reads its configuration from a TOML file at:

~/.config/trinops/config.toml

Create it with trinops config init or write it by hand. A minimal config looks like:

[default]
server = "trino.example.com"
scheme = "https"
user = "alice"
auth = "none"

Every profile (including [default]) supports these fields:

FieldTypeDefaultDescription
serverstring(none)Trino coordinator hostname or host:port
schemestring"https"Connection scheme: http or https
userstring(none)Trino user name
authstring"none"Authentication method (see below)
catalogstring(none)Default catalog for schema commands
schemastring(none)Default schema
passwordstring(none)Password for basic auth
password_cmdstring(none)Shell command that prints the password to stdout
jwt_tokenstring(none)JWT token string for jwt auth
query_limitint50Maximum number of queries to fetch
allow_killbooltrueEnable the kill command and k binding
confirm_killbooltrueShow a confirmation prompt before killing

Set the auth field to one of these values:

none — No authentication. Suitable for clusters that trust the network or use a proxy for auth.

basic — HTTP basic authentication. Provide credentials via password or password_cmd:

[default]
server = "trino.example.com"
auth = "basic"
user = "alice"
password_cmd = "pass show trino/alice"

Using password_cmd is preferred over storing a plaintext password in the config file.

jwt — Bearer token authentication. Set the token directly or fetch it from a command:

[default]
auth = "jwt"
jwt_token = "eyJhbGci..."

oauth2 — OAuth2 device or browser flow. Run trinops auth login to initiate the flow and cache the token:

Terminal window
trinops auth login

Check the current auth state with trinops auth status.

kerberos — Kerberos/SPNEGO authentication. Requires a valid Kerberos ticket (e.g., from kinit).

Environment variables override the config file when TRINOPS_SERVER is set. This is useful for CI, containers, or one-off invocations.

VariableMaps toDefault
TRINOPS_SERVERserver(none — if unset, env vars are ignored)
TRINOPS_SCHEMEschemehttps
TRINOPS_USERuser(none)
TRINOPS_AUTHauthnone
TRINOPS_CATALOGcatalog(none)
TRINOPS_SCHEMAschema(none)

TRINOPS_SERVER acts as the trigger. If it is not set, trinops falls back to the config file entirely.

Define named profiles under [profiles.<name>] for clusters you connect to regularly:

[default]
server = "trino-prod.example.com"
scheme = "https"
user = "alice"
auth = "basic"
password_cmd = "pass show trino/prod"
[profiles.staging]
server = "trino-staging.example.com"
scheme = "https"
user = "alice"
auth = "none"
[profiles.local]
server = "localhost:8080"
scheme = "http"
user = "dev"
auth = "none"

Use --profile to select one:

Terminal window
trinops top --profile staging
trinops queries --profile local
trinops schema refresh --all --profile staging

Without --profile, trinops uses the [default] section.

Update a single field without rewriting the entire file:

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