通过Telegram自动化运维Windows,hermes实现自动回复微信群组消息
2026年4月18日 14:57
最近我需要用pywinauto写一个Windows自动回复微信群消息的脚本,但我只有一台运行在ubuntu的Windows虚拟机可用,Windowsw本身的环境不适合hermes运行,为了能使用hermes流畅vibe coding,我搞了一套Windows编程的新姿势。 在ubuntu的Windows虚拟机开启wsl,然后wsl加入zerotier网络,我用hermes backend ssh连接wsl,然后用hermes为远程的Windows写脚本,写了脚本可以通过wsl控制powershell运行和截图,校准结果。 这个hermes backend ssh可以接入telegram机器人,我所有的编程和调优指令使用telegram下发给hermes, hermes直接编程实现自动回复微信群组消息。 创建密钥 ssh-keygen -t ed25519 -f ~/.ssh/hermes-ssh 传输密钥 ssh-copy-id -i ~/.ssh/hermes-ssh.pub user@server-ip 回车后,输入ssh登陆密码即可 然后自己验证: ssh -i ~/.ssh/hermes-ssh user@server-ip 如果可以免密登录,就能给 Hermes 添加配置 在Hermes创建profile 按照Hermes的设计,一台机器就是一个profile,本机是一个profile,远程的机器也是一个profile,我们想要切换机器,直接切换profile即可,首先新建profile hermes profile create wsl-win11 ➜ ~ hermes profile create wsl-win11 Profile 'wsl-win11' created at /Users/zhaoolee/.hermes/profiles/wsl-win11 79 bundled skills synced. Wrapper created: /Users/zhaoolee/.local/bin/wsl-win11 Next steps: […]