npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

whatsapp-cli-js

v0.1.1

Published

Node.js WhatsApp CLI built with Baileys for auth bootstrap, cached chat listing, and cached message listing.

Readme

whatsapp-cli-js

Minimal Node.js WhatsApp CLI built with Baileys.

It links a WhatsApp account, captures the initial history bootstrap, stores that snapshot in .wa-auth/chats-cache.json, and lets you inspect cached chats and messages from the terminal without reconnecting every time.

Features

  • QR or pairing-code auth flow
  • One-shot bootstrap capture with on-disk cache
  • Cached chats listing
  • Cached messages listing
  • Filters for message search and chat targeting

Install

Global install:

npm install -g whatsapp-cli-js

Run without installing:

npx -y whatsapp-cli-js --help

For local development:

npm test
node index.js --help

Commands

auth

Authenticates the device, waits for the history bootstrap, writes .wa-auth/chats-cache.json, and exits.

whatsapp-cli-js auth [--pair <phone>] [--auth-dir <dir>] [--wait-ms <ms>] [--debug-file <file>]

Examples:

whatsapp-cli-js auth
whatsapp-cli-js auth --pair 8801234567890
whatsapp-cli-js auth --wait-ms 180000
npx -y whatsapp-cli-js auth

chats

Reads the saved cache and lists chats.

whatsapp-cli-js chats [--auth-dir <dir>] [--limit <n>]

Examples:

whatsapp-cli-js chats
whatsapp-cli-js chats --limit 20
npx -y whatsapp-cli-js chats --limit 20

messages

Reads the saved cache and lists messages newest-first.

whatsapp-cli-js messages [--auth-dir <dir>] [--chat <term>] [--search <term>] [--limit <n>]

Examples:

whatsapp-cli-js messages
whatsapp-cli-js messages --limit 50
whatsapp-cli-js messages --chat alice
whatsapp-cli-js messages --search invoice
whatsapp-cli-js messages --chat alice --search hello --limit 20
npx -y whatsapp-cli-js messages --limit 20

Cache and Auth Storage

  • Auth files are stored in .wa-auth/ by default.
  • The cached bootstrap snapshot is stored in .wa-auth/chats-cache.json.
  • Run auth again whenever you want to refresh the cache.

Notes

  • --pair expects digits only, without +, spaces, or punctuation.
  • QR auth also writes a PNG copy of the QR code to .wa-auth/auth-debug.qr.png unless you provide --debug-file, in which case the PNG is written next to that file.
  • chats and messages depend on a previously saved cache, so run auth first.

Development

npm test
npm pack --dry-run