kbai_pk_...), connect a WhatsApp Business channel, and send a test message without touching the portal or writing code.
Why use it
Auth in one command
keebai login runs the OAuth Device Authorization flow (RFC 8628), opens your browser, and saves your PAT to ~/.keebai/credentials.json with 0600 permissions.Connect WhatsApp without the portal
keebai whatsapp connect launches Meta Embedded Signup, or pass --qr for multi-device QR pairing. No UI needed.Send messages from your shell
Free-form text, templates with variables, custom metadata — all from
keebai whatsapp messages send.Same token everywhere
The PAT issued by the CLI works in the SDK, in
curl, and in any HTTP client against api.keebai.com/v1.Installation
keebai binary lives in your PATH.
Without a global install:
Authentication
keebai login runs the OAuth 2.0 Device Authorization Grant flow (RFC 8628):
- The CLI requests a
device_codeanduser_codefrom the public API. - Your browser opens at
https://developers.keebai.com/cli?code=ABCD-1234. - You sign in to the developer portal (if you aren’t already) and confirm the request.
- The CLI finishes polling and saves the PAT (
kbai_pk_...) to~/.keebai/credentials.jsonwith mode0600.
login and inject a long-lived PAT via env var. It takes precedence over credentials saved on disk:
Commands
Auth
| Command | Description |
|---|---|
keebai login | Device flow; saves the PAT to ~/.keebai/credentials.json. |
keebai whoami | Shows the user, company, and scopes of the active token. |
keebai logout | Revokes the PAT server-side and deletes local credentials. --local-only skips the revoke. |
| Command | Description |
|---|---|
keebai whatsapp connect | Connects a WhatsApp Business channel via Meta Embedded Signup (browser). |
keebai whatsapp connect --qr | Pairs a channel via QR in the terminal (multi-device). No browser. |
keebai whatsapp numbers list | Lists the WhatsApp numbers connected to your company. |
keebai whatsapp messages send | Sends free-form text or an approved template. |
Connect a channel (Embedded Signup)
Connect a channel (multi-device QR)
Send messages
--from accepts a channel_id (24-hex), a phone_number_id, or the number in E.164.
Free-form text (only inside the 24h window):
Using your token directly
Afterkeebai login, the PAT lives in ~/.keebai/credentials.json under the access_token field. Use it as a Bearer token against https://api.keebai.com/v1/...:
Global flags
| Flag | Description |
|---|---|
--output <pretty|json> | Output format. Default: pretty. Use json for programmatic parsing. |
--no-browser | Don’t open the browser automatically on login or connect. |
--verbose | Verbose logs to stderr for diagnostics. |
Environment variables
| Variable | What it does |
|---|---|
KEEBAI_API_TOKEN | Inject a PAT for non-interactive use (CI). Takes precedence over ~/.keebai/credentials.json. |
Endpoints the CLI hits
The CLI talks exclusively tohttps://api.keebai.com/v1/.... Browser flows (login approval, channel connect) happen at https://developers.keebai.com/cli and https://connect.keebai.com/connect/whatsapp respectively.
Resources
npm: @keebai/cli
Latest version, changelog, install stats.
TypeScript SDK
The same PAT works in the SDK for code integrations.
Agent Skills
The
integrate-keebai-whatsapp skill for AI agents that use this SDK.API Keys
How to create, list, and revoke tokens from the portal (alternative to
keebai login).