Find a person, read a chat, search

Find a person, read the whole chat, or search every message for words.

Two or more words: type them with a space between, as you would say them. Quotes make no difference: nj wp read dana levi and nj wp read "dana levi" print the same chat. Examples are in the guides below.

Find a person and read the chat

Part of the name is enough. A full number works too: +, the country code and the number, such as +99900000411. A number finds that person's own chat only, never a group they are in; a group is found by its name (see the find reference). Words look at chat names only, not at numbers.

dana is an example: type a name of your own (see How to change an example word). Someone who only called you has no chat, so find does not list them; nj wp calls shows them.

nj wp find dana
Terminal
     47m  Dana Levi ยท unread
          them: And can we get a late checkout?
1 chat

The samples were made in the Asia/Bangkok time zone at one moment. Your dates, times and ages follow your Mac and the moment you run the command.

The number on the left: time since the last message in that chat.

nj wp read dana
Terminal
Chat with Dana Levi

Nov 12 01:25  Dana Levi: Hi, we are looking at Bangkok for the last week of December
Nov 12 01:45  You: Great choice. How many travellers, and which dates exactly?
Nov 12 02:00  Dana Levi: Two adults, 22 to 29 December
Nov 13 01:25  You: Bangkok-options.pdf
Nov 18 00:33  Dana Levi: Thanks! Is breakfast included at the riverside hotel?
Nov 18 00:38  Dana Levi: And can we get a late checkout?
6 messages

Reading a chat does not mark it as read and sends no read receipts: Namjai only reads files on this Mac and tells WhatsApp nothing.

A full name works the same way, with or without quotes, and prints the same chat:

nj wp read dana levi

It shows the last 50 messages; add --limit 200 for more. The words must be in the order of the name: levi dana finds nothing. If no chat matches, it says so, shows how to list every chat, and exits with 1. The same happens for a number no chat has:

Terminal
nj wp read: no chat matches "nobody". To list every chat: nj wp find

If several chats match, it lists them, one per line; type more of the name, or the whole number.

Inside a group, a message's sender shows as their number, not their name.

Search everything

Every message that contains your words, in all chats.

nj wp search hotel
Terminal
Nov 18 00:33  Dana Levi: Thanks! Is breakfast included at the riverside hotel?
Nov 16 21:25  James Carter: Hi again, we want to book the same hotel for Easter
2 messages

Two words find messages that have them together, in that order. With or without quotes, the result is the same; checkout late finds nothing here.

nj wp search late checkout
Terminal
Nov 18 00:38  Dana Levi: And can we get a late checkout?
1 message

A message you sent shows the chat's name in square brackets, then You:, so you can tell which chat it is in:

nj wp search quote
Terminal
Nov 15 22:25  [Michael Brooks] You: Sent you the quote for 4 people, 7 nights. Valid until Friday
Oct 29 01:25  [Daniel Reed] You: Following up on the Rome quote. Shall I hold the rooms?
2 messages

Only in one chat:

nj wp search checkout --chat dana
Terminal
Nov 18 00:38  Dana Levi: And can we get a late checkout?
1 message