feat: Add --start flag to bd daemon, show help with no args
Currently 'bd daemon' with no args immediately starts the daemon. This is inconsistent with other daemon management commands like --stop, --status, etc. and makes the command less discoverable for new users. Changes: - Add --start flag to explicitly start daemon - Show help text when no operation flags provided - Update auto-start logic to use --start flag - Update startDaemon() to pass --start when forking - Update all documentation to use 'bd daemon --start' - Update MCP Python client error messages The MCP docs already incorrectly showed 'bd daemon start' which doesn't work, so this change fixes that documentation bug while improving UX. Auto-start still works correctly - it now passes --start internally. Fixes bd-gfu 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -103,7 +103,7 @@ func restartDaemonForVersionMismatch() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
args := []string{"daemon"}
|
||||
args := []string{"daemon", "--start"}
|
||||
cmd := exec.Command(exe, args...)
|
||||
cmd.Env = append(os.Environ(), "BD_DAEMON_FOREGROUND=1")
|
||||
|
||||
@@ -267,7 +267,7 @@ func startDaemonProcess(socketPath string, isGlobal bool) bool {
|
||||
binPath = os.Args[0]
|
||||
}
|
||||
|
||||
args := []string{"daemon"}
|
||||
args := []string{"daemon", "--start"}
|
||||
if isGlobal {
|
||||
args = append(args, "--global")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user