Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Command line

datarig --help prints:

datarig: a full-featured database client that lives in your terminal (PostgreSQL and MySQL)

usage: datarig [--config <path>] [<profile>]

  <profile>          connect to this connection profile and open a console
                     (without it, nothing connects until you pick a profile)
  --config <path>    config file (default: $XDG_CONFIG_HOME/datarig/config.toml,
                     else ~/.config/datarig/config.toml)
  -h, --help         show this help
  -V, --version      show the version

environment:
  DATARIG_SECRET_STORE=memory   keep passwords in memory only, never touch the OS
                                  keychain (default: keychain)

datarig --version (or -V) prints datarig and the version, as datarig 1.2.3. An option it does not know prints what is wrong and the usage line, and exits with status 2.

Environment variables

VariableWhat it does
DATARIG_NO_UPDATE_CHECKAny value (but an empty one): no update check in this process, whatever [updates] check says. Nothing is sent to GitHub.
CISet (not empty): no update check, as on a CI service.
HTTPS_PROXYThe HTTP proxy of the update check (http://[user:password@]host:port, or without http://); https_proxy when it is not set. Any other kind of proxy: no check, never a direct connection.
ALL_PROXYAs HTTPS_PROXY, when neither it nor https_proxy is set; all_proxy when it is not set.
NO_PROXYHost names (with their subdomains) the update check reaches without the proxy, separated by commas; * for every host. no_proxy when it is not set.
CARGO_HOMECargo’s home (else .cargo in the home directory): a datarig in its bin was built from the source, and the update notice names the commands for that.
DATARIG_SECRET_STOREmemory keeps passwords in memory only: the OS keychain and the secrets file are never touched. keychain, or unset (or empty): the profiles’ own password stores. Any other value is an error and datarig does not start.
XDG_CONFIG_HOMEThe config file is $XDG_CONFIG_HOME/datarig/config.toml when it is set (and --config is not given).
HOMEThe home directory: the config file is ~/.config/datarig/config.toml without XDG_CONFIG_HOME, the data and state directories default to places under it, and ~ in an SSH key file is it.
USERPROFILEThe home directory where HOME is not set (Windows).
COLORTERMtruecolor or 24bit: the terminal draws 24-bit colours, and the themes’ tints are drawn as they are.
TERMA name with 256color in it (such as xterm-256color), and COLORTERM not saying 24-bit: a terminal of 256 colours, where the cursor and selection tints that the palette would draw as their background get a palette colour of their own.
DATARIG_DATA_DIRThe data directory (saved queries, datarig’s own known_hosts), over every other rule.
DATARIG_STATE_DIRThe state directory (restored tabs, console buffers, one-time notices, the log of deleted passwords, the keychain offer’s answer, what the tips remember), over every other rule.
XDG_DATA_HOMEThe data directory is $XDG_DATA_HOME/datarig when it is set, on every OS. Otherwise ~/.local/share/datarig (Linux and other Unix), ~/Library/Application Support/datarig (macOS) or %APPDATA%\datarig (Windows).
XDG_STATE_HOMEThe state directory is $XDG_STATE_HOME/datarig when it is set, on every OS. Otherwise ~/.local/state/datarig, ~/Library/Application Support/datarig/state or %LOCALAPPDATA%\datarig.
APPDATAWindows: the data directory’s default is %APPDATA%\datarig.
LOCALAPPDATAWindows: the state directory’s default is %LOCALAPPDATA%\datarig.
LC_ALLWith language = "auto", the first of LC_ALL, LC_MESSAGES and LANG that is set picks the language: Korean when it starts with ko, else English.
LC_MESSAGESAs LC_ALL, when that is not set.
LANGAs LC_ALL, when neither it nor LC_MESSAGES is set.
VISUALThe editor a query is opened in to edit it outside datarig, split into words as a shell would.
EDITORAs VISUAL, when that is not set; without either, vi (notepad on Windows).
SSH_CONNECTIONSet (or SSH_TTY): datarig runs in an SSH session, so clipboard = "auto" copies through OSC 52 (the terminal), and the macOS keychain offer is never made.
SSH_TTYAs SSH_CONNECTION.
SSH_CLIENTSet: the macOS keychain offer is never made (as in an SSH session).
SSH_AUTH_SOCKThe ssh-agent an SSH tunnel with auth = "agent" logs in with.
TMUXSet: the status bar says that an OSC 52 copy needs set -g set-clipboard on in tmux.

A profile with password_source = "env" reads its password from the variable its password_env names, and an SSH tunnel with secret_source = "env" its secret from the one its secret_env names.