Install the CLI
Install the relay command-line interface on macOS, Linux, or Windows and authenticate with Google or your organization's SSO.
The relay CLI manages organizations, workspaces, managed databases, and live
connections from your terminal.
Install
brew install relay-sh/tap/relayHomebrew on Linux (x86_64) works with the same command.
Verify the install:
relay versionUpdate
From version 0.11.0, the CLI checks for a new release at most once a day and prints a one-line notice after a command when one is out, with the update command for how you installed it:
relay 0.12.0 is available (you have 0.11.0). Run: brew update && brew upgrade --cask relay-sh/tap/relayTo update:
relay updaterelay update picks the right method for how you installed the CLI:
| Installed with | What relay update does |
|---|---|
| Homebrew | Runs brew update and brew upgrade --cask relay-sh/tap/relay. |
install.sh, install.ps1 or a downloaded archive | Downloads the new release, verifies its SHA-256 against checksums.txt, and replaces the binary. If the binary's folder isn't writable, it prints the command to run instead (for example with sudo). |
Chocolatey, deb or rpm packages, go install | Prints the command to run with that package manager. |
To check without installing anything, run relay update --check. On 0.10.0 or
earlier, update with the same method you used to install.
The check runs in the background and never delays a command or changes its exit
code. It is off when RELAY_NO_UPDATE_CHECK is set, when CI or RELAY_TOKEN
is set, when the output isn't a terminal, and with -o json. The last check is
cached in ~/.userelay/update-check.json.
Authenticate
# Opens a browser to complete Google sign-in
relay login
# Confirm who you are
relay whoamiCredentials are saved to ~/.userelay/profiles.json. Sign out at any time with
relay logout.
Select your organization and workspace
relay org list
relay org use <org>
relay ws list
relay ws use <workspace>The active organization and workspace are stored in your profile and used by
subsequent commands. Override per-command with --org / --workspace.
Managing multiple environments? The CLI supports named profiles
(relay profiles list|use|delete|current), each with its own credentials and
server target.
Next
- Quickstart — provision a database and connect.
- CLI reference — every command.