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
Homebrew
Requirements: Node.js >= 20.15.0 (Homebrew installs Node automatically as a dependency).
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.
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, redirect URLs, scopes, or logo URL.
Behavior:
- With
--name,--redirect-uri,--scope, or--logo-uriflags: merges flag values with existing app configuration - Without flags (run from a scaffolded project directory): pushes the full
app-config.jsonto Brevo --redirect-uriand--scopeappend to existing values — they do not replace them. To remove a scope, editapp-config.jsonand runbrevo app updatewithout flags from the project directory.--logo-urireplaces the existing logo URL.- Scope values are format-validated locally (
^[A-Za-z0-9][A-Za-z0-9:_.-]*$) but not cross-checked against the IdP catalog. Typos surface asinvalid_scopeerrors at authorization time — runbrevo app available-scopesfirst to confirm the spelling. - After a successful update,
app-config.jsonis written back automatically
Examples:
brevo app available-scopes
List every OAuth scope your app can request, grouped by category. Reads the live catalog from Brevo’s OAuth server.
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:
Claude Code skill
The CLI ships a Claude Code skill so you can drive brevo commands — creating apps, managing scopes, running the local OAuth test server — straight from Claude Code, with the CLI’s conventions and guardrails loaded as context.
Once installed, every brevo invocation auto-refreshes the skill when the CLI ships a newer version, so the guidance stays in sync with your installed CLI.
The skill format is specific to Claude Code. Other AI agents (Cursor, Copilot CLI, Gemini, Codex) shouldn’t run brevo skill:cli install — refer to the agent-context/AGENTS.md file bundled with the package instead.
Exit codes
app-config.json schema
The scaffold writes app-config.json to the project root. brevo app update (without flags) pushes this file to Brevo.
The scaffolded OAuth test server reads auth.scopes from app-config.json and joins it with spaces for the scope= query parameter. If the file is missing or unreadable, it falls back to an internal default that won’t match your app’s registered scopes — keep app-config.json in your project root and unmodified.
Upgrading
npm
yarn
Homebrew
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.