CLI reference
Complete reference for the Brevo CLI — install, authenticate, and manage OAuth apps
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.
Requirements: Node.js >= 20.15.0
Verify:
brevo loginAuthenticate 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 logoutClear 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 whoamiShow the currently authenticated user.
Example:
brevo app initGuided 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.
brevo app createCreate a new OAuth app.
Examples:
brevo app listList all OAuth apps in your account.
Example:
brevo app credentialsShow credentials for an app.
Examples:
brevo app updateUpdate an app’s name or redirect URLs.
Behavior:
--name or --redirect-uri flags: merges flag values with existing app configurationapp-config.json to Brevo--redirect-uri appends to existing URLs — it does not replace themapp-config.json is written back automaticallyExamples:
brevo app scaffoldGenerate 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 startStart 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 deleteDelete an OAuth app. This action cannot be undone.
Example:
app-config.json schemaThe scaffold writes app-config.json to the project root. brevo app update (without flags) pushes this file to Brevo.
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.