vielhuber / wahelper
Lightweight whatsapp integration layer.
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:JavaScript
pkg:composer/vielhuber/wahelper
Requires
- php: >=8.1
- monolog/monolog: ^3.9
- php-mcp/server: ^3.3
README
wahelper is a lightweight whatsapp integration layer built on top of baileys that provides a simple cli, php wrapper, and mcp server for fetching messages, sending direct and group messages, and wiring whatsapp into existing tooling (wordpress, node, mcp clients) without having to deal with the full session lifecycle yourself.
requirements
- node >= 22
- php >= 8.1
installation
js
npm install @vielhuber/wahelper
php
composer require vielhuber/wahelper
.gitignore
/whatsapp_data/
usage
cli
npx wahelper \
--disable-warning=ExperimentalWarning \
--device "xxxxxxxxxxxx" \
...
# fetch messages
--action "fetch_messages" \
--limit 42
# send message to user
--action "send_user" \
--number "xxxxxxxxxxxx" \
--message "This is a test! 🚀"
--attachments "/full/path/to/file.pdf,/full/path/to/image.png"
# send message to group
--action "send_group" \
--name "Group name" \
--message "This is a test! 🚀"
--attachments "/full/path/to/file.pdf,/full/path/to/image.png"
php
require_once __DIR__ . '/vendor/autoload.php'; use vielhuber\wahelper\wahelper; $wahelper = new wahelper(); // fetch messages $wahelper->fetchMessages( device: 'xxxxxxxxxxxx', limit: 42 ); // send message to user $wahelper->sendUser( device: 'xxxxxxxxxxxx', number: 'xxxxxxxxxxxx', message => 'This is a test! 🚀', attachments: ['/full/path/to/file.pdf', '/full/path/to/image.png'] ]); // send message to group $wahelper->sendGroup( device: 'xxxxxxxxxxxx', name: 'Group name', message: 'This is a test! 🚀', attachments: ['/full/path/to/file.pdf', '/full/path/to/image.png'] ]);
mcp
{
"mcpServers": {
"whatsapp": {
"command": "/usr/bin/php8.1",
"args": ["/var/www/project/vendor/vielhuber/wahelper/mcp.php"]
}
}
}