Skip to content

CLI Commands

Container

CommandDescription
wx up [--proxy user:pass@host:port]Start the agent-wechat container (auto-pulls image)
wx downStop and remove the container
wx logsTail container logs
wx statusShow container up/down status and login status

Auth

CommandDescription
wx auth loginLog in to WeChat (shows QR code in terminal)
wx auth logoutLog out of WeChat
wx auth statusCheck login status
wx auth tokenShow current auth token
wx auth token --regenerateGenerate a new auth token

Login options:

  • --timeout <seconds> — login timeout (default: 300)
  • --new — switch to a new account instead of reusing the existing session

Chats

CommandDescription
wx chats listList chats from WeChat
wx chats get <chatId>Get details for a specific chat
wx chats find <name>Search chats by display name
wx chats open <chatId>Open a chat in the WeChat UI

Options: --limit <n>, --offset <n>, --json

Messages

CommandDescription
wx messages list <chatId>List messages in a chat
wx messages send <chatId>Send a message
wx messages media <chatId> <localId>Download a media attachment

Send options:

  • --text "message" — send text
  • --image photo.jpg — send an image
  • --file document.pdf — send a file

Media options:

  • --output <path> — save to a specific file path

Debug

CommandDescription
wx screenshot [file]Save a screenshot (default: screenshot.png)
wx a11yDump the accessibility tree (--format json|aria)