CLI 命令
在终端里管理 daemon 和会话。
开机自启
- macOS:写
~/Library/LaunchAgents/com.botmux.daemon.plist,launchctl bootstrap加载。 - Linux:写
~/.config/systemd/user/botmux.service,systemctl --user enable --now。- 服务器/无桌面环境登出会停服务,需跨登出常驻请
sudo loginctl enable-linger <用户名>。
- 服务器/无桌面环境登出会停服务,需跨登出常驻请
- 单元文件里的
node/cli.js路径来自当前process.execPath,nvm/fnm 切版本后跑一次enable重写即可(start/restart也会自动检测路径变化原地刷新)。 enable/disable只管自启钩子,不动正在跑的 daemon——避免"只想关自启结果服务也被干掉"。
会话内子命令(给 CLI agent 用)
session 信息通过祖先进程标记自动推断,agent 直接调: