wacli
A script-friendly WhatsApp CLI built on whatsmeow. One binary pairs as a linked WhatsApp Web device, syncs messages into a local SQLite store, and exposes search, send, media, contact, and group commands with predictable output for terminals, shell pipelines, and coding agents.
#Why wacli
- Local mirror, fast search. All synced messages land in a SQLite store with an FTS5 index; offline
messages searchreturns hits in milliseconds. - Stable output. Human-readable tables by default,
--jsonto stdout for scripts, NDJSON--eventsfor long-running commands. Human progress, prompts, and errors stay on stderr so pipes stay clean. - Single binary. No daemon, no plugin host. Run
wacli auth, thenwacli sync --followto keep the store warm. - Built for agents.
--read-only(orWACLI_READONLY=1) blocks every command that mutates WhatsApp or local state. Store locks prevent two instances from racing on the same device identity. - Boundable storage.
syncwarns when storage is uncapped;--max-messages/--max-db-sizecap local growth. Send retries are bounded; media uploads/downloads cap at 100 MiB. - Best-effort history.
history backfillrequests older messages per chat from your primary device; documented as best-effort because WhatsApp Web is.
#Pick your path
- Trying it. Read Install, then Quickstart. Pair, sync, and send your first message in under five minutes.
- Searching old chats. Read Sync for the sync model and History for on-demand backfill.
- Sending from scripts. Read Send for recipient resolution, replies, mentions, files, and reactions.
- Wiring up an agent. Pair
--read-only,--json, and--eventsfrom Overview; read Doctor for self-checks. - Looking up a flag. Open the per-command pages from Overview.
#Status
Core implementation is in place. The CHANGELOG tracks shipped behavior. WhatsApp Web is not a published API; expect occasional breakage from upstream protocol changes — wacli follows whatsmeow upstream.
#Out of scope
- Guaranteed full-history export (WhatsApp Web history is best-effort).
- A daemon, MCP server, web UI, or GUI.
- End-to-end "contact creation" inside WhatsApp; local aliases and tags only.
#Disclaimer
wacli is a third-party tool that uses the WhatsApp Web protocol via whatsmeow. It is not affiliated with WhatsApp or Meta. Use at your own risk; pairing as a linked device is subject to WhatsApp's terms.
Released under the MIT license.