| name | login |
| description | Log in the WeChat channel by QR code, show login status, or clear saved credentials. Use when the user asks to log in, scan a WeChat QR code, configure the WeChat channel, re-authenticate, or check whether WeChat is connected. |
| user-invocable | true |
| allowed-tools | ["Bash(bun *)","Bash(find *)","Bash(pwd)","Bash(test *)","Bash(ls *)"] |
/login - WeChat Channel Login
Runs the plugin's login.ts helper. It saves credentials to
~/.claude/channels/weixin/account.json with owner-only permissions.
Arguments passed: $ARGUMENTS
Dispatch
- No args: run the QR login flow. If an account already exists, show the saved
account ID and tell the user to run
/login relogin to replace it.
relogin: force a fresh QR login and overwrite account.json.
status: print current login status with the token masked.
clear: delete account.json.
Run Command
Find the plugin root, then run:
bun run --cwd "$PLUGIN_ROOT" login $ARGUMENTS
Use this root discovery order:
- If
CLAUDE_PLUGIN_ROOT is set and contains login.ts, use it.
- If the current working directory contains this plugin's
login.ts and
package.json, use the current working directory.
- Search under
~/.claude and the current working tree for a path ending in
wechat-claude-relay/login.ts.
If the helper cannot be found, tell the user to run bun run login from the
plugin directory.
Never print the full bot_token.