@jackle.dev/zalox
v1.0.7
Published
π ZaloX β Modern Zalo CLI & API Platform. Automate Zalo with AI & Automation.
Maintainers
Readme
ZaloX π
Modern Zalo CLI & API Platform β Automation Unleashed.
ZaloX is a powerful, developer-friendly CLI tool and API server for Zalo automation. It replaces paid tools like zca-cli with a free, open-source alternative built on top of zca-js.
β¨ Features
| Feature | ZaloX Free | zca-cli |
|---------|------------|---------|
| Auth | QR Code & Cookie Login | β
|
| Messaging | Text, Link, Reply, Undo, React | β
|
| Contacts | List Friends & Groups | π° Paid |
| Real-time | Message Listener | π° Paid |
| Multi-account | Unlimited Profiles | π° Paid |
| API Server | REST API (zalox serve) | β |
| Webhooks | HTTP Forwarding | β |
| Platform | Linux, macOS, Windows | Linux only |
π¦ Installation
NPM (Node.js)
npm install -g @jackle.dev/zaloxDownload the latest binary from Releases.
# Linux / macOS
chmod +x zalox
mv zalox /usr/local/bin/
# Windows
# Add zalox.exe to your PATHFrom Source
Requires Bun or Node.js 18+.
git clone https://github.com/lktiep/zalox.git
cd zalox
bun install
bun run buildπ Quick Start
Login
zalox auth login # Scan the QR code with your Zalo appSend Message
zalox msg send <user_id> "Hello from ZaloX!"List Friends
zalox friend listStart Listener
zalox listen
π Commands Reference
Authentication
zalox auth login- Login via QR codezalox auth status- Check current sessionzalox auth logout- Remove credentialszalox auth profiles- List all saved profileszalox auth use <profile>- Switch active profile
Messaging
zalox msg send <id> <text>- Send text messagezalox msg send-link <id> <url>- Send link with previewzalox msg undo <id> <msgId>- Recall a messagezalox msg react <id> <msgId> <icon>- React (β€οΈ, π, π, etc.)
Contacts
zalox friend list- List friendszalox friend find <phone>- Find user by phonezalox friend add <id> <msg>- Send friend requestzalox group list- List groupszalox group members <id>- List group memberszalox group create <name> <id1> <id2>- Create new group
Advanced
zalox listen- Start real-time event listenerzalox serve- Start REST API Server (Port 3456)zalox config set webhook.url <url>- Forward messages to URLzalox me info- View detailed account info
π REST API Server
Run zalox serve to expose your Zalo account as a local REST API.
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /api/me | Account info |
| GET | /api/friends | List friends |
| GET | /api/groups | List groups |
| POST | /api/messages/send | Send message |
Example usage:
curl -X POST http://localhost:3456/api/messages/send \
-H "Content-Type: application/json" \
-d '{"threadId": "123456789", "message": "Hello via API"}'π€ OpenClaw Plugin
ZaloX includes a native OpenClaw channel plugin (plugin/) that integrates Zalo as a first-class messaging channel β just like Telegram, Discord, or WhatsApp.
Features
- π₯ Inbound: Receive DMs and group messages from Zalo
- π€ Outbound: Send text, images, and files
- β€οΈ Reactions: Auto heart-react on inbound messages
- π₯ Group mentions: Only replies when @tagged in groups
- π Persistent credentials: Survives container restarts
- πΈ Image upload: Full support via sharp + zca-js uploadAttachment
Setup
- Configure in
openclaw.json:{ "plugins": [{ "source": "/path/to/zalox/plugin" }], "channels": { "zalox": { "accounts": { "default": {} }, "bindings": [{ "match": { "channel": "zalox" }, "agentId": "main" }] } } } - Login via QR:
tsx plugin/scripts/qr-login.ts - Restart OpenClaw β Zalo messages now route to your agent!
π€ Contributing
We welcome contributions! Please see CONTRIBUTING.md for details.
- Fork the repo
- Create your feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'feat: Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Open a Pull Request
βοΈ Disclaimer
This tool is not affiliated with, endorsed by, or associated with Zalo Group or VNG Corporation.
It is an unofficial open-source tool built for educational and development purposes.
Use responsibly and at your own risk.
License: MIT
