WhatsApp, on the command line.
Every command returns JSON. Sync once to a local SQLite store, then search, send, and script against it.
$ whatsapp-cli sync
🚀 Starting WhatsApp sync...
✓ Connected to WhatsApp
💬 Synced 1234 messages...
Watch it live
See it work
Two terminals. One keeps the local store in sync. The other queries it.
Illustrative session over the local messages table. chat_backup_agent.py is a 40-line example script, not a whatsapp-cli subcommand — the store is plain SQLite, so it's yours to query.
What's in the box
| Command | What it does | Flags |
|---|---|---|
auth | Pair with your phone via QR code. | — |
sync | Mirror new messages into the local store. Runs until Ctrl+C. | — |
messages list | List stored messages, newest first. | --chat --limit --page |
messages search | Full-text search across stored messages. | --query --limit --page |
contacts search | Search contacts by name or number. | --query |
chats list | List synced chats by recent activity. | --query --limit --page |
send | Send a text message. | --to --message |
media download | Download a message's media attachment. | --message-id --chat --output |
Noticed elsewhere