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
npm install -g @relay/cli
# or
pnpm add -g @relay/cliVerify the install:
relay --version
# relay/1.2.1 darwin-arm64 node-24Authenticate
relay loginThis 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:
relay whoamiCI 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:
export RELAY_API_KEY=rly_xxxxxxxxxxxxxxxx
relay deploy --env productionUpgrading
npm update -g @relay/cliBreaking CLI changes only happen in major versions and are always listed in the changelog.