wacli: WhatsApp 命令行自动化与同步 - Openclaw Skills
作者:互联网
2026-04-12
什么是 wacli?
wacli 是一款强大的实用程序,旨在让 AI 代理和开发人员能够直接从终端与 WhatsApp 平台进行交互。与标准聊天界面不同,该工具专注于程序化交互,例如发送自动化通知、文件共享和深度历史查询。通过 Openclaw Skills 集成此功能,代理可以联系外部联系人或检索历史数据,而无需在图形应用中进行人工干预。
该工具优先考虑安全性和明确意图,确保仅在特别请求时才发送消息。它支持 WhatsApp 数据的本地化同步,是需要对大型消息存档执行复杂查询或通过脚本管理群组通信的开发人员的高效选择。
下载入口:https://github.com/openclaw/skills/tree/main/skills/rafay0313/tt
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install tt
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 tt。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
wacli 应用场景
- 向外部接收者发送自动文本通知或文档。
- 在广泛的 WhatsApp 历史记录中搜索发票或日期等特定关键词。
- 回填并存档聊天历史记录,用于数据分析或审计。
- 通过脚本化的命令行操作管理群组聊天通信。
- 通过 Openclaw Skills 将 WhatsApp 推广集成到复杂的多步工作流中。
- 通过运行 auth 命令并使用移动设备扫描二维码进行身份验证。
- 该工具在 ~/.wacli 目录中初始化本地数据库,以存储聊天元数据和消息历史记录。
- 触发持续或单次同步,以确保本地数据与 WhatsApp 服务器匹配。
- 用户或代理使用通过聊天列表命令检索到的 JID(Jabber ID)识别特定接收者。
- 发布发送文本或文件的命令,然后通过经过身份验证的会话进行调度。
wacli 配置指南
使用 Homebrew 安装 wacli:
brew tap steipete/tap
brew install wacli
或者,通过 Go 安装:
git install github.com/steipete/wacli/cmd/wacli@latest
初始化您的会话:
wacli auth
wacli 数据架构与分类体系
该技能在本地组织数据,以便在 Openclaw Skills 环境中进行快速搜索和检索。
| 组件 | 描述 |
|---|---|
| 存储路径 | 默认为 ~/.wacli(可以使用 --store 覆盖) |
| 个人 JID | 格式为 <号码>@s.whatsapp.net |
| 群组 JID | 格式为 |
| 输出类型 | 支持 --json 标志,以便 AI 代理进行机器可读的解析 |
name: wacli
description: Send WhatsApp messages to other people or search/sync WhatsApp history via the wacli CLI (not for normal user chats).
homepage: https://wacli.sh
metadata: {"clawdbot":{"emoji":"??","requires":{"bins":["wacli"]},"install":[{"id":"brew","kind":"brew","formula":"steipete/tap/wacli","bins":["wacli"],"label":"Install wacli (brew)"},{"id":"go","kind":"go","module":"github.com/steipete/wacli/cmd/wacli@latest","bins":["wacli"],"label":"Install wacli (go)"}]}}
wacli
Use wacli only when the user explicitly asks you to message someone else on WhatsApp or when they ask to sync/search WhatsApp history. Do NOT use wacli for normal user chats; Clawdbot routes WhatsApp conversations automatically. If the user is chatting with you on WhatsApp, you should not reach for this tool unless they ask you to contact a third party.
Safety
- Require explicit recipient + message text.
- Confirm recipient + message before sending.
- If anything is ambiguous, ask a clarifying question.
Auth + sync
wacli auth(QR login + initial sync)wacli sync --follow(continuous sync)wacli doctor
Find chats + messages
wacli chats list --limit 20 --query "name or number"wacli messages search "query" --limit 20 --chatwacli messages search "invoice" --after 2025-01-01 --before 2025-12-31
History backfill
wacli history backfill --chat--requests 2 --count 50
Send
- Text:
wacli send text --to "+14155551212" --message "Hello! Are you free at 3pm?" - Group:
wacli send text --to "1234567890-123456789@g.us" --message "Running 5 min late." - File:
wacli send file --to "+14155551212" --file /path/agenda.pdf --caption "Agenda"
Notes
- Store dir:
~/.wacli(override with--store). - Use
--jsonfor machine-readable output when parsing. - Backfill requires your phone online; results are best-effort.
- WhatsApp CLI is not needed for routine user chats; it’s for messaging other people.
- JIDs: direct chats look like
; groups look like@s.whatsapp.net (use@g.us wacli chats listto find).
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
阿里云大模型服务平台百炼新人免费额度如何申请?申请与使用免费额度教程及常见问题解答
办公 AI 工具 OpenClaw 部署 Windows 系统一站式教程
Qwen3.6 正式发布!阿里云百炼同步开启“AI大模型节省计划”超值优惠
【新手零难度操作 】OpenClaw 2.6.4 安装误区规避与快速使用指南(包含最新版安装包)
OpenClaw 2.6.4 可视化部署 打造个人 AI 数字员工(包含最新版安装包)
【小白友好!】OpenClaw 2.6.4 本地 AI 智能体快速搭建教程(内有安装包)
零基础部署 OpenClaw v2.6.2,Windows 系统完整教程
【适合新手的】零基础部署 OpenClaw 自动化工具教程
开发者们的第一台自主进化的“爱马仕”来了
极简部署 OpenClaw 2.6.2 本地 AI 智能体快速启用(含最新版安装包)
AI精选
