mcpField
W
wacli

wacli

github.com/openclawProductivity393.3k3.2k installsUpdated today
Repository

About wacli

wacli is a WhatsApp command-line skill for sending messages and syncing or searching chat history. It emphasizes explicit recipient and message confirmation before sending.

Key features

  1. 01Send text and file messages
  2. 02List chats and search messages
  3. 03Sync and backfill chat history
  4. 04Inspect messages in JSON format

Use cases

  1. 01Contact someone on WhatsApp at an explicit request
  2. 02Search or review past WhatsApp conversations

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/openclaw/openclaw --skill wacli

After installing, type/wacliin Claude Code to confirm it loaded.

Details

From the project README

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

Inspect / verify messages

  • wacli messages show --chat <jid> --id <message_id> --json --full
  • messages show requires both --chat and --id; do not pass the message ID as a positional argument.
  • After sending, verify the stored message when exact formatting matters, especially multiline text.

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 "[email protected]" --message "Running 5 min late."
  • File: wacli send file --to "+14155551212" --file /path/agenda.pdf --caption "Agenda"
  • Multiline: --message is literal by default; pass --message-escapes to interpret \n, \r, \t.

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).

Comments

Markdown supported