Skip to main content
Any Framework

A WhatsApp simulator client that complements Devlooped.WhatsApp.

Published
Apr 10, 2026
6mo ago
Total Downloads
4.6K
4,555

Install

dotnet add package dotnet-whatsapp --version 2.0.0-alpha

No framework information available.

README

Provides a command-line interface for the WhatsApp library and its backend functions. This allows you to interact with your WhatsApp pipeline without having to set up your WhatsApp for Business app for local development.

The backend functions are only enabled if the hosting environment is set to Development so that in production, the CLI endpoint is not available. Example with text format:

Yaml format:

JSON format:

The console will automatically remember the last used WhatsApp endpoint, output format and simulated user phone number.

Usage: whatsapp [OPTIONS]+
Options:
  -u, --url                  WhatsApp functions endpoint
  -n, --number=VALUE         Your WhatsApp user phone number
  -j, --json                 Format output as JSON
  -t, --text                 Format output as text
  -y, --yaml                 Format output as YAML
  -?, -h, --help             Display this help.
  -v, --version              Render tool version and updates.

to render the responses since it provides a more readable format than JSON.

For non-text messages, the CLI falls short since you cannot attach files or images. For these cases, you can continue to send messages via WhatsApp, but get the responses also in the CLI. This works by inspecting messages in the current conversation (so it depends on UseConversation) and detecting if any messages were sent by the CLI. If that is the case, non-console messages will generate responses for the CLI as well:

builder.Services.AddWhatsApp<MyWhatsAppHandler>()
    .UseOpenTelemetry(builder.Environment.ApplicationName)
    .UseConversation()
    .UseConsole() // 👈 Enable CLI support for WhatsApp-originated messages

UseConsole will only be added to the pipeline if the hosting environment is set to Development, so it's not necessary to check for that in your code. This is to ensure that the CLI behaviors never impact production environments.

Sponsors

Clarius Org MFB Technologies, Inc. Khamza Davletov SandRock DRIVE.NET, Inc. Keith Pickford Thomas Bolon Kori Francis Reuben Swartz Jacob Foshee Eric Johnson Jonathan Ken Bonny Simon Cropp agileworks-eu Zheyu Shen Vezel ChilliCream 4OTC domischell Adrian Alonso torutek mccaffers Seika Logiciel Andrew Grant Lars prime167

Sponsor this project

Learn more about GitHub Sponsors

Changes from Previous Version

No structural changes between v1.0.0 and v2.0.0-alpha.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.