Consolidate CLI commands to reduce top-level surface area
- migrate-* commands → subcommands of `bd migrate` - relate/unrelate → subcommands of `bd dep` - daemons subcommands → available under `bd daemon` - comment alias → hidden with deprecation warning All old commands still work with deprecation warnings for backwards compatibility. Reduces visible top-level commands from ~73 to 66. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -604,14 +604,26 @@ stale sockets, version mismatches, and unresponsive daemons.`,
|
||||
},
|
||||
}
|
||||
func init() {
|
||||
rootCmd.AddCommand(daemonsCmd)
|
||||
// Add subcommands
|
||||
// Add multi-daemon subcommands to daemonCmd (primary location)
|
||||
daemonCmd.AddCommand(daemonsListCmd)
|
||||
daemonCmd.AddCommand(daemonsHealthCmd)
|
||||
daemonCmd.AddCommand(daemonsStopCmd)
|
||||
daemonCmd.AddCommand(daemonsLogsCmd)
|
||||
daemonCmd.AddCommand(daemonsKillallCmd)
|
||||
daemonCmd.AddCommand(daemonsRestartCmd)
|
||||
|
||||
// Also add to daemonsCmd for backwards compatibility
|
||||
// Make daemonsCmd a hidden alias that shows deprecation
|
||||
daemonsCmd.Hidden = true
|
||||
daemonsCmd.Deprecated = "use 'bd daemon <subcommand>' instead (e.g., 'bd daemon list')"
|
||||
daemonsCmd.AddCommand(daemonsListCmd)
|
||||
daemonsCmd.AddCommand(daemonsHealthCmd)
|
||||
daemonsCmd.AddCommand(daemonsStopCmd)
|
||||
daemonsCmd.AddCommand(daemonsLogsCmd)
|
||||
daemonsCmd.AddCommand(daemonsKillallCmd)
|
||||
daemonsCmd.AddCommand(daemonsRestartCmd)
|
||||
rootCmd.AddCommand(daemonsCmd)
|
||||
|
||||
// Flags for list command
|
||||
daemonsListCmd.Flags().StringSlice("search", nil, "Directories to search for daemons (default: home, /tmp, cwd)")
|
||||
daemonsListCmd.Flags().Bool("no-cleanup", false, "Skip auto-cleanup of stale sockets")
|
||||
|
||||
Reference in New Issue
Block a user