Getting started · § 1.2

1.2Installation

Install the Relay CLI and authenticate your machine.

The CLI is the primary way to work with Relay. It needs Node.js 20 or newer.

Install the CLI

bash
npm install -g @relay/cli
# or
pnpm add -g @relay/cli

Verify the install:

bash
relay --version
# relay/1.2.1 darwin-arm64 node-24

Authenticate

bash
relay login

This opens the browser, and after you approve, the CLI stores a scoped token in your OS keychain. Check who you are signed in as at any time:

bash
relay whoami

CI environments

On CI there is no browser, so use an API key instead. Create one in the dashboard under Settings, then set it as an environment variable:

bash
export RELAY_API_KEY=rly_xxxxxxxxxxxxxxxx
relay deploy --env production

Upgrading

bash
npm update -g @relay/cli

Breaking CLI changes only happen in major versions and are always listed in the changelog.