wacli
WhatsApp CLI for local sync, search, and messaging
TLDR
SYNOPSIS
wacli \<command\> [options]
DESCRIPTION
wacli is a command-line interface for WhatsApp built on the whatsmeow library. It provides best-effort local synchronization of message history, fast offline full-text search, message sending, and contact and group management, all from the terminal.Authentication is performed by scanning a QR code displayed in the terminal from your primary WhatsApp device. Once authenticated, wacli stores session data, messages, contacts, and media references in a local SQLite database at ~/.wacli by default. The sync command captures incoming messages continuously, while history backfill requests older messages from the primary device on demand.Search uses SQLite FTS5 for fast full-text queries with LIKE fallback, returning results with contextual snippets. All output defaults to human-readable format with --json available for scripting and automation.
PARAMETERS
auth
Interactive login via QR code and initial data syncsync
Non-interactive sync loop; requires prior authenticationsync --follow
Keep syncing continuouslymessages search query
Search synced messages using FTS5 full-text searchmessages list [--chat jid] [--limit n]
List messages, optionally filtered by chathistory backfill --chat jid [--count n] [--requests n]
Fetch older messages from primary devicemedia download --chat jid --id msgid_
Download media for a specific messagesend text --to recipient --message text
Send a text message to a contact or groupsend file --to recipient --file path [--caption text] [--filename name]
Send a file with optional caption and display name overridechats list
List all chatsgroups list
List all groupsgroups rename --jid groupjid **--name** newname
Rename a groupdoctor
Run diagnostics on the local store--store DIR
Override default store directory (default: ~/.wacli)--json
Machine-readable JSON output
CAVEATS
wacli is a third-party tool that uses the WhatsApp Web protocol via whatsmeow and is not affiliated with WhatsApp. WhatsApp actively bans accounts using third-party clients, and bans are often permanent with no appeal process. History backfill is best-effort and requires the primary device to be online. Media downloads depend on WhatsApp's content retention policies.
HISTORY
wacli was created by Peter Steinberger (steipete) and written in Go. The project was first released in 2025 with a focus on providing a native terminal experience for WhatsApp, enabling local message synchronization and offline search capabilities that the official WhatsApp clients do not offer.
SEE ALSO
signal-cli(1), neomutt(1)
