
Wechat Multi
- 190 installs
- 19 repo stars
- Updated March 7, 2026
- joeseesun/wechat-multi
Open multiple WeChat instances on macOS with app duplication and code signing for parallel account management.
About
macOS tool for multi-instance WeChat execution by duplicating app bundles and resigning them. Supports dual and multi-open modes with rebuild after updates.
- WeChat multi-open using bundle duplication and code resigning
- Auto-rebuild after updates and custom app naming for instance management
Wechat Multi by the numbers
- 190 all-time installs (skills.sh)
- +1 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #1,072 of 3,282 Productivity & Planning skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/joeseesun/wechat-multi --skill wechat-multiAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 190 |
|---|---|
| repo stars | ★ 19 |
| Last updated | March 7, 2026 |
| Repository | joeseesun/wechat-multi ↗ |
What it does
Open multiple WeChat instances on macOS with app duplication and code signing for parallel account management.
Files
WeChat Multi-Instance (小绿书)
命令映射
脚本路径:~/.claude/skills/wechat-multi/scripts/wechat-multi.sh(以下简称 SCRIPT)
首次使用
需要 sudo 权限。建议配置 sudoers 免密码,否则每次会弹出密码输入:
echo "$(whoami) ALL=(ALL) NOPASSWD: $(which bash) $(ls ~/.claude/skills/wechat-multi/scripts/wechat-multi.sh)" | sudo tee /etc/sudoers.d/wechat-multi命令映射
| 用户说 | 执行命令 |
|---|---|
| "打开两个微信" / "微信双开" | sudo $SCRIPT auto --force |
| "打开N个微信" / "微信多开N个" | sudo $SCRIPT multi N --force |
| "再开一个微信" | open -n /Applications/小绿书.app |
| "微信更新后重建" / "修复微信多开" | sudo $SCRIPT rebuild --force |
| "关闭所有微信" | sudo $SCRIPT kill |
注意事项
- 微信更新后副本会失效,运行
rebuild重建 - 副本名为
小绿书.app(双开)或小绿书1.app、小绿书2.app...(多开) - 如果提示签名错误,也用
rebuild修复
MIT License
Copyright (c) 2026 joeseesun
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
wechat-multi
macOS 微信多开工具(小绿书)。
安装
npx skills add joeseesun/wechat-multiWeChat Multi-Instance (小绿书)
命令映射
| 用户说 | 执行命令 |
|---|---|
| "打开两个微信" / "微信双开" | sudo ~/bin/wechat-multi.sh auto --force |
| "打开N个微信" / "微信多开N个" | sudo ~/bin/wechat-multi.sh multi N --force |
| "再开一个微信" | open -n /Applications/小绿书.app |
| "微信更新后重建" / "修复微信多开" | sudo ~/bin/wechat-multi.sh rebuild --force |
| "关闭所有微信" | sudo ~/bin/wechat-multi.sh kill |
注意事项
- 脚本需要
sudo,已在 sudoers 配置免密码,直接执行无需确认 - 微信更新后副本会失效,运行
rebuild重建 - 副本名为
小绿书.app(双开)或小绿书1.app、小绿书2.app...(多开) - 如果提示签名错误,也用
rebuild修复
License
MIT
📱 关注作者
如果这个项目对你有帮助,欢迎关注我获取更多技术分享:
- X (Twitter): @vista8
- 微信公众号「向阳乔木推荐看」:
<p align="center"> <img src="https://github.com/joeseesun/terminal-boost/raw/main/assets/wechat-qr.jpg?raw=true" alt="向阳乔木推荐看公众号二维码" width="300"> </p>
#!/bin/bash
# macOS WeChat Multi Instance Script
# Usage:
# sudo ./wechat-2.sh auto --force
# sudo ./wechat-2.sh multi 3 --force # 多开3个副本
# sudo ./wechat-2.sh rebuild --force # 更新后自动重建所有副本
set -euo pipefail
# 颜色
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; BLUE='\033[0;34m'; NC='\033[0m'
# 默认路径
WECHAT_APP="/Applications/WeChat.app"
DEST_DIR="/Applications"
BASE_APP_NAME="小绿书"
FORCE=0
require_cmd() {
command -v "$1" >/dev/null 2>&1 || { echo -e "${RED}缺少命令: $1${NC}"; exit 1; }
}
for cmd in ditto codesign xattr /usr/libexec/PlistBuddy; do require_cmd "$cmd"; done
check_wechat() {
if [ ! -d "$WECHAT_APP" ]; then
echo -e "${RED}未找到微信: $WECHAT_APP${NC}"
exit 1
fi
echo -e "${GREEN}✓ 检测到微信已安装${NC}"
}
remove_app() {
local dest="$DEST_DIR/$1"
if [ -d "$dest" ]; then
if [ $FORCE -eq 1 ]; then
sudo rm -rf "$dest"
else
read -p "是否删除并重新创建 $1? (y/n): " yn
[[ $yn =~ ^[Yy]$ ]] && sudo rm -rf "$dest"
fi
fi
}
copy_wechat() {
local app_name=$1
sudo ditto "$WECHAT_APP" "$DEST_DIR/$app_name"
}
modify_bundle_id() {
local app_name=$1
local info_plist="$DEST_DIR/$app_name/Contents/Info.plist"
local new_id="com.tencent.xinWeChat.dual.$RANDOM"
sudo /usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier $new_id" "$info_plist"
sudo /usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName $app_name" "$info_plist" || true
}
resign_app() {
local app_name=$1
local dest="$DEST_DIR/$app_name"
sudo rm -rf "$dest/Contents/_CodeSignature" || true
sudo xattr -dr com.apple.quarantine "$dest" || true
sudo codesign --force --deep --sign - --timestamp=none "$dest"
}
start_apps() {
shift
for app_name in "$@"; do open -n "$DEST_DIR/$app_name"; sleep 1; done
}
kill_wechat() {
pkill -f "WeChat" || true
}
# 查找已存在的小绿书副本
list_existing_apps() {
ls "$DEST_DIR" | grep "^$BASE_APP_NAME[0-9]*\.app$" || true
}
main() {
case "${1:-}" in
setup)
check_wechat
remove_app "${BASE_APP_NAME}.app"
copy_wechat "${BASE_APP_NAME}.app"
modify_bundle_id "${BASE_APP_NAME}.app"
resign_app "${BASE_APP_NAME}.app"
;;
start)
start_apps "WeChat.app" "${BASE_APP_NAME}.app"
;;
auto)
check_wechat
remove_app "${BASE_APP_NAME}.app"
copy_wechat "${BASE_APP_NAME}.app"
modify_bundle_id "${BASE_APP_NAME}.app"
resign_app "${BASE_APP_NAME}.app"
start_apps "WeChat.app" "${BASE_APP_NAME}.app"
;;
multi)
local count=${2:-2}
check_wechat
for i in $(seq 1 "$count"); do
local app_name="${BASE_APP_NAME}${i}.app"
remove_app "$app_name"
copy_wechat "$app_name"
modify_bundle_id "$app_name"
resign_app "$app_name"
done
start_apps $(for i in $(seq 1 "$count"); do echo "${BASE_APP_NAME}${i}.app"; done)
;;
rebuild)
check_wechat
echo -e "${BLUE}检测到系统更新或微信更新,正在重建副本...${NC}"
local apps=$(list_existing_apps)
for app_name in $apps; do
echo -e "${YELLOW}重建 $app_name ...${NC}"
remove_app "$app_name"
copy_wechat "$app_name"
modify_bundle_id "$app_name"
resign_app "$app_name"
done
echo -e "${GREEN}✓ 所有副本已重新生成${NC}"
;;
-k|kill)
kill_wechat
;;
-h|--help|"")
echo "用法: $0 {setup|start|auto|multi N|rebuild|kill} [--force]"
;;
*)
echo -e "${RED}未知参数: $1${NC}"
exit 1
;;
esac
}
for arg in "$@"; do [[ $arg == "--force" ]] && FORCE=1; done
main "$@"