wechat-cli-0.2.0 is not a library.
wechat-cli
A CLI tool to interact with a Wechat iLink bot.
Features
- Interactive QR code login for human
- Non-interactive QR code retrieval and status polling for agents
- Manage multi accounts
- Get
context_token - Send text, images, and files to WeChat users
Installation
Usage
Usage: wechat-cli <COMMAND>
Commands:
login Log in with a QR code and save the account locally
qrcode Request a login QR code and print it as JSON without saving anything locally
qrcode-status Query a login QR code status and print it as JSON without saving anything locally
account Inspect saved accounts
get-context-token Wait for the next inbound message and print its context token
send Send a text, image, or file message
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print helpt-cli [COMMAND]
Login
Interactive QR code login:
Non-interactive QR code workflow for agents:
# Request a QR code
# Poll QR code status
Account
List saved accounts:
Add a new account:
Delete an account by index:
Delete an account by user ID:
Get Context Token
Wait for the next incoming message and print the context_token:
Send
Send a text message:
|
Send an image:
|
Send a file:
|
Send a file with caption:
|
Use explicit credentials:
Storage
Local files are stored under:
~/.config/wechat-cli/
Main file:
~/.config/wechat-cli/accounts.json