Automate WhatsApp Messaging with the Wacli Skill: Send Messages, Search History, and More
WhatsApp is the world's most popular messaging app, but automating it has always been a challenge. The wacli skill changes that by giving your Clawdbot agent the ability to send messages, search chat history, and sync conversations—all from the command line.
With over 21,000 downloads and 52 stars on ClawdHub, wacli has become one of the most popular skills for good reason: it turns your AI assistant into a WhatsApp power user.
Why Wacli?
Imagine asking your agent: "Send John a message saying I'll be 10 minutes late" or "Find all messages from Sarah about the project deadline." That's exactly what wacli enables.
Important distinction: Wacli is specifically for messaging other people on WhatsApp or searching your chat history. If you're already chatting with Clawdbot through WhatsApp, normal routing handles that automatically—wacli is for when you want your agent to reach out to a third party on your behalf.
Installation
Install the skill via ClawdHub:
npx clawdhub@latest install wacliYou'll also need the wacli binary. Choose your preferred method:
Via Homebrew (macOS):
brew install steipete/tap/wacliVia Go:
go install github.com/steipete/wacli/cmd/wacli@latestInitial Setup
Before using wacli, you need to authenticate with WhatsApp:
wacli authThis displays a QR code. Scan it with your phone's WhatsApp app (Settings → Linked Devices → Link a Device). Once linked, wacli performs an initial sync of your chats.
To keep your local database up-to-date, run continuous sync:
wacli sync --followIf you encounter issues, the doctor command helps diagnose problems:
wacli doctorUsage Examples
Sending Messages
Send a text message to a phone number:
wacli send text --to "+14155551212" --message "Hey! Are you free for coffee at 3pm?"Send to a group chat (you'll need the group JID):
wacli send text --to "1234567890-123456789@g.us" --message "Running 5 minutes late, be there soon!"Send a file with a caption:
wacli send file --to "+14155551212" --file /path/to/document.pdf --caption "Here's the agenda for tomorrow"Finding Chats
List your recent chats:
wacli chats list --limit 20Search for a specific contact or group:
wacli chats list --query "Project Team"Searching Message History
Search across all your chats:
wacli messages search "invoice" --limit 20Search within a specific chat:
wacli messages search "meeting notes" --chat 14155551212@s.whatsapp.netFilter by date range:
wacli messages search "deadline" --after 2025-01-01 --before 2025-12-31History Backfill
Need older messages? Backfill pulls history from WhatsApp:
wacli history backfill --chat <jid> --requests 2 --count 50Note: Your phone must be online for backfill to work.
Pro Tips
1. Use JSON output for scripting
Add --json to any command for machine-readable output:
wacli chats list --json | jq '.[] | .name'2. Understand JID formats
- Direct chats:
14155551212@s.whatsapp.net - Group chats:
1234567890-123456789@g.us
Use wacli chats list to find the correct JID for any contact or group.
3. Safety first
Wacli is designed with guardrails. Your agent will:
- Always confirm the recipient and message before sending
- Ask clarifying questions if anything is ambiguous
- Never send messages without explicit approval
4. Store location
By default, wacli stores data in ~/.wacli. Override with --store if needed.
Common Use Cases
- Morning briefings: "Send my team a summary of today's priorities"
- Quick replies: "Tell Sarah I received the document"
- Research: "Find all messages about the Q4 budget"
- File sharing: "Send the presentation to the marketing group"
Conclusion
The wacli skill transforms Clawdbot into a WhatsApp automation powerhouse. Whether you're sending quick messages, searching through years of chat history, or sharing files, it handles the heavy lifting while keeping you in control.
Links:
Have questions about wacli or want to share your automation ideas? Drop a comment below!
Comments (0)
No comments yet. Be the first to comment!