Overview
hermes whatsapp configures the WhatsApp bridge (Baileys) and pairs it with your WhatsApp account via QR code. It is an interactive wizard — there are no subcommands. The wizard walks you through choosing a mode, setting allowed users, installing bridge dependencies, and scanning a QR code. Once paired, you can chat with Hermes through WhatsApp like any other contact.
hermes whatsapp
Requires a TTY: the wizard prompts interactively.
What the Wizard Does
- Choose a mode — a separate bot number (recommended) or your personal number (self-chat).
- Set allowed users — the phone numbers allowed to message the agent (comma-separated, or
*for anyone). - Install bridge dependencies — runs
npm installin the bridge directory the first time (this can take a few minutes). - Check for an existing session — if
creds.jsonalready exists, keep the current pairing or re-pair. - Pair via QR code — open WhatsApp (or WhatsApp Business) on the phone with the bot’s number, go to Linked Devices, and scan the QR code shown in the terminal.
- Start the gateway — once paired, run
hermes gatewayto receive messages.
Examples
hermes whatsapp
# 1. Choose mode: 1) separate bot number (recommended) 2) personal number (self-chat)
# 2. Enter allowed phone numbers (comma-separated, or * for anyone)
# 3. Bridge dependencies are installed automatically
# 4. Scan the QR code with WhatsApp → Linked Devices → Link a Device
# 5. Start the gateway: hermes gateway
# Re-running the wizard with an existing session
hermes whatsapp
# ✓ Existing WhatsApp session found — Re-pair? [y/N]
# Answer 'n' to keep the current pairing, 'y' to clear it and scan a new QR code
Tips
- WhatsApp is only enabled after a successful pairing. If you abort the wizard early, the bridge stays disabled and the gateway will not try to start it.
- The session (
creds.json) is stored under~/.hermes/whatsapp/session/— back it up to avoid re-pairing. - For a production bot on the official Meta API, use
hermes whatsapp-cloud— the two adapters are complementary, not alternatives.