mix amarula.pair (amarula v0.4.5)
View SourceLink (pair) a WhatsApp account to a named profile — by QR code or phone code.
Unlike the examples/ scripts (which are not shipped in the Hex package), this
task lives under lib/ and so is available to any project that depends on
Amarula. That's the intended way for a downstream integration (e.g. a
jido_chat WhatsApp adapter) to get a user paired before running an agent.
# QR: prints a scannable QR in your terminal
mix amarula.pair <profile>
mix amarula.pair guest
# Phone code: prints an 8-char code to type into WhatsApp instead of scanning
mix amarula.pair <profile> --phone <e164-digits>
mix amarula.pair guest --phone 5511999999999On the phone: WhatsApp → Settings → Linked Devices → Link a device (QR), or "Link with phone number instead" (phone code).
Credentials persist under the storage root (AMARULA_DATA_DIR, default
./amarula_data), scoped to <profile>/, so your app reconnects later without
re-pairing. If the profile is already paired, this just connects, confirms, and
exits.
Options
--phone <digits>— pair by phone code for this E.164 number (digits only;+, spaces and dashes are stripped) instead of showing a QR.--timeout <seconds>— give-up bound for the whole flow (default180).