wacli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesewacli
wacli
Use 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 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.
wacliwacliSafety
- Require explicit recipient + message text.
- Confirm recipient + message before sending.
- If anything is ambiguous, ask a clarifying question.
Auth + sync
- (QR login + initial sync)
wacli auth - (continuous sync)
wacli sync --follow wacli doctor
Find 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-31
History backfill
wacli history backfill --chat <jid> --requests 2 --count 50
Send
- Text:
wacli send text --to "+14155551212" --message "Hello! Are you free at 3pm?" - Group:
wacli send text --to "1234567890-123456789@g.us" --message "Running 5 min late." - File:
wacli send file --to "+14155551212" --file /path/agenda.pdf --caption "Agenda"
Notes
- Store dir: (override with
~/.wacli).--store - Use for machine-readable output when parsing.
--json - Backfill requires your phone online; results are best-effort.
- WhatsApp CLI is not needed for routine user chats; it’s for messaging other people.
- JIDs: direct chats look like ; groups look like
<number>@s.whatsapp.net(use<id>@g.usto find).wacli chats list
仅当用户明确要求你通过WhatsApp给他人发送消息,或者要求同步/搜索WhatsApp历史记录时,才使用。
不要将用于普通用户聊天;OpenClaw会自动路由WhatsApp对话。
如果用户正在通过WhatsApp与你聊天,除非他们要求联系第三方,否则请勿使用此工具。
wacliwacli安全注意事项
- 需要明确的收件人和消息文本。
- 发送前确认收件人和消息内容。
- 如有任何不明确的地方,提出澄清问题。
认证与同步
- (二维码登录 + 初始同步)
wacli auth - (持续同步)
wacli sync --follow wacli doctor
查找聊天与消息
wacli chats list --limit 20 --query "姓名或号码"wacli messages search "查询内容" --limit 20 --chat <jid>wacli messages search "invoice" --after 2025-01-01 --before 2025-12-31
历史记录回填
wacli history backfill --chat <jid> --requests 2 --count 50
发送消息
- 文本消息:
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"
注意事项
- 存储目录:(可通过
~/.wacli参数覆盖)。--store - 解析时使用参数获取机器可读格式的输出。
--json - 历史记录回填需要你的手机处于在线状态;结果为尽力返回。
- 日常用户聊天无需使用WhatsApp CLI;它仅用于给他人发送消息。
- JID说明:单聊JID格式为;群组JID格式为
<号码>@s.whatsapp.net(可使用<ID>@g.us命令查找)。wacli chats list