Reference · § 3.1

3.1CLI reference

Every relay command, its flags, and what it does.

The full command surface of @relay/cli 1.2. Run relay <command> --help for per-command flags.

Project

CommandWhat it does
relay init [name]Scaffold a new project (--template for starters)
relay devRun routes locally with a public tunnel (--watch to reload on save)
relay deployBuild and deploy (--env production to skip staging)
relay promote stagingPromote the staging build to production
relay rollbackRepoint production to the previous build

Observability

CommandWhat it does
relay logsStream structured logs (--filter status>=500)
relay replay <id>Re-send a request from the request log

Secrets

CommandWhat it does
relay secrets set KEY=valueSet a secret (--env to target an environment)
relay secrets pullWrite deployed secrets to a local .env.relay
relay secrets diffShow drift between local and deployed values

Account

CommandWhat it does
relay loginAuthenticate via the browser
relay whoamiShow the active account, team, and key scope
relay migrate-configConvert legacy relay.config.js to relay.toml

Exit codes

  • 0 success
  • 1 command failed (details on stderr)
  • 2 invalid usage (unknown flag or missing argument)
  • 3 authentication required or expired