wacli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

wacli

wacli

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
  • Require explicit recipient + message text.
  • Confirm recipient + message before sending.
  • If anything is ambiguous, ask a clarifying question.
Auth + sync
  • wacli auth
    (QR login + initial sync)
  • wacli sync --follow
    (continuous sync)
  • 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:
    ~/.wacli
    (override with
    --store
    ).
  • Use
    --json
    for machine-readable output when parsing.
  • 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
    <number>@s.whatsapp.net
    ; groups look like
    <id>@g.us
    (use
    wacli chats list
    to find).
仅当用户明确要求你通过WhatsApp给他人发送消息,或者要求同步/搜索WhatsApp历史记录时,才使用
wacli
。 不要将
wacli
用于普通用户聊天;OpenClaw会自动路由WhatsApp对话。 如果用户正在通过WhatsApp与你聊天,除非他们要求联系第三方,否则请勿使用此工具。
安全注意事项
  • 需要明确的收件人和消息文本。
  • 发送前确认收件人和消息内容。
  • 如有任何不明确的地方,提出澄清问题。
认证与同步
  • 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格式为
    <号码>@s.whatsapp.net
    ;群组JID格式为
    <ID>@g.us
    (可使用
    wacli chats list
    命令查找)。