通用问题
juhe-cli 和 juhe-sync 常见问题解答
常见问题
如何获取设备 GUID?
使用以下命令查看已连接的所有设备及其 GUID:
bash
juhe-cli device list输出示例:
bash
GUID Type Status
ent_001 enterprise online
wx_001 wx onlineconversation_id 格式是什么?
conversation_id 用于标识不同的对话类型:
- 私聊:
S:user_id - 群聊:
R:room_id
示例:
bash
# 私聊
S:user_123
# 群聊
R:room_456如何配置多个设备?
在配置文件中添加多个 GUID:
json
{
"guids": ["ent_001", "wx_001", "ent_002"],
"guid_types": {
"ent_001": "enterprise",
"wx_001": "wx",
"ent_002": "enterprise"
}
}或在 juhe-sync.json 中配置:
json
{
"guids": ["guid1", "guid2"],
"guid_types": {
"guid1": "enterprise",
"guid2": "wx"
}
}juhe-sync 无法启动?
按以下步骤排查:
- 检查端口占用:bash
netstat -tlnp | grep 8070 - 检查配置文件路径:bash
ls -la juhe-sync.json - 检查 API 连通性:bash
curl -I https://chat-api.juhebot.com - 查看日志:bash
tail -f juhe-sync.log
SKILL 部署后如何使用?
Claude Code中使用斜杠命令:
bash
/juhe-send-message "你好" --to user_123
/juhe-list-contacts --guid ent_001OpenClaw中作为技能调用:
bash
juhe_send_message(message="你好", to="user_123")
juhe_list_contacts(guid="ent_001")企微和个微命令的区别?
企业微信命令直接使用:
bash
juhe-cli client list
juhe-cli message send个人微信命令需要加 wx 前缀:
bash
juhe-cli wx client list
juhe-cli wx message send如何设置代理?
使用以下命令配置代理:
bash
# 设置 HTTP 代理
juhe-cli client set_proxy '{
"guid": "xxx",
"proxy": "http://proxy.example.com:8080"
}'
# 设置 SOCKS5 代理
juhe-cli client set_proxy '{
"guid": "xxx",
"proxy": "socks5://proxy.example.com:1080"
}'如何查看同步日志?
juhe-sync 运行时会输出详细日志:
bash
# 实时查看日志
tail -f juhe-sync.log
# 查看最近 100 行
tail -n 100 juhe-sync.log
# 搜索错误日志
grep ERROR juhe-sync.log数据库文件太大怎么办?
可以定期清理或归档旧数据:
bash
# 备份数据库
cp juhe-sync.db juhe-sync.db.backup
# 清理 30 天前的消息(需要手动执行 SQL)
sqlite3 juhe-sync.db "DELETE FROM messages WHERE timestamp < datetime('now', '-30 days');"
# 压缩数据库
sqlite3 juhe-sync.db "VACUUM;"如何更新 juhe-cli?
重新下载最新版本覆盖旧文件即可:
bash
# 下载最新版
curl -L -o juhe-cli https://github.com/Hanson/juhe-cli/releases/download/v1.0.0/juhe-cli-linux-amd64
chmod +x juhe-cli
sudo mv juhe-cli /usr/local/bin/获取帮助
如果以上问题无法解决你的疑问,可以: