Read when: listing known chats, filtering chat state, archiving/pinning/muting/marking chats, or pruning stale local chat rows.
wacli chats reads chat rows from wacli.db. It can use session-backed PN/LID mappings to make historical @lid chat rows display as phone-number chats when possible. State commands send WhatsApp app-state patches through the authenticated session and update the local index after WhatsApp accepts the change.
wacli chats list [--query TEXT] [--limit N] [--archived|--no-archived] [--pinned|--no-pinned] [--muted|--no-muted] [--unread|--no-unread]
wacli chats show --jid JID
wacli chats archive --chat CHAT [--pick N]
wacli chats unarchive --chat CHAT [--pick N]
wacli chats pin --chat CHAT [--pick N]
wacli chats unpin --chat CHAT [--pick N]
wacli chats mute --chat CHAT [--duration DURATION] [--pick N]
wacli chats unmute --chat CHAT [--pick N]
wacli chats mark-read --chat CHAT [--pick N]
wacli chats mark-unread --chat CHAT [--pick N]
wacli chats cleanup [--days N] [--jid JID] [--dry-run] [--confirm]listis local and sorted by pinned chats first, then newest known message timestamp.--queryfilters by chat name or JID.list --jsonandshow --jsonincludearchived,pinned,muted_until, andunread.showaccepts the stored JID. If a phone JID maps to a historical@lidrow, it can show that row too.- State commands use
--chatand resolve names, phone numbers, groups, and JIDs like send commands. Use--pick Nfor ambiguous matches. - State commands print a compact success line by default and a stable JSON object with
--json. mute --duration 0or omitting--durationmutes forever. Useunmuteto clear it.- Run
wacli syncto catch up chat-state changes made on other devices; runwacli contacts refreshto improve chat names. cleanuponly deletes localwacli.dbrows. It does not delete chats or messages from WhatsApp.cleanup --days Nskips chats with no known local activity timestamp; use--jidfor an explicit local row.- Use
cleanup --dry-runbefore deleting and--confirmonly for scripts that already reviewed the target list.
wacli chats list
wacli chats list --query family --limit 20
wacli chats list --pinned
wacli chats show --jid [email protected]
wacli chats mute --chat "+1 555 123 4567" --duration 8h
wacli chats mark-read --chat family --pick 1
wacli chats cleanup --days 365 --dry-run