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

@thiagobarbosa-dev/whatscli

v1.2.0

Published

WhatsApp Web CLI powered by Baileys — a wacli-compatible alternative optimized for OpenClaw

Downloads

853

Readme

WhatsCLI

WhatsApp Web CLI — a TypeScript alternative to wacli, powered by Baileys.

CI Node.js TypeScript Baileys License: MIT


What is it

WhatsCLI is a command-line tool to automate WhatsApp Web. Focused on:

  • 🔐 Secure auth — QR code login → session persisted locally
  • 📥 Offline sync — message history stored in SQLite with FTS5 search
  • 🔍 Fast search — full-text search without internet
  • 📤 Sending — text, files, reactions, quoted replies
  • 🚀 Stealth Bulk Send — automated safe messaging with random delays, typing simulation, and message rotation (spintax)
  • 👥 Management — contacts, chats, groups
  • 🇧🇷 Smart JID — automatic phone number resolution (fixes the Brazilian 9th digit ghost-chat issue)
  • 🤖 OpenClaw-ready--json output optimized for OpenClaw ingestion

[!NOTE] For AI Agents: Detailed technical context, schema, and CLI guidelines for AI interactions are available in Docs/AI_CONTEXT.md.


Prerequisites

  • Node.js >= 20.x
  • npm >= 9.x

Requirements

  • Node.js: >= 20.17.0 or >= 22.9.0 (LTS versions are highly recommended).
  • npm: Compatible with the chosen Node.js version.
  • Native Modules: If pre-built binaries for sharp are not available for your environment, ensure you have build tools installed (make, g++, python).

Installation

Via Homebrew (Recommended for macOS/Linux)

brew tap thiagobarbosa-dev/tap
brew install whatscli

Via NPM (Global)

npm install -g @thiagobarbosa-dev/whatscli

From Source

  1. Clone the repository:
    git clone https://github.com/thiagobarbosa-dev/whatscli.git
    cd whatscli
  2. Install dependencies:
    npm install
  3. Build the project:
    npm run build
  4. Link for global usage:
    npm link

Quick Start

# 1. Authenticate (shows QR code)
whatscli auth

# 2. Sync messages
whatscli sync --once

# 3. Search messages
whatscli messages search "meeting" --json

# 4. List recent chats
whatscli chats list

### `send text`
Send a plain text message to a JID or phone number.
```bash
whatscli send text "5511999998888" "Hello!"

send-bulk

Send messages in bulk with mandatory anti-ban stealth measures. Supports .json and .csv.

whatscli send-bulk recipients.json --message "Hi {{name}}!" --min-delay 30 --max-delay 90

Recipient Formats

JSON (recipients.json):

[
  { "jid": "5511999998888", "name": "Name" },
  { "jid": "5511977776666", "name": "Name" }
]

CSV (recipients.csv):

jid,name,city
5511999998888,Name,City Name
5511977776666,Name,City Name
  • Features:
    • 🔄 Spintax: {Hello|Hi|Hey} {{name}}! will rotate greetings.
    • 🧪 Variables: Any key in JSON or column in CSV can be used as {{key}}.
    • 🕒 Human-like: Simulates "typing..." presence based on message length and WPM.
    • 🛡️ Anti-Ban: Mandatory randomized delays and server-side JID resolution.

Diagnostics

whatscli doctor


---

## Commands

| Group | Command | Description |
|-------|---------|-------------|
| **Auth** | `auth` | QR login, `auth status`, `auth logout` |
| **Sync** | `sync` | Sync messages (`--once` or `--follow`) |
| **Messages** | `messages list\|search\|show\|context` | List and search messages |
| **Send** | `send text\|file\|react` | Send message, file, or reaction |
| **Media** | `media download` | Download media from a message |
| **History** | `history backfill` | Request older history |
| **Contacts** | `contacts search\|show` | Search and view contacts |
| **Chats** | `chats list\|show` | List conversations |
| **Groups** | `groups list\|search\|members\|info\|rename\|leave\|participants` | Manage groups and members |
| **Presence** | `presence typing\|recording\|paused` | Presence indicators |
| **Doctor** | `doctor` | Environment diagnostics |

### Global Flags

--store DIR data directory (default: ~/.whatscli) --json JSON output (for scripts / OpenClaw) --full disable table truncation --timeout DUR timeout for non-sync commands --read-only block all write operations


---

## JSON Output (OpenClaw spec)

When using `--json` or piping, output follows this schema:

```json
{
  "id": "MSG_ID",
  "chat": "[email protected]",
  "chat_name": "Group Name",
  "sender": "[email protected]",
  "sender_name": "Sender Name",
  "from_me": false,
  "timestamp": 1714000000,
  "type": "text",
  "content": "message content here",
  "quoted_id": null,
  "media_path": null
}

Development

# Dev mode
npx ts-node src/index.ts --help

# Build
npm run build

# Lint
npm run lint

Disclaimer

This project is not affiliated with WhatsApp. Use responsibly and in accordance with WhatsApp's Terms of Service.

License

MIT