为任意可执行文件安装开机启动项。
支持 macOS launchd 和 Linux systemd --user。
go install github.com/heylingyao/s8@latests8 i /path/executable
s8 s /path/executable
s8 r /path/executable
s8 p /path/executable长命令也支持:install status remove print。
支持绝对路径和相对路径:
s8 i /Users/vincent/bin/g2
s8 i ./dist/g2i:安装并启用s:检查是否已安装r:移除启动项p:打印启动项内容
- macOS:
~/Library/LaunchAgents/<label>.plist - Linux:
~/.config/systemd/user/<label>.service
label 会基于可执行文件名和绝对路径生成,避免同名程序互相覆盖。