weixin-claw-cli
v0.1.4
Published
WeChat CLI messaging tool - send/receive messages, files, and clipboard content via WeChat from your terminal
Maintainers
Readme
weixin-claw-cli
A command-line tool for sending and receiving WeChat messages directly from your terminal.
Quick Start
npm install -g weixin-claw-cli
weixin loginOr use without installing:
npx weixin-claw-cli loginFeatures
- QR code login directly in terminal
- Send text messages and clipboard content to WeChat
- Send files, images, and videos
- Listen for incoming messages in real-time
- Interactive chat mode
- Auto-login when no account is found
- Works with both Node.js (>=18) and Bun
Commands
| Command | Description |
|---------|-------------|
| weixin | Send clipboard content to your bound WeChat |
| weixin login | Scan QR code to login |
| weixin accounts | List logged-in accounts |
| weixin send <user_id> <message> | Send a text message |
| weixin sendfile <file> [options] | Send a file, image, or video |
| weixin listen | Listen and print incoming messages |
| weixin chat [user_id] | Interactive two-way chat |
| weixin help | Show help |
Usage Examples
Send clipboard content (default)
# Copy something, then:
weixinSend a text message
weixin send "[email protected]" "Hello from terminal!"Send files
# Send an image to yourself
weixin sendfile photo.jpg
# Send a file to a specific user
weixin sendfile report.pdf --to "[email protected]"
# Send with a caption
weixin sendfile demo.mp4 --caption "Check this out"Supported file types are auto-detected by extension:
| Type | Extensions | |------|-----------| | Image | jpg, png, gif, webp, bmp | | Video | mp4, mov, webm, avi | | File | pdf, doc, xls, zip, and more |
Listen for messages
weixin listenInteractive chat
# Auto-detect chat target from first incoming message
weixin chat
# Or specify a target
weixin chat "[email protected]"In chat mode:
- Type a message and press Enter to send
/target <id>to switch chat target/quitto exit
Data Storage
Credentials and session data are stored in ~/.weixin/.
Development
# Install dependencies
bun install
# Run in dev mode
bun run dev
# Build for distribution
bun run buildLicense
MIT
