Commands: calls, labels and counts

Your calls, your WhatsApp Business labels, and how many messages of each kind you have.

calls

Your WhatsApp calls, or only the missed ones.

nj wp calls [--missed] [--limit n]

Lists the calls in WhatsApp's call history on this Mac, newest first, at most --limit (50). It reads the file CallHistory.sqlite next to WhatsApp's chats. No words. Each text line: the day and time, the kind of call (incoming or outgoing, missed before it when WhatsApp marked it missed, video after it for a video call), how long it was connected when it was (5m 12s), and who was on it, by name when WhatsApp has one, else by number, or unknown. The last line counts the calls.

OptionDefaultAccepted valuesWhat it does
--missedoffno valueOnly calls WhatsApp marked missed.
--limit n50a whole number, 1 or moreMost calls printed.
--text, --table, --csv, --json, --format namewhat nj set format saved, else texttext, table, csv, jsonThe same result in another format. See Formats and spreadsheets.

Mistakes. A mistake prints one line that says what was wrong, then See: nj help, to the error output, and exits with 2. A value it cannot use: nj wp calls: --limit must be a whole number above 0, got "many"; nj wp calls: --limit needs a value. An option it does not take: nj wp calls: --within is not an option of this command; it takes --csv, --format, --json, --limit, --missed, --table, --text. Two different formats: nj wp calls: choose one format, not both --csv and --json. A stray word: nj wp calls: does not take words, got "stray".

nj wp calls --limit 2
Terminal
Nov 18 00:50  missed incoming call · Tom Harris
Nov 17 23:20  missed incoming call · Sarah Cohen
2 calls
nj wp calls --missed --csv
Terminal
at,direction,missed,video,seconds,who,who_ids
2026-11-18T00:50:00+07:00,incoming,true,false,0,Tom Harris,+99900000420
2026-11-17T23:20:00+07:00,incoming,true,false,0,Sarah Cohen,+99900000413
ColumnMeaningValues
atWhen the call started, in your time zonea date and time
directionWho calledincoming or outgoing
missedWhatsApp's own missed marktrue or false
videoA video calltrue or false
secondsHow long the call was connecteda whole number; 0 when it was not
whoThe names of the others on the call, separated by a comma and a spacetext; empty when there is no name
who_idsTheir numbers, separated by commassuch as +99900000420

A caller who never wrote to you has no chat, so nj wp find and nj wp read do not find them; their number is in the who_ids column, as Tom Harris's is above. The same column appears with --table.

labels

Your labels and how many chats carry each. Labels exist only in WhatsApp Business. Namjai was tested with the ordinary WhatsApp app for Mac, where the label lists are empty; it has not been tested with the WhatsApp Business app for Mac. The samples on this site come from a made-up travel business with two labels added, to show what the lists look like.

nj wp labels

Lists every label in the file Labels.sqlite next to WhatsApp's chats, by name A to Z, with how many chats carry it. No words, and no --limit: it prints every label. With no labels it prints This WhatsApp has no labels. Labels are a WhatsApp Business feature. When the label file is missing, it prints nj wp labels: whatsapp store: stat, the file's place and no such file or directory, and exits with 1.

OptionDefaultAccepted valuesWhat it does
--text, --table, --csv, --json, --format namewhat nj set format saved, else texttext, table, csv, jsonThe same result in another format. See Formats and spreadsheets.

Columns: label, the label's name, and chats, how many chats carry it.

Mistakes. A mistake prints one line that says what was wrong, then See: nj help, to the error output, and exits with 2. A value it cannot use: nj wp labels: --format must be text, table, csv or json, got "xml". An option it does not take: nj wp labels: --limit is not an option of this command; it takes --csv, --format, --json, --table, --text. Two different formats: nj wp labels: choose one format, not both --csv and --json. A stray word: nj wp labels: does not take words, got "stray".

nj wp labels --json
Terminal
[
  {
    "chats": "2",
    "label": "Quote sent"
  },
  {
    "chats": "2",
    "label": "VIP"
  }
]

labelled

The chats under one label.

nj wp labelled label [--limit n]

The words are the label's whole name; capitals do not matter, and a name with a space is typed as it is (nj wp labelled Quote sent). Lists the chats that carry it as chat lines, newest first, then any labelled chat this Mac holds no messages for, with its number only. An unknown label lists nothing: 0 chats, exit code 0. Words are required. The lines and columns are those of the lists.

OptionDefaultAccepted valuesWhat it does
--limit n50a whole number, 1 or moreMost chats printed.
--text, --table, --csv, --json, --format namewhat nj set format saved, else texttext, table, csv, jsonThe same result in another format. See Formats and spreadsheets.

Mistakes. A mistake prints one line that says what was wrong, then See: nj help, to the error output, and exits with 2. A value it cannot use: nj wp labelled: --limit must be a whole number above 0, got "many"; nj wp labelled: --limit needs a value. An option it does not take: nj wp labelled: --within is not an option of this command; it takes --csv, --format, --json, --limit, --table, --text. Two different formats: nj wp labelled: choose one format, not both --csv and --json. Every word after labelled is part of the label's name, so there is no stray word. No words: nj wp labelled: needs the name of a label.

nj wp labelled vip
Terminal
     47m  Dana Levi · unread
          them: And can we get a late checkout?
  3h 10m  Sarah Cohen · unread
          them: Can you send the flight times for the 14th?
2 chats

count

Your messages counted by kind: how many texts, pictures, voice notes and so on.

nj wp count [--chat name]

Counts every message on this Mac, or in one chat with --chat, by kind, A to Z by kind name. Notices are counted too, as system. Kinds with no message are not printed. No words, and no --limit. Each text line: the number, then the kind. With --chat, the chat is found as for read; the line it prints when that matches no chat is under Mistakes, below.

OptionDefaultAccepted valuesWhat it does
--chat nameevery chatfound as for readCount one chat only.
--text, --table, --csv, --json, --format namewhat nj set format saved, else texttext, table, csv, jsonThe same result in another format. See Formats and spreadsheets.

Mistakes. A mistake prints one line that says what was wrong, then See: nj help, to the error output, and exits with 2. A value it cannot use: nj wp count: --chat needs a value. An option it does not take: nj wp count: --limit is not an option of this command; it takes --chat, --csv, --format, --json, --table, --text. Two different formats: nj wp count: choose one format, not both --csv and --json. A stray word: nj wp count: does not take words, got "stray". A --chat that matches no chat prints nj wp count: no chat matches "nobody". To list every chat: nj wp find and exits with 1.

nj wp count
Terminal
       1  audio
       1  document
       1  picture
      21  text
nj wp count --chat +99900000411 --json
Terminal
[
  {
    "kind": "document",
    "messages": "1"
  },
  {
    "kind": "text",
    "messages": "5"
  }
]