Skip to content

Environment variables ​

quarry ​

VariableMeaning
QUARRY_CONFIG_DIRUse this directory for config.toml, favorites.toml and themes/
QUARRY_DATA_DIRUse this directory for history, the query log, credentials and TUI state
XDG_CONFIG_HOMEConfig goes in $XDG_CONFIG_HOME/quarry (absolute paths only; default ~/.config)
XDG_DATA_HOMEData goes in $XDG_DATA_HOME/quarry (absolute paths only; default ~/.local/share)

PostgreSQL ​

Used for anything not given in the target or flags.

VariableMeaning
PGHOSTHost, or a socket directory if it starts with /
PGPORTPort
PGUSERUser
PGDATABASEDatabase
PGPASSWORDPassword
PGPASSFILEPassword file instead of ~/.pgpass

MySQL / MariaDB ​

VariableMeaning
MYSQL_HOSTHost
MYSQL_TCP_PORTPort
MYSQL_UNIX_PORTSocket path
MYSQL_PWDPassword

Other defaults come from ~/.my.cnf. See Passwords and secrets.

Language models ​

VariableMeaning
ANTHROPIC_API_KEYAnthropic API key, used before a saved one
ANTHROPIC_AUTH_TOKENAnthropic bearer token, used if no API key is set
ANTHROPIC_BASE_URLSend Anthropic requests to this URL (e.g. a gateway)

OPENAI_API_KEY is intentionally not read. See API keys.

Terminal and tools ​

VariableMeaning
NO_COLORAny non-empty value turns colour off
COLORTERMtruecolor or 24bit enables 24-bit colour
TERMUsed to detect colour support. dumb turns colour off.
PAGERPager, when the config doesn't set one
LESSIf unset, quarry sets it to -SRXF for the pager
VISUAL, EDITOREditor for \e, in that order (default vi)
USER, USERNAMEDefault user name

Released under the MIT licence.