通过 wacli(基于 whatsmeow 的 WhatsApp Web)从命令行发送 WhatsApp 消息或文件。用于用户请求通过 WhatsApp 发送消息或文件的场景。
Use wacli via exec.
wacli versionbrew install steipete/tap/wacliwacli authwacli sync --followwacli doctorText:
wacli send text --to <PHONE_OR_JID> --message "<TEXT>"Quoted reply (needs message id, usually from messages list/search/show/context):
wacli send text --to <PHONE_OR_JID> --message "<TEXT>" --reply-to <MSG_ID>React:
wacli send react --to <PHONE_OR_JID> --id <MSG_ID> [--reaction "<EMOJI>"]wacli send file --to <PHONE_OR_JID> --file <PATH> [--caption "<TEXT>"] [--filename <DISPLAY_NAME>] [--mime <MIME>]wacli messages search "<QUERY>"wacli messages list --chat <JID> --asc --limit 50wacli messages context --chat <JID> --id <MSG_ID>wacli chats list --query "<NAME>" --limit 50wacli groups list --query "<NAME>" --limit 50~/.wacli on macOS; override with --store DIR or WACLI_STORE_DIR.