Search by

dakeashish1997 / laravel-whatsapp-agent

WhatsApp package for Laravel using wacli interface

Maintainers

Package info

github.com/dakeashish1997/laravel-whatsapp-agent

pkg:composer/dakeashish1997/laravel-whatsapp-agent

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-08-30 13:00 UTC

This package is auto-updated.

Last update: 2026-09-02 01:58:49 UTC


README

A Laravel package to send WhatsApp messages through the wacli binary.

Features

  • Queue-first WhatsApp message processing
  • Send text messages from queued jobs
  • Send files with optional captions from queued jobs
  • wacli status/version command

Requirements

  • PHP ^8.2
  • Laravel application
  • wacli installed and available in your system path

Installation

Install the package in your Laravel app:

composer require dakeashish1997/laravel-whatsapp-agent

Publish configuration:

php artisan vendor:publish --tag=whatsapp-agent-config

Configuration

The package publishes config/whatsapp-agent.php:

return [
    'binary' => env('WA_WACLI_BINARY', 'wacli'),
    'database' => env('WA_WACLI_DATABASE'),
    'store' => env('WA_WACLI_STORE'),
    'timeout' => env('WA_WACLI_TIMEOUT', 60),
];

Example .env values:

WA_WACLI_BINARY=wacli
WA_WACLI_STORE=/absolute/path/to/wacli/store
WA_WACLI_TIMEOUT=60

Usage (Queue Job Only)

Check wacli version

php artisan wacli:version

Queue Job Example

You can dispatch the included job:

use Dakeashish1997\LaravelWhatsappAgent\Jobs\ProcessWhatsappMessage;

// Ask the user/system for the correct JIDs before dispatching the job.
$chatJid = '<correct-chat-jid>'; // e.g. 120363406851126713@g.us
$senderJid = '<correct-sender-jid>'; // e.g. 919175015359@s.whatsapp.net

ProcessWhatsappMessage::dispatch(
    chatJid: $chatJid,
    senderJid: $senderJid,
    senderName: 'Ashish',
    replyMessage: 'Hello from queue',
    attachment: null,
    attachmentCaption: null,
    replyToMsgId: null,
    mentionSender: false,
);

Notes

  • WhatsApp IDs may be phone numbers or full JIDs depending on your flow.
  • Ensure your wacli session is already authenticated and connected.
  • Configure and run a queue worker in your Laravel app.