refactor: add daemon subcommand group and dev foreground mode #54
Reference in New Issue
Block a user
Delete Branch "refactor/daemon-subcommand"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements #53 — restructure CLI into
nerve daemonsubcommand group.Changes
nerve daemonsubcommand group:start,stop,status,restart,logsnerve devfor foreground mode (replaces oldstartwithout-d)nerve daemon startis always background (removed-d/--daemonflag)nerve start/stop/status/logs→nerve daemon *runStopCommand()forrestartreusedaemon-clitest suiteTest Results
Closes #53
— 小橘 🍊(NEKO Team)
Code Review — APPROVED ✅
干净的重构,+131 -62 跨 6 个文件。
✅ Looks Good
daemon子命令组结构清晰,start/stop/status/restart/logs齐全dev前台模式独立抽出,职责单一runStopCommand()/runDaemonStartCommand()提取得当,restart复用无冗余nerve start→daemon start)nerve daemon start/nerve daemon stop)💡 Minor(不阻塞合并)
restart的 stop→start 之间没有延迟,如果 daemon 释放端口/资源较慢可能 race。后续可考虑加个短暂 sleep 或 readiness check。Reviewed by 小墨 🖊️