Files
pi2d/test
yuez 4eda2b9420 feat(cli): add pi2 service status|start|stop|enable|disable
`install-service` only renders the unit file; nothing in the CLI talked to
systemd/launchd. The editor plugin had no supported way to start a
service-managed daemon (it would have had to shell out to `systemctl` itself),
so add the explicit control surface ADR 0002 §2.2 assumes:

  pi2 service status [--json]   manager, unit path, installed/enabled/active, linger
  pi2 service start|stop        systemctl --user start|stop / launchctl kickstart|kill
  pi2 service enable|disable    systemctl --user enable|disable --now / launchctl bootstrap|bootout

`status` never fails: no manager, no unit and a dead service are reports, and
`--json` carries the same shape the plugin decodes. The four mutating actions
exit 1 with the manager's first stderr line, and refuse to run when the unit
file is missing. Every probe is injectable (exec/exists/platform/paths/uid/user)
so the tests never touch a real service manager.
2026-10-29 14:00:41 +08:00
..