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

@syed-abdullah-shah/wa-bot-cli

v1.0.0

Published

A powerful, anti-ban protected WhatsApp bot CLI built with Baileys

Readme

💬 WhatsApp Bot CLI

A powerful, anti-ban protected WhatsApp bot

Node.js TypeScript Baileys License


✨ Features


🚀 Quick Start

📋 Prerequisites

| Requirement | Version | | ------------------------------------------------------------------------------------------------------- | -------------- | | Node.js | 18+ | | npm | Latest | | WhatsApp | Active Account |

📦 Installation

# Clone the repository
git clone <your-repo-url>
cd WA

# Install dependencies
npm install

# Copy environment file
cp .env.example .env

# Edit .env with your settings
nano .env

⚙️ Configuration

Edit .env file:

# Bot Settings
BOT_PREFIX=!
BOT_NAME=MyBot
OWNER_NUMBER=1234567890

# Authentication (choose one)
USE_PAIRING_CODE=false    # Set to true for phone number auth
PHONE_NUMBER=1234567890   # Required if USE_PAIRING_CODE=true

▶️ Running the Bot

# Development mode (with hot reload)
npm run dev

# Production mode
npm run build
npm start

🔑 Authentication

QR Code (default):

  1. Run npm run dev
  2. Scan the QR code with WhatsApp (Settings > Linked Devices > Link a Device)

Pairing Code (alternative):

  1. Set USE_PAIRING_CODE=true and PHONE_NUMBER=your_number in .env
  2. Run npm run dev
  3. Enter the 8-digit code in WhatsApp (Settings > Linked Devices > Link with phone number)

📝 Commands

| Command | Description | Access | | -------------------- | ------------------------------- | ----------- | | !ping | Check if bot is responsive | 🌐 Everyone | | !help | List all available commands | 🌐 Everyone | | !info | Show bot information | 🌐 Everyone | | !uptime | Show bot uptime | 🌐 Everyone | | !stats | Show detailed statistics | 👑 Owner | | !ban @user | Ban a user from using the bot | 👑 Owner | | !broadcast <msg> | Broadcast message to all chats | 👑 Owner | | !reload | Reload commands without restart | 👑 Owner |


📁 Project Structure

WA/
├── src/
│   ├── commands/        # Bot commands
│   ├── config/          # Configuration
│   ├── core/            # Connection & client
│   ├── handlers/        # Message handlers
│   ├── services/        # Anti-ban services
│   ├── types/           # TypeScript types
│   └── utils/           # Utilities
├── docs/                # Documentation
├── data/auth/           # Session storage
├── logs/                # Log files
└── scripts/             # CLI tools

💡 Use Cases

See docs/USE-CASES.md for detailed use cases including:

| Use Case | Description | | ---------------------- | ------------------------------ | | 🎧 Customer Support | Automated customer service bot | | 🔔 Notification System | Send alerts and notifications | | 👥 Group Management | Manage WhatsApp groups | | 🤖 Personal Assistant | AI-powered personal helper | | 🛒 E-commerce | Order tracking and support |


📚 Documentation

| Document | Description | | ------------------------------------------- | ------------------------- | | 📖Configuration Guide | All configuration options | | 📋Commands Reference | Complete command list | | 💡Use Cases | Implementation examples | | 🔧API Reference | Developer API docs | | 🔍Troubleshooting | Common issues & fixes |


🖥️ CLI Commands

npm run dev          # Start in development mode
npm run build        # Build for production
npm run start        # Start production build
npm run clean        # Clean all cache
npm run clean:auth   # Clean auth data only
npm run status       # Check bot status
npm run config       # Show current configuration

🛡️ Anti-Ban Features

This bot includes multiple anti-ban protections:

┌─────────────────────────────────────────────────────────────────┐
│                     ANTI-BAN PROTECTION LAYERS                  │
├─────────────────────────────────────────────────────────────────┤
│  ⏱️  Rate Limiting      │  Per-user, per-group, and global     │
│  ⏳  Response Delays    │  Randomized delays (2-5 seconds)      │
│  ⌨️  Typing Simulation  │  Shows typing indicator               │
│  🔍  Duplicate Detection│  Prevents sending duplicates          │
│  🟢  Presence Updates   │  Periodic online status updates       │
│  📬  Message Queue      │  Spreads messages over time           │
└─────────────────────────────────────────────────────────────────┘

🔐 Environment Variables

See docs/CONFIGURATION.md for all available options.


🤝 Contributing

Contributions are welcome! Here's how to get started:

  1. 🍴 Fork the repository
  2. 🌿 Create your feature branch (git checkout -b feature/amazing-feature)
  3. 💾 Commit your changes (git commit -m 'Add amazing feature')
  4. 📤 Push to the branch (git push origin feature/amazing-feature)
  5. 🔃 Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


⚠️ Disclaimer

Note: This bot is for educational purposes only. Use responsibly and in accordance with WhatsApp's Terms of Service. The developers are not responsible for any misuse or account bans.


Built with ❤️ using Baileys