Skip to content

Connect your account

  1. Start the daemon and leave it running.

    Terminal window
    wx serve
  2. Log in from a second terminal.

    Works on every platform. agent-wechat creates a fresh WeChat profile in its own data folder.

    Terminal window
    wx accounts create --alias me
    wx auth login

    Scan the QR code with WeChat on your phone. When the terminal says it is waiting for confirmation, approve the login in WeChat.

    With wx --json auth login, the waiting notice is a JSON line on stderr with event: "login.progress" and state: "awaiting_approval". Read the final operation result as a single JSON document on stdout.

    Terminal showing wx auth login printing a QR code, then confirming the login
  3. Check it worked.

    Terminal window
    wx messages list filehelper --limit 1
    {
    "items": [
    {
    "id": "msg_eyJkYXRhYmFzZSI6Im1lc3NhZ2UvbWVzc2FnZV8wLmRi…",
    "threadId": "filehelper",
    "direction": "outgoing",
    "type": 1,
    "body": "notes for Monday",
    "createdAt": "2026-10-21T09:14:03+00:00"
    }
    ],
    "nextCursor": "…"
    }

You’re connected. Next: keep it running in the background, then use it from the CLI, OpenClaw or your own code.

Sign out or remove a profile

List profiles with wx accounts list. Use the account ID from that response:

Terminal window
wx --account ACCOUNT_ID auth login
wx --account ACCOUNT_ID auth logout

Use wx --account ACCOUNT_ID auth logout --local to sign out on the daemon and keep saved credentials without sending a logout request to WeChat. Both forms stop automatic reconnection.

After sign-out completes, remove the profile from the hub by repeating its exact ID:

Terminal window
wx accounts remove ACCOUNT_ID --confirm ACCOUNT_ID
{ "accountId": "ACCOUNT_ID", "removed": true, "filesRetained": true }

Removal unregisters the profile and keeps its local files. wx auth forget --yes is a separate action that forgets saved sign-in credentials; it does not remove the profile.