wacli (WhatsApp CLI)
Use wacli via exec.
Safety / permission
- Treat sending as an external, privacy-sensitive action.
- Only send when the user explicitly provided (a) recipient and (b) message/file content and asked to send.
- If any detail is missing/ambiguous (wrong number, unclear chat, not sure which attachment), ask one clarifying question before sending.
Quick checks
- Verify install:
wacli version- If missing, suggest:
brew install steipete/tap/wacli
Auth + sync (required before sending)
- Login (shows QR) and bootstrap initial sync:
wacli auth- Keep syncing in the background (recommended so messages/IDs resolve):
wacli sync --follow- Diagnostics:
wacli doctor
Send a WhatsApp message
Text:
wacli send text --to --message ""
Quoted reply (needs message id, usually from messages list/search/show/context):
wacli send text --to --message "" --reply-to
React:
wacli send react --to --id [--reaction ""]
Send a file
wacli send file --to --file [--caption ""] [--filename ] [--mime ]
Finding chats / message ids
- Search messages:
wacli messages search ""- List recent messages (for a known chat JID):
wacli messages list --chat --asc --limit 50- Show context around a message:
wacli messages context --chat --id - Find chats/groups:
wacli chats list --query "" --limit 50wacli groups list --query "" --limit 50
Store location (FYI)
- Default store is
~/.wacli on macOS; override with --store DIR or WACLI_STORE_DIR.