CLI reference
Complete reference for the Brevo CLI — install, authenticate, and manage OAuth apps
The Brevo CLI (@getbrevo/cli) lets you create and manage OAuth apps, scaffold starter code, and run a local test server — all from the terminal.
Installation
npm
yarn
Requirements: Node.js >= 20.15.0
Verify:
Authentication commands
brevo login
Authenticate with your Brevo account via browser.
Opens oauth-cli.brevo.com in your browser. After signing in, credentials are saved to ~/.brevo/credentials.json.
Example:
brevo logout
Clear stored credentials.
Example:
Logout clears cached app credentials (client ID / client secret). Run brevo app credentials --reveal-secret before logging out if you need to save them.
brevo whoami
Show the currently authenticated user.
Example:
App commands
brevo app init
Guided setup — authenticate, create an app, and scaffold starter code in one flow.
No flags. Prompts for: app name, distribution type, redirect URL, output directory.
Example:
Use this for first-time setup. For scripted or automated flows, use brevo app create with flags instead.
brevo app create
Create a new OAuth app.
Examples:
brevo app list
List all OAuth apps in your account.
Example:
brevo app credentials
Show credentials for an app.
Examples:
brevo app update
Update an app’s name or redirect URLs.
Behavior:
- With
--nameor--redirect-uriflags: merges flag values with existing app configuration - Without flags (run from a scaffolded project directory): pushes the full
app-config.jsonto Brevo --redirect-uriappends to existing URLs — it does not replace them- After a successful update,
app-config.jsonis written back automatically
Examples:
brevo app scaffold
Generate starter code for an existing app.
Generates 11 files including an Express OAuth test server with .env.local pre-populated with your credentials.
Example:
brevo app start
Start a scaffolded feature server locally.
Run from inside your scaffolded project directory (where app-config.json is). Install dependencies first:
Examples:
If you change the port, update your app’s redirect URL to match:
brevo app update --redirect-uri http://localhost:3000/auth/callback
Auto-registration. When the resolved port has no matching http://localhost:<port>/... entry on the app, the CLI prompts to register it automatically — approving pushes the new URL to Brevo and updates app-config.json. In non-TTY/CI mode it hard-fails instead of silently mutating the remote app; use brevo app update --redirect-uri to register the URL first.
brevo app delete
Delete an OAuth app. This action cannot be undone.
Example:
Exit codes
Environment variables
app-config.json schema
The scaffold writes app-config.json to the project root. brevo app update (without flags) pushes this file to Brevo.
Upgrading
The CLI checks for new versions after each command and prints a banner when one is available. Pass --no-update-notifier or set BREVO_NO_UPDATE_NOTIFIER=1 to suppress it.