Send third-party WhatsApp messages or sync/search WhatsApp history via wacli, not normal active chats.
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-wacli-aca07b4cf5b7 ,按照其中的说明把「wacli」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use wacli only when the user explicitly asks you to message someone else on WhatsApp or when they ask to sync/search WhatsApp history.
Do NOT use wacli for normal user chats; OpenClaw routes WhatsApp conversations automatically.
If the user is chatting with you on WhatsApp, you should not reach for this tool unless they ask you to contact a third party.
Safety
Auth + sync
wacli auth (QR login + initial sync)wacli sync --follow (continuous sync)wacli doctorFind chats + messages
wacli chats list --limit 20 --query "name or number"wacli messages search "query" --limit 20 --chat <jid>wacli messages search "invoice" --after 2025-01-01 --before 2025-12-31Inspect / verify messages
wacli messages show --chat <jid> --id <message_id> --json --fullmessages show requires both --chat and --id; do not pass the message ID as a positional argument.History backfill
wacli history backfill --chat <jid> --requests 2 --count 50Send
wacli send text --to "+14155551212" --message "Hello! Are you free at 3pm?"wacli send text --to "1234567890-123456789@g.us" --message "Running 5 min late."wacli send file --to "+14155551212" --file /path/agenda.pdf --caption "Agenda"--message is literal by default; pass --message-escapes to interpret \n, \r, \t.Notes
~/.wacli (override with --store).--json for machine-readable output when parsing.<number>@s.whatsapp.net; groups look like <id>@g.us (use wacli chats list to find).